/*
 * LPGen — namespaced shell CSS (header/footer + shortcode-embed form styling).
 * Everything here is scoped under ltcalp-shell-*/ltcalp-header-*/ltcalp-footer-* classes
 * (spec pt. 9) — never touches bare html/body/*/button/input/a selectors, so it can never
 * bleed onto whatever the LP author's own CSS does inside .ltcalp-root.
 */

:root {
    --ltcalp-shell-primary: #bf844d;
    --ltcalp-shell-primary-hover: #ad804a;
    --ltcalp-shell-dark: #1f2430;
    --ltcalp-shell-text: #2b2b2b;
    --ltcalp-shell-muted: #6b6b6b;
    --ltcalp-shell-border: #e6e1da;
    --ltcalp-shell-bg: #ffffff;
}

.ltcalp-shell-draft-badge {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100000;
    background: #d9822b;
    color: #fff;
    text-align: center;
    font: 600 12px/1 system-ui, sans-serif;
    letter-spacing: 0.08em;
    padding: 6px 0;
}

/* ---------------------------------------------------------------- */
/* "Osadź jako treść w layoucie" (embed mode)                        */
/* ---------------------------------------------------------------- */

/* Same draft notice as .ltcalp-shell-draft-badge, but anchored to the bottom of the
   viewport instead of the top — a fixed bar across the top of a real site page (header,
   nav, breadcrumbs already living there) reads as if it belongs to the SITE, not the LP
   draft notice specifically. */
.ltcalp-embed-draft-badge {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100000;
    background: #d9822b;
    color: #fff;
    text-align: center;
    font: 600 12px/1 system-ui, sans-serif;
    letter-spacing: 0.08em;
    padding: 6px 0;
}

/* Scoped to .ltcalp-embed-entry specifically (not bare .entry-content.container-fluid) so
   this never affects a normal CPT "Page" post, which reuses the exact same two classes. */
.ltcalp-embed-entry.entry-content.container-fluid {
    margin: 0;
    padding: 0;
    max-width: 100vw !important;
}

/* CSS isolation for LP content embedded this way. Its own SELECTORS are all ltcalp-prefixed
   and never collide with the site's — but plain CSS INHERITANCE doesn't care about selectors:
   font-family/color/font-size/line-height etc. set on the site's body/Bootstrap still cascade
   straight down onto .ltcalp-root and everything inside it, since (unlike the other modes)
   this one shares a real DOM tree with the main layout instead of being its own isolated
   document.
   IMPORTANT: this reset lives on .ltcalp-embed-entry (the wrapper we own), NOT on .ltcalp-root
   itself. AI-generated LPs routinely set their own font-family/font-size/line-height directly
   on ".ltcalp-root" (e.g. `.ltcalp-root{font-family:var(--ltcalp-f-body); font-size:17px}`) —
   putting our reset on ".ltcalp-embed-entry .ltcalp-root" (two classes) would outrank that
   single-class author rule by CSS specificity regardless of load order, wiping out their
   intentional styling along with the site's unwanted one. Resetting the PARENT instead just
   changes what .ltcalp-root would inherit if the author's CSS doesn't set something — anything
   the author's CSS DOES set on .ltcalp-root/its descendants continues to apply completely
   unaffected, exactly as it would in a standalone document. */
.ltcalp-embed-entry {
    font-family: initial;
    font-size: initial;
    font-weight: initial;
    font-style: initial;
    line-height: initial;
    letter-spacing: initial;
    color: initial;
    text-align: initial;
    text-transform: initial;
    text-decoration: initial;
    white-space: initial;
}

/* The .ltcalp-embed-entry reset above only stops INHERITANCE bleed — it does nothing about
   the site's own rules that target a bare tag selector DIRECTLY (e.g. index.css's
   `.entry-content h2{color:#333}`, which matches any <h2> inside our own .entry-content
   wrapper regardless of ancestors, since that's a direct match, not inheritance). Those need
   an equally- (or more-) specific counter-rule. Scoped at ".ltcalp-root <tag>" — the SAME
   specificity tier (one class + one type selector) LP authors themselves commonly use for
   this (e.g. the real example this was found from: ".ltcalp-root h1, .ltcalp-root h2, ...").
   On a tie, source order decides — this file loads AFTER the site's own CSS but BEFORE the
   LP's own extracted CSS (see extractHeadAssets()), so it beats the site's direct-match rules
   while still losing gracefully to whatever the LP's own CSS explicitly sets on these same
   elements. `inherit` hands control back to normal cascade from .ltcalp-root (or a nested
   wrapper) down, exactly as in a standalone document — never touches non-inherited box
   properties (margin/padding/border), which AI-generated LPs already set explicitly. */
.ltcalp-root h1, .ltcalp-root h2, .ltcalp-root h3, .ltcalp-root h4, .ltcalp-root h5, .ltcalp-root h6,
.ltcalp-root p, .ltcalp-root a, .ltcalp-root span, .ltcalp-root li, .ltcalp-root ul, .ltcalp-root ol,
.ltcalp-root dl, .ltcalp-root dt, .ltcalp-root dd, .ltcalp-root blockquote, .ltcalp-root strong,
.ltcalp-root b, .ltcalp-root em, .ltcalp-root i, .ltcalp-root small, .ltcalp-root label,
.ltcalp-root figcaption, .ltcalp-root caption, .ltcalp-root td, .ltcalp-root th,
.ltcalp-root button, .ltcalp-root input, .ltcalp-root textarea, .ltcalp-root select,
.ltcalp-root cite, .ltcalp-root time, .ltcalp-root address {
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    font-style: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    text-align: inherit;
    text-transform: inherit;
}

