/**
 * Inar Guide — Classic Editor Tools
 *
 * Shared styles for markup inserted by the "IG Tools" editor button.
 * Loaded both as an editor style (so it looks right inside the Classic
 * Editor's TinyMCE iframe) and as a front-end stylesheet, so what you see
 * while writing matches what visitors see.
 */

/* ── Inline button ─────────────────────────────────────────────────── */

.ig-inline-btn {
	display: inline-block;
	vertical-align: middle;
	margin: 0 2px;
	padding: 0.45em 1.1em;
	background: #2271b1;
	color: #fff !important;
	font-weight: 600;
	font-size: 0.95em;
	line-height: 1.4;
	text-decoration: none !important;
	border-radius: 6px;
	white-space: nowrap;
	transition: background-color 0.15s ease, transform 0.15s ease;
}
.ig-inline-btn:hover,
.ig-inline-btn:focus {
	background: #135e96;
	color: #fff !important;
	transform: translateY(-1px);
}

/* ── Callout box ───────────────────────────────────────────────────── */

.ig-callout {
	margin: 1.25em 0;
	padding: 1em 1.25em;
	border-left: 4px solid #2271b1;
	background: #f0f6fc;
	border-radius: 4px;
}
.ig-callout p:first-child { margin-top: 0; }
.ig-callout p:last-child { margin-bottom: 0; }
.ig-callout--info    { border-left-color: #2271b1; background: #f0f6fc; }
.ig-callout--warning { border-left-color: #dba617; background: #fcf6e8; }
.ig-callout--success { border-left-color: #2a9d58; background: #eef8f1; }
.ig-callout--danger  { border-left-color: #cc1818; background: #fbeaea; }

/* ── Copy-code block ───────────────────────────────────────────────── */

.ig-code-copy {
	position: relative;
	margin: 1.25em 0;
}
.ig-code-copy pre {
	margin: 0;
	padding: 1em 5.5em 1em 1.25em;
	background: #1e1e1e;
	color: #e5e5e5;
	border-radius: 6px;
	overflow-x: auto;
	font-size: 0.9em;
	line-height: 1.5;
}
.ig-code-copy code {
	background: none;
	color: inherit;
	padding: 0;
	font-family: Consolas, Monaco, "Courier New", monospace;
}
.ig-code-copy__btn {
	position: absolute;
	top: 0.6em;
	right: 0.6em;
	padding: 0.35em 0.8em;
	background: #333;
	color: #fff;
	border: 1px solid #555;
	border-radius: 4px;
	font-size: 0.8em;
	cursor: pointer;
	transition: background-color 0.15s ease;
}
.ig-code-copy__btn:hover { background: #444; }
.ig-code-copy__btn--copied { background: #2a9d58; border-color: #2a9d58; }

/* ── Table of contents ─────────────────────────────────────────────── */

.ig-toc {
	margin: 1.5em 0;
	padding: 1.1em 1.4em;
	background: #f6f7f7;
	border: 1px solid #dcdcde;
	border-radius: 6px;
}
.ig-toc__title { margin: 0 0 0.5em; font-weight: 700; }
.ig-toc__list { margin: 0; padding-left: 1.25em; }
.ig-toc__item { margin: 0.25em 0; }
.ig-toc__item--h3 { margin-left: 1em; }
.ig-toc__item--h4 { margin-left: 2em; }
.ig-toc__list a { text-decoration: none; }
.ig-toc__list a:hover { text-decoration: underline; }

/* ── Collapsible section ───────────────────────────────────────────── */

.ig-collapsible {
	margin: 1.25em 0;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	overflow: hidden;
}
.ig-collapsible summary {
	cursor: pointer;
	padding: 0.85em 2.2em 0.85em 1.1em;
	font-weight: 600;
	background: #f6f7f7;
	list-style: none;
	position: relative;
}
.ig-collapsible summary::-webkit-details-marker { display: none; }
.ig-collapsible summary::after {
	content: "+";
	position: absolute;
	right: 1.1em;
	top: 50%;
	transform: translateY(-50%);
	font-weight: 700;
}
.ig-collapsible[open] summary::after {
	content: "\2212"; /* minus sign */
}
.ig-collapsible__content {
	padding: 1em 1.1em;
	border-top: 1px solid #dcdcde;
}
.ig-collapsible__content p:last-child { margin-bottom: 0; }

/* ── Call-to-action ────────────────────────────────────────────────── */

.ig-cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1em;
	margin: 1.5em 0;
	padding: 1.25em 1.5em;
	background: #f0f6fc;
	border: 1px solid #c5dcf0;
	border-radius: 8px;
}
.ig-cta__body { flex: 1 1 260px; min-width: 0; }
.ig-cta__heading {
	margin: 0 0 0.25em;
	font-size: 1.15em;
	font-weight: 700;
}
.ig-cta__desc {
	margin: 0;
	color: #3c434a;
}
.ig-cta__btn {
	flex: 0 0 auto;
	display: inline-block;
	padding: 0.7em 1.5em;
	background: #2271b1;
	color: #fff !important;
	font-weight: 600;
	text-decoration: none !important;
	border-radius: 6px;
	white-space: nowrap;
	transition: background-color 0.15s ease, transform 0.15s ease;
}
.ig-cta__btn:hover,
.ig-cta__btn:focus {
	background: #135e96;
	color: #fff !important;
	transform: translateY(-1px);
}
@media ( max-width: 480px ) {
	.ig-cta { flex-direction: column; align-items: stretch; text-align: center; }
	.ig-cta__btn { text-align: center; }
}

/* ── Table ─────────────────────────────────────────────────────────── */

.ig-table-wrap {
	margin: 1.25em 0;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}
.ig-table {
	width: 100%;
	border-collapse: collapse;
	min-width: 480px;
}
.ig-table th,
.ig-table td {
	padding: 0.6em 0.9em;
	border: 1px solid #dcdcde;
	text-align: left;
	vertical-align: top;
}
.ig-table thead th {
	background: #f0f6fc;
	font-weight: 700;
}
.ig-table tbody tr:nth-child(even) {
	background: #f9f9f9;
}

/* ── Notice boxes (author / disclaimer / affiliate) ───────────────── */

.ig-disclosure {
	margin: 1.25em 0;
	padding: 0.85em 1.1em;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	background: #f6f7f7;
	font-size: 0.92em;
	color: #3c434a;
}
.ig-disclosure p { margin: 0; }
.ig-disclosure--disclaimer {
	border-color: #f0d58c;
	background: #fcf6e8;
}
.ig-disclosure--affiliate {
	border-color: #cfe0ce;
	background: #eef8f1;
}

/* ── Styled Bullet List / Styled Numbered List ───────────────────────
 * A distinct, editorial-feeling look from IG's own default list (which
 * already draws a filled accent circle + connector line for ol, and an
 * accent dot for ul): a warm cream card with an arrow bullet, or an
 * outlined (not filled) accent-colored circle for numbers. Markers use
 * position:absolute on the <li> (never display:flex on the <li> itself)
 * so bold/inline lead-in text inside an item can't split the row into a
 * broken two-column layout.
 */

.ig-styled-list,
.ig-styled-numbers {
	list-style: none;
	margin: 1.25em 0;
	padding: 0.4em 1.3em;
	background: #fff1e8;
	border: 1px solid rgba(194, 65, 12, 0.18);
	border-radius: 0.85em;
}
.ig-styled-list > li,
.ig-styled-numbers > li {
	position: relative;
	padding: 0.6em 0 0.6em 2em;
	color: #18181b;
	line-height: 1.7;
	border-bottom: 1px solid rgba(194, 65, 12, 0.12);
}
.ig-styled-list > li:last-child,
.ig-styled-numbers > li:last-child {
	border-bottom: none;
}
.ig-styled-list > li p:first-child,
.ig-styled-numbers > li p:first-child { margin-top: 0; }
.ig-styled-list > li p:last-child,
.ig-styled-numbers > li p:last-child { margin-bottom: 0; }

/* Arrow bullet */
.ig-styled-list > li::before {
	content: '→';
	position: absolute;
	left: 0;
	top: 0.58em;
	color: #c2410c;
	font-weight: 700;
	font-size: 13px;
}

/* Outlined (not filled) number circle */
.ig-styled-numbers {
	counter-reset: ig-styled-num;
}
.ig-styled-numbers > li {
	counter-increment: ig-styled-num;
}
.ig-styled-numbers > li::before {
	content: counter(ig-styled-num);
	position: absolute;
	left: 0;
	top: 0.48em;
	width: 22px;
	height: 22px;
	border: 2px solid #c2410c;
	border-radius: 50%;
	color: #c2410c;
	font-size: 11px;
	font-weight: 800;
	line-height: 18px;
	text-align: center;
}

/* ── Anchor offset ─────────────────────────────────────────────────── */

/* Keeps a jumped-to heading from landing flush under a sticky header. */
h2[id], h3[id], h4[id] {
	scroll-margin-top: 100px;
}
