/* =========================
   VBA Column
========================= */

.vba-hero {
	display: grid;
	grid-template-columns: 1.1fr .9fr;
	gap: 36px;
	align-items: center;
	margin-bottom: 48px;
	padding-bottom: 36px;
	border-bottom: 1px solid rgba(122, 74, 31, .35);
}

.vba-label {
	display: inline-block;
	margin-bottom: 12px;
	color: #7a4a1f;
	font-weight: 700;
	letter-spacing: .08em;
	border-bottom: 1px solid rgba(122, 74, 31, .4);
}

.vba-hero h1 {
	font-size: clamp(30px, 4vw, 48px);
	line-height: 1.35;
	color: #2b1a0e;
}

.vba-hero .subtitle {
	margin-top: 8px;
	font-size: 20px;
	font-weight: 700;
	color: #5a3312;
}

.vba-hero .lead {
	margin-top: 28px;
	line-height: 2;
	font-weight: 600;
}

.vba-hero-image img {
	width: 100%;
	height: auto;
	display: block;
}

.vba-section {
	margin: 48px 0;
	padding-top: 28px;
	border-top: 1px solid rgba(122, 74, 31, .35);
}

.vba-section h2,
.vba-code-panel h2,
.vba-commentary h2,
.vba-note h2 {
	margin-bottom: 20px;
	font-size: 24px;
	color: #2b1a0e;
}

.vba-list {
	padding-left: 1.4em;
	line-height: 2;
	font-weight: 600;
}

.vba-code-panel,
.vba-commentary,
.vba-note {
	background: rgba(255, 244, 210, .32);
	border: 1px solid rgba(122, 74, 31, .45);
	box-shadow: 0 6px 18px rgba(80, 45, 18, .16);
}

.vba-code-panel {
	padding: 24px;
}

.vba-code {
	overflow-x: auto;
	margin: 0;
	padding: 24px;
	background: rgba(45, 25, 12, .92);
	border: 1px solid rgba(224, 189, 114, .55);
	color: #f3ddaa;
	font-family: Consolas, "Courier New", monospace;
	font-size: 14px;
	line-height: 2;
	white-space: pre;
}

.vba-code code {
	font-family: inherit;
	color: inherit;
}

.vba-commentary {
	padding: 28px;
}

.vba-commentary ol {
	margin: 0;
	padding-left: 1.4em;
}

.vba-commentary li {
	margin-bottom: 22px;
}

.vba-commentary h3 {
	margin-bottom: 8px;
	font-size: 17px;
	color: #5a3312;
}

.vba-commentary p {
	line-height: 1.9;
	font-weight: 600;
}

.vba-code-section {
	margin: 48px 0;
}

.vba-code-panel {
	margin-bottom: 32px;
}

.vba-commentary {
	padding: 28px;
	background: rgba(255, 244, 210, .32);
	border: 1px solid rgba(122, 74, 31, .45);
	box-shadow: 0 6px 18px rgba(80, 45, 18, .16);
}

.vba-result-table {
	width: 100%;
	border-collapse: collapse;
	background: rgba(255, 244, 210, .35);
	border: 1px solid rgba(122, 74, 31, .45);
}

.vba-result-table th,
.vba-result-table td {
	padding: 12px 16px;
	border: 1px solid rgba(122, 74, 31, .35);
	text-align: left;
}

.vba-result-table th {
	color: #3a2414;
	background: rgba(122, 74, 31, .12);
}

.vba-note {
	margin: 48px 0;
	padding: 28px;
}

.vba-note p {
	line-height: 2;
	font-weight: 700;
	color: #5a3312;
}

@media only screen and (max-width: 900px) {
	.vba-hero,
	.vba-layout {
		grid-template-columns: 1fr;
	}

	.vba-hero-image {
		max-width: 420px;
		margin: 0 auto;
	}
}

@media only screen and (max-width: 600px) {
	.vba-code-panel,
	.vba-commentary,
	.vba-note {
		padding: 18px;
	}

	.vba-code {
		padding: 16px;
		font-size: 12px;
	}
}

/* =========================
   VBA images
========================= */

.vba-hero {
	position: relative;
	overflow: hidden;
}

.vba-hero-image {
	position: relative;
	z-index: 1;
}

.vba-hero-image img {
	width: 100%;
	max-width: 420px;
	height: auto;
	display: block;
	margin-left: auto;
	filter: drop-shadow(0 12px 18px rgba(50, 25, 10, .35));
}

.vba-hero::after {
	content: "";
	position: absolute;
	right: 3%;
	top: 8%;
	width: 260px;
	height: 260px;
	background: url("../img/vba_quill.png") no-repeat center / contain;
	opacity: .18;
	pointer-events: none;
}

.vba-result-wrap {
	position: relative;
}

.vba-result-wrap::after {
	content: "";
	position: absolute;
	right: 24px;
	bottom: -18px;
	width: 130px;
	height: 130px;
	background: url("../img/vba_lamp.png") no-repeat center / contain;
	opacity: .75;
	pointer-events: none;
}

.vba-note {
	position: relative;
}

.vba-note::after {
	content: "";
	position: absolute;
	right: 20px;
	bottom: 12px;
	width: 90px;
	height: 90px;
	background: url("../img/vba_quill.png") no-repeat center / contain;
	opacity: .28;
	pointer-events: none;
}

@media only screen and (max-width: 900px) {
	.vba-hero-image img {
		margin: 24px auto 0;
	}

	.vba-hero::after {
		width: 180px;
		height: 180px;
		opacity: .12;
	}

	.vba-result-wrap::after {
		width: 90px;
		height: 90px;
		opacity: .45;
	}
}

/* =========================
   VBA Copy Button
========================= */

.vba-code-wrap {
	position: relative;
}

.vba-code-toolbar {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 9999;
}

.btn-copy-vba {
	display: block !important;
	width: auto !important;
	min-width: 70px;
	height: 36px;
	padding: 0 12px;
	color: #e0bd72 !important;
	background: #2d190c !important;
	border: 1px solid #e0bd72 !important;
	border-radius: 8px;
	font-size: 12px;
	font-weight: bold;
	line-height: 36px;
	text-align: center;
	cursor: pointer;
	opacity: 1 !important;
	visibility: visible !important;
}

.vba-image-box {
	margin: 28px 0;
	text-align: center;
}

.vba-image-box img {
	display: inline-block;
	max-width: 760px;
	width: 100%;
	width: auto;
	height: auto;
	border: 1px solid rgba(122,74,31,.35);
	box-shadow: 0 6px 18px rgba(80,45,18,.18);
	border-radius: 6px;
}

.vba-shortcut {

	display: inline-block;

	padding: 8px 14px;
	margin: 10px 0 18px;

	background: rgba(122,74,31,.08);

	border-left: 4px solid #a87432;

	font-weight: 700;

	border-radius: 4px;
}

