/**
 * ALUPOL Cookie Consent & Privacy Manager - Frontend CSS
 * Vizuálně sladěno s webem www.alupol.cz (Tmavý podklad #1c2333, žluté CTA #FFEA00)
 * Kompletně izolováno a imunní vůči přepisování z Elementoru a šablon
 */

:root {
    --alupol-c-bg: #141923;
    --alupol-c-card: #1c2333;
    --alupol-c-card-elevated: #242c40;
    --alupol-c-border: rgba(255, 255, 255, 0.1);
    --alupol-c-border-subtle: rgba(255, 255, 255, 0.06);
    --alupol-c-yellow: #FFEA00;
    --alupol-c-yellow-hover: #f2dc00;
    --alupol-c-yellow-text: #0D0C22;
    --alupol-c-blue: #0096FF;
    --alupol-c-text: #FFFFFF;
    --alupol-c-muted: #9aa5b8;
    --alupol-c-radius: 18px;
    --alupol-c-radius-sm: 8px;
    --alupol-c-font: "Plus Jakarta Sans", "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --alupol-c-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   RESET & WRAPPER
   ========================================================================== */
#alupol-cookie-root,
#alupol-cookie-root * {
    box-sizing: border-box !important;
}

#alupol-cookie-root {
    font-family: var(--alupol-c-font) !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 999999 !important;
    display: flex !important;
    pointer-events: none !important;
    transition: opacity 0.3s ease, visibility 0.3s ease !important;
    padding: 0 !important;
    margin: 0 !important;
}

#alupol-cookie-root.is-open {
    pointer-events: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
}

#alupol-cookie-root:not(.is-open) {
    opacity: 0 !important;
    visibility: hidden !important;
}

/* BACKDROP OVERLAY */
#alupol-cookie-root .alupol-cookie-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(13, 12, 34, 0.65) !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
}

#alupol-cookie-root.is-open .alupol-cookie-overlay {
    opacity: 1 !important;
}

#alupol-cookie-root.has-backdrop-blur .alupol-cookie-overlay {
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
}

/* ==========================================================================
   CARD LAYOUTS & POSITIONS
   ========================================================================== */
#alupol-cookie-root .alupol-cookie-card {
    position: relative !important;
    z-index: 2 !important;
    background: #1c2333 !important;
    color: #FFFFFF !important;
    box-shadow: var(--alupol-c-shadow) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 18px !important;
    padding: 2.2rem 2.2rem 1.8rem !important;
    display: flex !important;
    flex-direction: column !important;
    max-width: 540px !important;
    width: calc(100% - 2rem) !important;
    margin: auto !important;
    transform: translateY(20px) scale(0.97) !important;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease !important;
}

#alupol-cookie-root.is-open .alupol-cookie-card {
    transform: translateY(0) scale(1) !important;
}

/* Pozice: Spodní lišta */
#alupol-cookie-root.pos-bottom-bar {
    align-items: flex-end !important;
}
#alupol-cookie-root.pos-bottom-bar .alupol-cookie-card {
    max-width: 860px !important;
    margin-bottom: 1.5rem !important;
}

/* Pozice: Spodní rohová karta */
#alupol-cookie-root.pos-bottom-box {
    align-items: flex-end !important;
    justify-content: flex-start !important;
}
#alupol-cookie-root.pos-bottom-box .alupol-cookie-card {
    max-width: 480px !important;
    margin: 1.5rem !important;
}

/* ==========================================================================
   HEADER & OFFICIAL ALUPOL LOGO
   ========================================================================== */
#alupol-cookie-root .alupol-card-header {
    margin-bottom: 1.25rem !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
}

#alupol-cookie-root .alupol-brand-row {
    display: flex !important;
    align-items: center !important;
    gap: 0.9rem !important;
    margin-bottom: 1rem !important;
}

#alupol-cookie-root .alupol-brand-logo-badge {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    padding: 2px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
    -webkit-mask-image: -webkit-radial-gradient(white, black) !important;
    mask-image: radial-gradient(white, black) !important;
    transform: translateZ(0) !important;
}

#alupol-cookie-root .alupol-brand-logo-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    display: block !important;
    border-radius: 50% !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}

#alupol-cookie-root .alupol-brand-meta {
    display: flex !important;
    flex-direction: column !important;
    line-height: 1.2 !important;
}

#alupol-cookie-root .alupol-brand-name {
    font-size: 1.15rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.04em !important;
    color: #FFFFFF !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
}

#alupol-cookie-root .alupol-brand-tagline {
    font-size: 0.75rem !important;
    text-transform: uppercase !important;
    letter-spacing: 1.2px !important;
    color: #9aa5b8 !important;
    font-weight: 600 !important;
    margin-top: 2px !important;
    padding: 0 !important;
    line-height: 1.2 !important;
}

