/*
 * Közösségi Kalandozások – tartalomkomponensek (pillértartalom)
 * Stílus: Tónusos panel (keret nélküli háttér, a cím előtt kis színes négyzet)
 * Színek: narancs #f04a24 / #c93a17, kék #1565b8 / #0e4a8a, szürke #595959
 *
 * Ez a fájl a publikus oldalon ÉS a blokkszerkesztőben is betöltődik.
 * Ezért minden szabály két helyre céloz:
 *   .entry-content          = publikus cikk
 *   .editor-styles-wrapper  = Gutenberg szerkesztő (iframe)
 *
 * Kétféle jelölést ismer:
 *   - a pillér skill által írt osztályokat (kk-box kk-tip, kk-box-title, kk-table ...)
 *   - a szerkesztőben kattintással választható blokkstílusokat (is-style-kk-tip ...)
 */

:is(.entry-content, .editor-styles-wrapper) {
	--kk-orange: #f04a24;
	--kk-orange-dark: #c93a17;
	--kk-blue: #1565b8;
	--kk-blue-dark: #0e4a8a;
	--kk-gray: #595959;
	--kk-text: #303030;
	--kk-line: #e3e3e3;
}

/* --- Frissítve sor --- */
:is(.entry-content, .editor-styles-wrapper) :is(.kk-updated, .is-style-kk-updated) {
	font-size: .9em;
	color: var(--kk-gray);
	font-style: italic;
	margin-bottom: 1.2em;
}

/* --- Dobozok: közös alap --- */
:is(.entry-content, .editor-styles-wrapper) :is(
	.kk-box, .kk-toc,
	.is-style-kk-summary, .is-style-kk-tip, .is-style-kk-practice,
	.is-style-kk-warning, .is-style-kk-definition, .is-style-kk-opinion
) {
	margin: 1.8em 0;
	padding: 1.3em 1.5em;
	border: 0;
	border-radius: 2px;
	background: #f4f4f4;
}

/* Az utolsó elem alatt ne maradjon üres sáv (publikus oldal) */
.entry-content :is(.kk-box, .kk-toc, .kk-cta, .kk-image-slot, .kk-placeholder, [class*="is-style-kk-"]) > :last-child,
.entry-content :is(.kk-box, .kk-toc, .kk-cta, .kk-image-slot, .kk-placeholder, [class*="is-style-kk-"]) > .wp-block-group__inner-container > :last-child {
	margin-bottom: 0;
}

/* Doboz címe: Oswald, nagybetűs, előtte kis színes négyzet */
:is(.entry-content, .editor-styles-wrapper) :is(.kk-box-title, .kk-toc-title, .is-style-kk-box-title) {
	display: flex;
	align-items: center;
	gap: .55em;
	margin: 0 0 .6em;
	font-family: Oswald, Impact, "Arial Narrow", sans-serif;
	font-weight: 600;
	font-size: .95em;
	line-height: 1.3;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--kk-text);
}
:is(.entry-content, .editor-styles-wrapper) :is(.kk-box-title, .kk-toc-title, .is-style-kk-box-title)::before {
	content: "";
	flex: none;
	width: .7em;
	height: .7em;
	background: var(--kk-gray);
}