/* front.css forces links with e.g. `.entry-content a{color:#333 !important;
   text-decoration:none !important}` — !important always wins over a non-important rule
   REGARDLESS of specificity, so the plain "inherit" reset above can't beat it; only another
   !important declaration can. Scoped narrowly to just <a> and only the two properties that
   rule actually forces, to minimize overriding some future LP's own deliberate !important use
   elsewhere. `inherit` for text-decoration resolves to "none" absent another rule (most
   containers don't set it), matching the common no-underline convention for styled LP links
   anyway; a specific LP that truly wants underlined links can still override this normally
   (same specificity, later in the cascade — see extractHeadAssets()) as long as it also uses
   !important, exactly like fighting any other !important rule from the host page would need. */
.ltcalp-root a {
    color: inherit !important;
    text-decoration: inherit !important;
}

/* ---------------------------------------------------------------- */
/* Header — full                                                     */
/* ---------------------------------------------------------------- */
.ltcalp-header-full {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px 32px;
    background: var(--ltcalp-shell-bg);
    border-bottom: 1px solid var(--ltcalp-shell-border);
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    position: relative;
    z-index: 10000;
}

.ltcalp-header-full__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ltcalp-shell-text);
    font-weight: 700;
    font-size: 18px;
}

.ltcalp-header-full__brand img {
    height: 36px;
    width: auto;
    display: block;
}

.ltcalp-header-full__nav {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.ltcalp-header-full__nav a {
    color: var(--ltcalp-shell-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.ltcalp-header-full__nav a:hover {
    color: var(--ltcalp-shell-primary);
}

.ltcalp-header-full__cta {
    background: var(--ltcalp-shell-primary);
    color: #fff;
    border-radius: 6px;
    padding: 9px 18px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.ltcalp-header-full__cta:hover {
    background: var(--ltcalp-shell-primary-hover);
    color: #fff;
}

.ltcalp-header-full__toggle {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--ltcalp-shell-text);
    cursor: pointer;
}

@media (max-width: 860px) {
    .ltcalp-header-full__nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: var(--ltcalp-shell-bg);
        border-bottom: 1px solid var(--ltcalp-shell-border);
        padding: 8px 0;
    }

    .ltcalp-header-full__nav.ltcalp-is-open {
        display: flex;
    }

    .ltcalp-header-full__nav a {
        padding: 12px 24px;
        width: 100%;
        display: block;
    }

    .ltcalp-header-full__toggle {
        display: block;
    }
}

/* ---------------------------------------------------------------- */
/* Header — mini                                                     */
/* ---------------------------------------------------------------- */
.ltcalp-header-mini {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    background: var(--ltcalp-shell-bg);
    border-bottom: 1px solid var(--ltcalp-shell-border);
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.ltcalp-header-mini__link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--ltcalp-shell-muted);
    font-size: 13px;
}

.ltcalp-header-mini__link img {
    height: 22px;
    width: auto;
}

.ltcalp-header-mini__link:hover {
    color: var(--ltcalp-shell-primary);
}

/* ---------------------------------------------------------------- */
/* Footer — full                                                     */
/* ---------------------------------------------------------------- */
.ltcalp-footer-full {
    background: var(--ltcalp-shell-dark);
    color: #cfd3da;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    padding: 40px 32px 20px;
}

.ltcalp-footer-full__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.ltcalp-footer-full__col h4 {
    color: #fff;
    font-size: 14px;
    margin: 0 0 12px;
}

.ltcalp-footer-full__col a {
    display: block;
    color: #cfd3da;
    text-decoration: none;
    font-size: 13px;
    margin-bottom: 8px;
}

.ltcalp-footer-full__col a:hover {
    color: var(--ltcalp-shell-primary);
}

.ltcalp-footer-full__bottom {
    max-width: 1100px;
    margin: 24px auto 0;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
    color: #9ca0a8;
    text-align: center;
}

/* ---------------------------------------------------------------- */
/* Footer — mini                                                     */
/* ---------------------------------------------------------------- */
.ltcalp-footer-mini {
    background: var(--ltcalp-shell-dark);
    color: #cfd3da;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    text-align: center;
    padding: 16px;
    font-size: 12px;
}

.ltcalp-footer-mini a {
    color: #cfd3da;
}

.ltcalp-footer-mini img {
    height: 20px;
    display: inline-block;
    margin-bottom: 6px;
}

/* ---------------------------------------------------------------- */
/* Minimal scoped form styling for embedded shortcodes (e.g.          */
/* [contact-form]) — just enough for the Bootstrap-flavoured markup   */
/* those shortcode views render (form-group/form-control/btn) to be   */
/* usable, without pulling in the whole site's Bootstrap bundle.      */
/* ---------------------------------------------------------------- */
.ltcalp-root form .form-group {
    margin-bottom: 14px;
}

.ltcalp-root form label {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
    font-weight: 600;
}

.ltcalp-root form .form-control {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1px solid var(--ltcalp-shell-border, #ccc);
    border-radius: 4px;
    font-size: 14px;
}

.ltcalp-root form .btn {
    display: inline-block;
    border: none;
    border-radius: 6px;
    padding: 9px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.ltcalp-root form .btn-primary {
    background: var(--ltcalp-shell-primary, #bf844d);
    color: #fff;
}

.ltcalp-root form .invalid-feedback {
    color: #c0392b;
    font-size: 12px;
    display: block;
    margin-top: 4px;
}

.ltcalp-root form .is-invalid .form-control {
    border-color: #c0392b;
}