/* TITULEK MODALU - OCHRANA PROTI ELEMENTOR H2 */
#alupol-cookie-root h2.alupol-card-title,
#alupol-cookie-root .alupol-card-title,
#alupol-cookie-root h2 {
    font-size: 1.35rem !important;
    font-weight: 700 !important;
    color: #FFFFFF !important;
    margin: 0 0 0.5rem 0 !important;
    padding: 0 !important;
    line-height: 1.3 !important;
    letter-spacing: -0.02em !important;
    border: none !important;
    background: transparent !important;
    text-shadow: none !important;
}

/* ==========================================================================
   BODY & TEXT
   ========================================================================== */
#alupol-cookie-root .alupol-card-body {
    font-size: 0.9375rem !important;
    line-height: 1.6 !important;
    color: #9aa5b8 !important;
    margin-bottom: 1.5rem !important;
    padding: 0 !important;
    background: transparent !important;
}

#alupol-cookie-root p.alupol-card-desc,
#alupol-cookie-root .alupol-card-desc,
#alupol-cookie-root p {
    margin: 0 !important;
    padding: 0 !important;
    color: #9aa5b8 !important;
    font-size: 0.9375rem !important;
    line-height: 1.6 !important;
}

/* ==========================================================================
   BUTTONS & ACTIONS - OCHRANA PROTI ELEMENTOR BUTTON STYLES
   ========================================================================== */
#alupol-cookie-root .alupol-card-footer {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.9rem !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
    padding-top: 1.25rem !important;
    margin: 0 !important;
    background: transparent !important;
}

#alupol-cookie-root .alupol-btn-group {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1.2fr !important;
    gap: 0.625rem !important;
    width: 100% !important;
}

/* Základní reset všech tlačítek v modalu */
#alupol-cookie-root button.alupol-btn,
#alupol-cookie-root .alupol-btn {
    appearance: none !important;
    -webkit-appearance: none !important;
    border: none !important;
    font-family: inherit !important;
    font-size: 0.875rem !important;
    font-weight: 700 !important;
    padding: 0.8rem 1rem !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    text-align: center !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    text-shadow: none !important;
    line-height: 1.2 !important;
    outline: none !important;
    letter-spacing: normal !important;
}

/* 1. Hlavní žluté CTA (PŘIJMOUT VŠE) */
#alupol-cookie-root button.alupol-btn-primary,
#alupol-cookie-root .alupol-btn-primary {
    background-color: #FBBF24 !important;
    background: #FBBF24 !important;
    color: #0F172A !important;
    font-weight: 800 !important;
    border: 1px solid #FBBF24 !important;
    border-radius: 9px !important;
    box-shadow: 0 4px 14px rgba(251, 191, 36, 0.28) !important;
}
#alupol-cookie-root button.alupol-btn-primary:hover,
#alupol-cookie-root .alupol-btn-primary:hover {
    background-color: #F59E0B !important;
    background: #F59E0B !important;
    border-color: #F59E0B !important;
    color: #0F172A !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 18px rgba(251, 191, 36, 0.45) !important;
}

/* 2. Tmavé tlačítko (ODMÍTNOUT VŠE) - OCHRANA PROTI ŽLUTÉMU POZADÍ */
#alupol-cookie-root button.alupol-btn-secondary,
#alupol-cookie-root .alupol-btn-secondary {
    background-color: rgba(255, 255, 255, 0.08) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    color: #FFFFFF !important;
    font-weight: 700 !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    box-shadow: none !important;
}
#alupol-cookie-root button.alupol-btn-secondary:hover,
#alupol-cookie-root .alupol-btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.15) !important;
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
    color: #FFFFFF !important;
}

/* 3. Tmavé průhledné tlačítko (NASTAVENÍ) - OCHRANA PROTI ŽLUTÉMU POZADÍ */
#alupol-cookie-root button.alupol-btn-ghost,
#alupol-cookie-root .alupol-btn-ghost {
    background-color: transparent !important;
    background: transparent !important;
    color: #9aa5b8 !important;
    font-weight: 700 !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    box-shadow: none !important;
}
#alupol-cookie-root button.alupol-btn-ghost:hover,
#alupol-cookie-root .alupol-btn-ghost:hover {
    color: #FFFFFF !important;
    border-color: rgba(255, 255, 255, 0.32) !important;
    background-color: rgba(255, 255, 255, 0.06) !important;
    background: rgba(255, 255, 255, 0.06) !important;
}

