/* Cookie consent, light theme, branded for Slamena Buda.

   Base file: FOX Development light-theme package
   (~/Documents/AL/adam.lukacka.com/assets/cookieconsent-light-package).
   Loaded AFTER the library CSS so it can override it.

   Three things changed from the source package:
     1. --fox-orange -> the site's espresso brown, so the buttons match
        .btn-primary instead of introducing a second accent colour.
     2. The font follows the site (Hanken Grotesk), not Outfit.
     3. The bar's inner width follows .wrap (1280px + 28px gutters), not
        Bootstrap's container breakpoints. This site does not use Bootstrap,
        so the original 1320/1140/960/720 steps would not have lined up with
        anything on the page.
*/

:root {
  /* The package keys every accent off --fox-orange. Point it at the brand. */
  --fox-orange: #3D1B0D;
}

/* ===== Cookie Consent - FOX Light Theme ===== */
#cc-main {
    --cc-bg: rgba(255, 255, 255, 0.92);
    --cc-primary-color: #2a2a2e;
    --cc-secondary-color: #5a5a66;
    --cc-btn-primary-bg: var(--fox-orange, #ff6b2c);
    --cc-btn-primary-color: #fff;
    --cc-btn-primary-hover-bg: #54281A;
    --cc-btn-secondary-bg: rgba(0, 0, 0, 0.06);
    --cc-btn-secondary-color: #333;
    --cc-btn-secondary-hover-bg: rgba(0, 0, 0, 0.12);
    --cc-separator-border-color: rgba(0, 0, 0, 0.08);
    --cc-toggle-on-bg: var(--fox-orange, #ff6b2c);
    --cc-toggle-off-bg: #c0c0c8;
    --cc-toggle-on-knob-bg: #fff;
    --cc-toggle-off-knob-bg: #fff;
    --cc-cookie-category-block-bg: rgba(0, 0, 0, 0.03);
    --cc-cookie-category-block-hover-bg: rgba(0, 0, 0, 0.06);
    --cc-footer-bg: rgba(0, 0, 0, 0.03);
    --cc-footer-color: #6a6a75;
    --cc-footer-border-color: rgba(0, 0, 0, 0.08);
    --cc-overlay-bg: rgba(0, 0, 0, 0.45);
    --cc-font-family: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --cc-modal-border-radius: 0;
    --cc-btn-border-radius: 6px;
    --cc-font-size: 0.84rem;
}

/* Consent bar - matches Bootstrap .container width exactly */
#cc-main .cm,
#cc-main .cm.cm--bar,
#cc-main .cm.cm--bar.cm--inline {
    max-width: 100% !important;
    width: 100% !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: none !important;
    border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 0 !important;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.1);
}

/* Body matches Bootstrap .container responsive widths */
#cc-main .cm__body,
#cc-main .cm.cm--bar .cm__body,
#cc-main .cm.cm--bar.cm--inline .cm__body {
    max-width: 1280px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 1.1rem 12px !important;
    display: flex !important;
    align-items: center !important;
    gap: 2rem !important;
    box-sizing: border-box !important;
}
@media (max-width: 1399.98px) {
    #cc-main .cm__body,
    #cc-main .cm.cm--bar .cm__body,
    #cc-main .cm.cm--bar.cm--inline .cm__body {
        max-width: 1280px !important;
    }
}
@media (max-width: 1199.98px) {
    #cc-main .cm__body,
    #cc-main .cm.cm--bar .cm__body {
        max-width: 1280px !important;
    }
}
@media (max-width: 991.98px) {
    #cc-main .cm__body,
    #cc-main .cm.cm--bar .cm__body {
        max-width: 1280px !important;
    }
}