/* Röviden – narancs */
:is(.entry-content, .editor-styles-wrapper) :is(.kk-summary, .is-style-kk-summary) { background: #fff3ee; }
:is(.entry-content, .editor-styles-wrapper) :is(.kk-summary, .is-style-kk-summary) :is(.kk-box-title, .is-style-kk-box-title)::before { background: var(--kk-orange); }
:is(.entry-content, .editor-styles-wrapper) :is(.kk-summary, .is-style-kk-summary) ul { margin-bottom: 0; }
:is(.entry-content, .editor-styles-wrapper) :is(.kk-summary, .is-style-kk-summary) li { margin-bottom: .4em; }

/* Tartalomjegyzék – fehér, vékony szürke keret */
:is(.entry-content, .editor-styles-wrapper) .kk-toc { background: #fff; border: 1px solid var(--kk-line); }
:is(.entry-content, .editor-styles-wrapper) .kk-toc ol { margin: 0; padding-left: 1.4em; }
:is(.entry-content, .editor-styles-wrapper) .kk-toc li { margin: .2em 0; }
:is(.entry-content, .editor-styles-wrapper) .kk-toc a { color: var(--kk-orange-dark); text-decoration: none; }
:is(.entry-content, .editor-styles-wrapper) .kk-toc a:hover { text-decoration: underline; }

/* Definíció – szürke */
:is(.entry-content, .editor-styles-wrapper) :is(.kk-definition, .is-style-kk-definition) { background: #f4f4f4; }

/* Tipp – kék */
:is(.entry-content, .editor-styles-wrapper) :is(.kk-tip, .is-style-kk-tip) { background: #eef4fb; }
:is(.entry-content, .editor-styles-wrapper) :is(.kk-tip, .is-style-kk-tip) :is(.kk-box-title, .is-style-kk-box-title)::before { background: var(--kk-blue); }

/* A gyakorlatban – sötétebb kék */
:is(.entry-content, .editor-styles-wrapper) :is(.kk-practice, .is-style-kk-practice) { background: #e6eef8; }
:is(.entry-content, .editor-styles-wrapper) :is(.kk-practice, .is-style-kk-practice) :is(.kk-box-title, .is-style-kk-box-title)::before { background: var(--kk-blue-dark); }

/* Figyelmeztetés / korlát – sötét narancs */
:is(.entry-content, .editor-styles-wrapper) :is(.kk-warning, .is-style-kk-warning) { background: #fdeee8; }
:is(.entry-content, .editor-styles-wrapper) :is(.kk-warning, .is-style-kk-warning) :is(.kk-box-title, .is-style-kk-box-title)::before { background: var(--kk-orange-dark); }

/* Saját vélemény – fehér, vékony keret */
:is(.entry-content, .editor-styles-wrapper) :is(.kk-opinion, .is-style-kk-opinion) { background: #fff; border: 1px solid var(--kk-line); }

/* Ha a szerkesztőben blokkstílust választasz, az felülírja a régi színosztályt */
:is(.entry-content, .editor-styles-wrapper) .kk-box.is-style-kk-summary { background: #fff3ee; border: 0; }
:is(.entry-content, .editor-styles-wrapper) .kk-box.is-style-kk-tip { background: #eef4fb; border: 0; }
:is(.entry-content, .editor-styles-wrapper) .kk-box.is-style-kk-practice { background: #e6eef8; border: 0; }
:is(.entry-content, .editor-styles-wrapper) .kk-box.is-style-kk-warning { background: #fdeee8; border: 0; }
:is(.entry-content, .editor-styles-wrapper) .kk-box.is-style-kk-definition { background: #f4f4f4; border: 0; }
:is(.entry-content, .editor-styles-wrapper) .kk-box.is-style-kk-opinion { background: #fff; border: 1px solid var(--kk-line); }
:is(.entry-content, .editor-styles-wrapper) .kk-box.is-style-kk-summary .kk-box-title::before { background: var(--kk-orange); }
:is(.entry-content, .editor-styles-wrapper) .kk-box.is-style-kk-tip .kk-box-title::before { background: var(--kk-blue); }
:is(.entry-content, .editor-styles-wrapper) .kk-box.is-style-kk-practice .kk-box-title::before { background: var(--kk-blue-dark); }
:is(.entry-content, .editor-styles-wrapper) .kk-box.is-style-kk-warning .kk-box-title::before { background: var(--kk-orange-dark); }
:is(.entry-content, .editor-styles-wrapper) .kk-box:is(.is-style-kk-definition, .is-style-kk-opinion) .kk-box-title::before { background: var(--kk-gray); }

/* --- Táblázat --- */
:is(.entry-content, .editor-styles-wrapper) :is(.kk-table, .is-style-kk-table) { margin: 1.8em 0; overflow-x: auto; }
:is(.entry-content, .editor-styles-wrapper) :is(.kk-table, .is-style-kk-table) table { width: 100%; border: 0; border-collapse: collapse; border-radius: 0; font-size: .95em; background: #fff; }
:is(.entry-content, .editor-styles-wrapper) :is(.kk-table, .is-style-kk-table) :is(thead, tbody, tr) { border: 0; }
:is(.entry-content, .editor-styles-wrapper) :is(.kk-table, .is-style-kk-table) :is(th, td) { border: 0; text-align: left; vertical-align: top; padding: .6em .75em; }
:is(.entry-content, .editor-styles-wrapper) :is(.kk-table, .is-style-kk-table) thead th { background: #eef4fb; color: var(--kk-blue-dark); font-family: Oswald, Impact, "Arial Narrow", sans-serif; font-weight: 600; }
:is(.entry-content, .editor-styles-wrapper) :is(.kk-table, .is-style-kk-table) td { border-bottom: 1px solid var(--kk-line); }
:is(.entry-content, .editor-styles-wrapper) :is(.kk-table, .is-style-kk-table) figcaption { font-size: .85em; color: var(--kk-gray); margin-top: .6em; text-align: left; }

/* --- Képhely és szerkesztői teendő (publikálás előtt törlendő, ezért feltűnő) --- */
:is(.entry-content, .editor-styles-wrapper) .kk-image-slot { border: 2px dashed var(--kk-orange); border-radius: 2px; padding: 1em 1.2em; margin: 1.6em 0; background: #fffaf8; }
:is(.entry-content, .editor-styles-wrapper) .kk-image-slot p { margin: .2em 0; font-size: .9em; }
:is(.entry-content, .editor-styles-wrapper) .kk-image-slot-id { font-family: Oswald, Impact, "Arial Narrow", sans-serif; text-transform: uppercase; color: var(--kk-orange); }
:is(.entry-content, .editor-styles-wrapper) .kk-image-slot-caption { color: var(--kk-gray); font-style: italic; }
:is(.entry-content, .editor-styles-wrapper) :is(.kk-placeholder, .is-style-kk-placeholder) { border: 2px dashed #e0a100; background: #fff8e6; border-radius: 2px; padding: 1em 1.2em; margin: 1.6em 0; }

/* --- Marketing Hub CTA (cikkközi és cikk végi): szürke panel, zöld gomb --- */
:is(.entry-content, .editor-styles-wrapper) .kk-cta { margin: 2em 0; padding: 1.5em 1.6em; border: 0; border-radius: 2px; background: var(--kk-gray); color: #fff; }
:is(.entry-content, .editor-styles-wrapper) .kk-cta :is(p, .kk-cta-title, .kk-cta-text) { color: #fff; }
:is(.entry-content, .editor-styles-wrapper) .kk-cta .kk-cta-kicker { color: #41b0f6; }
:is(.entry-content, .editor-styles-wrapper) .kk-cta a:not(.kk-cta-button) { color: #fff; }
:is(.entry-content, .editor-styles-wrapper) .kk-cta .kk-cta-button:is(:link, :visited) { background: #049c00; color: #fff; border-radius: 2px; }
:is(.entry-content, .editor-styles-wrapper) .kk-cta .kk-cta-button:is(:hover, :focus) { background: #037000; color: #fff; }
:is(.entry-content, .editor-styles-wrapper) .kk-cta-inline { margin: 2em 0; }

/* --- Egyéb --- */
.entry-content .wp-block-heading[id] { scroll-margin-top: 90px; }

/* Yoast GYIK-blokk: kérdések H3-szerű megjelenéssel */
:is(.entry-content, .editor-styles-wrapper) .schema-faq-section { margin: 0 0 .4em; }
.entry-content .schema-faq-question { display: block; font-size: 1.2em; line-height: 1.35; margin: 1.6em 0 .45em; color: var(--kk-text); }
.entry-content .schema-faq-answer { margin-top: 0; }

@media (max-width: 600px) {
	:is(.entry-content, .editor-styles-wrapper) :is(.kk-box, .kk-toc, [class*="is-style-kk-"]:not(.wp-block-table):not(p)) { padding: 1em 1.1em; }
	:is(.entry-content, .editor-styles-wrapper) .kk-cta { padding: 1.2em; }
	:is(.entry-content, .editor-styles-wrapper) :is(.kk-table, .is-style-kk-table) table { font-size: .88em; }
}