/* ODKAZ NA ZÁSADY SOUKROMÍ */
#alupol-cookie-root .alupol-policy-link-box {
    text-align: center !important;
    font-size: 0.8125rem !important;
    margin: 0 !important;
    padding: 0 !important;
}
#alupol-cookie-root .alupol-policy-link-box a {
    color: #9aa5b8 !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
    background: transparent !important;
    border: none !important;
    font-weight: 500 !important;
}
#alupol-cookie-root .alupol-policy-link-box a:hover {
    color: #FFEA00 !important;
    text-decoration: underline !important;
}

/* ==========================================================================
   DETAILNÍ KROK NASTAVENÍ (PREFERENCES)
   ========================================================================== */
#alupol-cookie-root .alupol-back-button {
    background: none !important;
    border: none !important;
    color: #9aa5b8 !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin-bottom: 0.5rem !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.35rem !important;
    transition: color 0.2s ease !important;
    box-shadow: none !important;
}
#alupol-cookie-root .alupol-back-button:hover {
    color: #FFEA00 !important;
}

#alupol-cookie-root .alupol-details-scroll {
    max-height: 380px !important;
    overflow-y: auto !important;
    padding-right: 0.5rem !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.875rem !important;
}
#alupol-cookie-root .alupol-details-scroll::-webkit-scrollbar {
    width: 6px !important;
}
#alupol-cookie-root .alupol-details-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15) !important;
    border-radius: 999px !important;
}

#alupol-cookie-root .alupol-pref-item {
    background: #242c40 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    padding: 1rem 1.125rem !important;
    margin: 0 !important;
}

#alupol-cookie-root .alupol-pref-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 0.35rem !important;
}

#alupol-cookie-root .alupol-pref-title {
    font-size: 0.9375rem !important;
    color: #FFFFFF !important;
    font-weight: 700 !important;
    margin: 0 0.5rem 0 0 !important;
    padding: 0 !important;
}

#alupol-cookie-root .alupol-badge-always {
    font-size: 0.75rem !important;
    background: rgba(0, 208, 132, 0.15) !important;
    color: #00D084 !important;
    padding: 0.15rem 0.5rem !important;
    border-radius: 9999px !important;
    border: 1px solid rgba(0, 208, 132, 0.3) !important;
    font-weight: 600 !important;
    display: inline-block !important;
}

#alupol-cookie-root .alupol-pref-text {
    font-size: 0.8125rem !important;
    color: #9aa5b8 !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.5 !important;
}

/* PŘEPÍNAČ (TOGGLE SWITCH) */
#alupol-cookie-root .alupol-toggle {
    position: relative !important;
    display: inline-block !important;
    width: 44px !important;
    height: 24px !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}
#alupol-cookie-root .alupol-toggle input {
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    position: absolute !important;
    margin: 0 !important;
}
#alupol-cookie-root .alupol-toggle .toggle-slider {
    position: absolute !important;
    cursor: pointer !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background-color: rgba(255, 255, 255, 0.15) !important;
    transition: .25s !important;
    border-radius: 34px !important;
    border: none !important;
}
#alupol-cookie-root .alupol-toggle .toggle-slider:before {
    position: absolute !important;
    content: "" !important;
    height: 18px !important;
    width: 18px !important;
    left: 3px !important;
    bottom: 3px !important;
    background-color: #FFFFFF !important;
    transition: .25s !important;
    border-radius: 50% !important;
}
#alupol-cookie-root .alupol-toggle input:checked + .toggle-slider {
    background-color: #FFEA00 !important;
}
#alupol-cookie-root .alupol-toggle input:checked + .toggle-slider:before {
    transform: translateX(20px) !important;
    background-color: #0D0C22 !important;
}
#alupol-cookie-root .alupol-toggle.is-locked {
    opacity: 0.7 !important;
    cursor: not-allowed !important;
}
#alupol-cookie-root .alupol-toggle.is-locked .toggle-slider {
    cursor: not-allowed !important;
    background-color: #00D084 !important;
}

/* ==========================================================================
   KOMPAKTNÍ PLOVOUCÍ TLAČÍTKO SE SUŠENKOU (BEZ TEXTU) - MAXIMÁLNÍ SPECIFICITA
   ========================================================================== */
body button#alupol-reconsent-floating-trigger,
body.elementor-page button#alupol-reconsent-floating-trigger,
button#alupol-reconsent-floating-trigger,
#alupol-reconsent-floating-trigger,
body button.alupol-reconsent-trigger,
.alupol-reconsent-trigger,
.alupol-reconsent-btn {
    position: fixed !important;
    z-index: 99998 !important;
    background-color: #1c2333 !important;
    background: #1c2333 !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 50% !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    max-width: 44px !important;
    max-height: 44px !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45) !important;
    outline: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    line-height: 1 !important;
    color: #FFEA00 !important;
    overflow: visible !important;
}