/* Text container — no extra padding from library */
#cc-main .cm__texts,
#cc-main .cm.cm--bar .cm__texts,
#cc-main .cm.cm--bar.cm--inline .cm__texts {
    flex: 1;
    min-width: 0;
    padding: 0 !important;
    margin: 0 !important;
}
#cc-main .cm__title,
#cc-main .cm.cm--bar .cm__title {
    font-size: 0.92rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    padding: 0 !important;
    color: #2a2a2e;
}
#cc-main .cm__desc,
#cc-main .cm.cm--bar .cm__desc {
    font-size: 0.8rem;
    line-height: 1.5;
    opacity: 0.75;
    padding: 0 !important;
    margin: 0 !important;
    color: #5a5a66;
}
/* Override library's combined title+desc horizontal padding */
#cc-main .cm__desc,
#cc-main .cm__title {
    padding: 0 !important;
}

/* Button container — always row, never wrap, no max-width limit */
#cc-main .cm__btns,
#cc-main .cm.cm--bar .cm__btns,
#cc-main .cm.cm--bar.cm--inline .cm__btns,
#cc-main .cm--bar.cm--inline .cm__btns {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 0.5rem !important;
    flex-shrink: 0 !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
}

/* Kill library's margin-top on adjacent buttons and button groups */
#cc-main .cm__btn + .cm__btn,
#cc-main [class*="cm__btn-group"] + [class*="cm__btn-group"] {
    margin-top: 0 !important;
    margin: 0 !important;
}

/* Button groups — size to content, not 50/50 split */
#cc-main [class*="cm__btn-group"] {
    flex: none !important;
    gap: 0.5rem !important;
}

/* All buttons — auto width so text fits, no overflow clipping */
#cc-main .cm .cm__btn,
#cc-main .cm.cm--bar .cm__btn,
#cc-main .cm.cm--bar.cm--inline .cm__btn,
#cc-main .cm .cm__btn[data-role] {
    font-family: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-size: 0.82rem !important;
    font-weight: 500 !important;
    padding: 0.45rem 1.1rem !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: unset !important;
    width: auto !important;
    min-width: fit-content !important;
    max-width: none !important;
    flex: 0 0 auto !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    line-height: 1.4 !important;
    text-align: center !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
}

/* Primary button (Povoliť všetko / Accept all) — solid orange */
#cc-main .cm .cm__btn[data-role="all"] {
    background: var(--fox-orange, #ff6b2c) !important;
    color: #fff !important;
    border: 1px solid var(--fox-orange, #ff6b2c) !important;
}
#cc-main .cm .cm__btn[data-role="all"]:hover {
    background: #54281A !important;
    border-color: #54281A !important;
}

/* Secondary button (Odmietnuť všetko / Reject all) — solid orange, same as primary */
#cc-main .cm .cm__btn[data-role="necessary"] {
    background: var(--fox-orange, #ff6b2c) !important;
    color: #fff !important;
    border: 1px solid var(--fox-orange, #ff6b2c) !important;
}
#cc-main .cm .cm__btn[data-role="necessary"]:hover {
    background: #54281A !important;
    border-color: #54281A !important;
}

/* Tertiary button (Prispôsobiť / Customize) — ghost outline */
#cc-main .cm .cm__btn[data-role="show"] {
    background: transparent !important;
    color: rgba(0, 0, 0, 0.5) !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
}
#cc-main .cm .cm__btn[data-role="show"]:hover {
    color: #333 !important;
    border-color: rgba(0, 0, 0, 0.3) !important;
    background: rgba(0, 0, 0, 0.04) !important;
}

/* Mobile responsive */
@media (max-width: 767.98px) {
    #cc-main .cm__body,
    #cc-main .cm.cm--bar .cm__body {
        flex-direction: column !important;
        gap: 0.75rem !important;
        padding: 1.2rem 1rem !important;
        max-width: 100% !important;
    }
    #cc-main .cm__btns,
    #cc-main .cm.cm--bar .cm__btns,
    #cc-main .cm.cm--box .cm__btns {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        gap: 0.4rem !important;
        border: none !important;
    }
    #cc-main .cm__btn-group,
    #cc-main .cm .cm__btn-group,
    #cc-main .cm.cm--bar .cm__btn-group,
    #cc-main .cm [class*="cm__btn-group"] {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        flex: none !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        gap: 0.4rem !important;
    }
    #cc-main .cm .cm__btn,
    #cc-main .cm.cm--box .cm__btn,
    #cc-main .cm.cm--bar .cm__btn,
    #cc-main .cm [class*="cm__btn--"] {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        width: auto !important;
        padding: 0.4rem 0.25rem !important;
        font-size: 0.72rem !important;
        white-space: nowrap !important;
        text-align: center !important;
        margin: 0 !important;
        border-radius: 6px !important;
    }
    #cc-main .cm .cm__btn[data-role="all"] {
        margin-right: 0 !important;
    }
}