body button#alupol-reconsent-floating-trigger:hover,
#alupol-reconsent-floating-trigger:hover,
body button.alupol-reconsent-trigger:hover,
.alupol-reconsent-trigger:hover,
.alupol-reconsent-btn:hover {
    background-color: #242c40 !important;
    background: #242c40 !important;
    border-color: #FFEA00 !important;
    transform: scale(1.1) !important;
    box-shadow: 0 10px 28px rgba(255, 234, 0, 0.25), 0 4px 12px rgba(0, 0, 0, 0.5) !important;
}

/* Tooltip pro plovoucí tlačítko cookies */
.alupol-reconsent-tooltip {
    position: absolute !important;
    left: calc(100% + 12px) !important;
    top: 50% !important;
    transform: translateY(-50%) translateX(-8px) !important;
    background: #1C2333 !important;
    color: #FFFFFF !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    padding: 0.4rem 0.85rem !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    pointer-events: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.2s ease !important;
    z-index: 99999 !important;
}

.alupol-reconsent-tooltip::before {
    content: '' !important;
    position: absolute !important;
    right: 100% !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    border-width: 5px 6px 5px 0 !important;
    border-style: solid !important;
    border-color: transparent #1C2333 transparent transparent !important;
}

#alupol-reconsent-floating-trigger:hover .alupol-reconsent-tooltip,
.alupol-reconsent-trigger:hover .alupol-reconsent-tooltip,
.alupol-reconsent-btn:hover .alupol-reconsent-tooltip {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(-50%) translateX(0) !important;
}

#alupol-reconsent-floating-trigger svg,
.alupol-reconsent-trigger svg,
.alupol-reconsent-btn svg {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    min-height: 22px !important;
    flex-shrink: 0 !important;
    display: block !important;
    margin: auto !important;
    position: static !important;
    transition: transform 0.25s ease !important;
}

#alupol-reconsent-floating-trigger:hover svg,
.alupol-reconsent-trigger:hover svg,
.alupol-reconsent-btn:hover svg {
    transform: rotate(15deg) !important;
}

/* Pozice vlevo dole */
#alupol-reconsent-floating-trigger.float-bottom-left,
.alupol-reconsent-trigger.float-bottom-left {
    bottom: 24px !important;
    left: 24px !important;
}

/* Automatický posun NAD Google reCAPTCHA v3 odznak (aby nedocházelo k překrytí) */
body:has(.grecaptcha-badge) #alupol-reconsent-floating-trigger.float-bottom-left,
body:has([class*="recaptcha"]) #alupol-reconsent-floating-trigger.float-bottom-left,
body.has-grecaptcha-badge #alupol-reconsent-floating-trigger.float-bottom-left,
#alupol-reconsent-floating-trigger.is-above-recaptcha {
    bottom: 92px !important;
}

/* Pozice vpravo dole */
#alupol-reconsent-floating-trigger.float-bottom-right,
.alupol-reconsent-trigger.float-bottom-right {
    bottom: 24px !important;
    right: 24px !important;
}

body:has(.grecaptcha-badge) #alupol-reconsent-floating-trigger.float-bottom-right,
#alupol-reconsent-floating-trigger.is-above-recaptcha-right {
    bottom: 92px !important;
}

/* ==========================================================================
   RESPONSIVITA (MOBIL & TABLET)
   ========================================================================== */
@media (max-width: 767px) {
    #alupol-cookie-root {
        align-items: flex-end !important;
    }

    #alupol-cookie-root .alupol-cookie-card {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 20px 20px 0 0 !important;
        padding: 1.5rem 1.25rem !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
        transform: translateY(100%) !important;
    }

    #alupol-cookie-root.is-open .alupol-cookie-card {
        transform: translateY(0) !important;
    }

    #alupol-cookie-root h2.alupol-card-title,
    #alupol-cookie-root .alupol-card-title {
        font-size: 1.15rem !important;
    }

    #alupol-cookie-root .alupol-btn-group {
        grid-template-columns: 1fr !important;
        gap: 0.5rem !important;
    }

    #alupol-cookie-root button.alupol-btn,
    #alupol-cookie-root .alupol-btn {
        padding: 0.9rem 1rem !important;
        font-size: 0.9375rem !important;
        width: 100% !important;
    }

    #alupol-cookie-root .alupol-btn-primary {
        order: -1 !important;
    }

    .alupol-reconsent-trigger,
    .alupol-reconsent-btn {
        width: 42px !important;
        height: 42px !important;
        bottom: 16px !important;
        left: 16px !important;
    }

    .alupol-reconsent-tooltip {
        display: none !important;
    }
}