/* Preferences modal */
#cc-main .pm {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.95);
}
#cc-main .pm__title {
    font-size: 1.1rem;
    color: #2a2a2e;
}
#cc-main .pm__section-desc,
#cc-main .pm__section-title {
    font-size: 0.85rem;
}

#cc-main .cc-link {
    color: var(--fox-orange, #ff6b2c);
}
#cc-main .cc-link:hover {
    color: #54281A;
}

/* Cookie settings button (floating) */
#cookie-settings-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 999;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f0f0f3;
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--fox-orange, #ff6b2c);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.7;
}
#cookie-settings-btn:hover {
    opacity: 1;
    background: var(--fox-orange, #ff6b2c);
    color: #fff;
    transform: scale(1.1);
}


/* ---------- SLAMENA BUDA ADDITIONS ---------- */

/* The floating settings button in the package is styled for a Bootstrap icon.
   This one carries an inline SVG and follows the site's shape language. */
#cookie-settings-btn {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 150;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line, #DCD0B8);
  background: var(--paper, #F6F1E5);
  color: var(--brown, #3D1B0D);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(61, 27, 13, .16);
  opacity: .78;
  transition: opacity .2s ease, transform .2s ease;
}

#cookie-settings-btn:hover,
#cookie-settings-btn:focus-visible {
  opacity: 1;
  transform: translateY(-1px);
}

#cookie-settings-btn svg { width: 18px; height: 18px; }

/* Keep it clear of the map controls and the lightbox on small screens. */
@media (max-width: 700px) {
  #cookie-settings-btn { width: 36px; height: 36px; left: 14px; bottom: 14px; }
}

body.gal-lb-open #cookie-settings-btn { display: none; }

/* ---------- NARROW PHONES: LET THE BUTTON ROW WRAP ---------- */
/* The package pins .cm__btns to flex-wrap:nowrap and the buttons to
   flex:0 0 auto with white-space:nowrap, so they cannot shrink. That is fine at
   Bootstrap widths, but at 375px the three Slovak labels total 369px inside a
   351px container: "Povoliť všetko" started at -4px and "Prispôsobiť" ended at
   379px, both clipped.

   Structure is .cm__btns > .cm__btn-group(all + necessary) + .cm__btn-group(show).
   Below 560px each group takes its own full-width row: accept and reject stay
   side by side and equally prominent (which is the point, legally), and
   customise sits underneath. Also gives every button a 44px touch target. */
@media (max-width: 560px) {
  /* The package's non-media rule includes
     `#cc-main .cm.cm--bar.cm--inline .cm__btns` (one id + four classes) with
     !important. The bar really does carry cm cm--bar cm--inline, so that
     selector outranked a three-class one and nowrap survived. Matching its
     specificity is what makes the wrap stick. */
  #cc-main .cm__btns,
  #cc-main .cm.cm--bar .cm__btns,
  #cc-main .cm.cm--box .cm__btns,
  #cc-main .cm.cm--bar.cm--inline .cm__btns,
  #cc-main .cm--bar.cm--inline .cm__btns {
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
  }

  #cc-main .cm__btn-group,
  #cc-main .cm .cm__btn-group,
  #cc-main .cm.cm--bar .cm__btn-group,
  #cc-main .cm [class*="cm__btn-group"] {
    flex: 1 0 100% !important;
    width: 100% !important;
    gap: 0.5rem !important;
  }

  #cc-main .cm .cm__btn,
  #cc-main .cm.cm--bar .cm__btn,
  #cc-main .cm.cm--box .cm__btn {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    min-height: 44px !important;
    padding: 0.55rem 0.5rem !important;
  }
}
