/* AW Cookie Consent — Modern card-style banner */

/* Reset everything inside the banner */
#awcc-banner,
#awcc-banner *,
#awcc-banner *::before,
#awcc-banner *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: 0;
    text-decoration: none;
    text-transform: none;
    letter-spacing: normal;
    word-spacing: normal;
    background: none;
    box-shadow: none;
    float: none;
    clear: none;
}

/* Banner container — bottom-left card */
#awcc-banner {
    position: fixed;
    z-index: 999999;
    font-family: var(--awcc-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif) !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    color: var(--awcc-banner-text, #1f2937) !important;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

#awcc-banner[hidden] {
    display: block !important;
    pointer-events: none;
    opacity: 0;
}

/* Once shown, force full opacity so a host theme's entrance/scroll-reveal
   animation can never hold the banner invisible. The fade-in still comes from
   the .awcc-inner keyframe below; the slide comes from the transform above. */
#awcc-banner:not([hidden]) {
    opacity: 1 !important;
}

/* Position variants */
#awcc-banner.awcc-bottom {
    bottom: 24px;
    left: 24px;
    right: auto;
    max-width: 420px;
    transform: translateY(0);
}

#awcc-banner.awcc-bottom[hidden] {
    transform: translateY(calc(100% + 40px));
}

#awcc-banner.awcc-top {
    top: 24px;
    left: 24px;
    right: auto;
    max-width: 420px;
    transform: translateY(0);
}

#awcc-banner.awcc-top[hidden] {
    transform: translateY(calc(-100% - 40px));
}

#awcc-banner.awcc-center {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    max-width: none;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4) !important;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

#awcc-banner.awcc-center[hidden] {
    opacity: 0;
    pointer-events: none;
}

/* Main card */
#awcc-banner .awcc-inner {
    background: var(--awcc-banner-bg, #ffffff) !important;
    padding: 28px !important;
    border-radius: 16px !important;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06) !important;
    display: flex !important;
    flex-direction: column;
    gap: 20px;
    animation: awccSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Cookie icon - inline SVG, renders on every device/page. Replaces the old
   emoji-glyph (U+1F36A) that fell back to a blank tofu box where no emoji font
   was available (e.g. theme-less engine pages). Cache-busted by AWCC_VERSION. */
#awcc-banner .awcc-inner::before {
    content: "" !important;
    display: block !important;
    width: 40px !important;
    height: 40px !important;
    flex: 0 0 auto !important;
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2064%2064'%3E%3Ccircle%20cx%3D'32'%20cy%3D'32'%20r%3D'27'%20fill%3D'%23E3B168'%2F%3E%3Ccircle%20cx%3D'32'%20cy%3D'32'%20r%3D'27'%20fill%3D'none'%20stroke%3D'%23C68B3F'%20stroke-width%3D'2.5'%2F%3E%3Ccircle%20cx%3D'22'%20cy%3D'23'%20r%3D'4'%20fill%3D'%237A4A24'%2F%3E%3Ccircle%20cx%3D'41'%20cy%3D'20'%20r%3D'3.2'%20fill%3D'%237A4A24'%2F%3E%3Ccircle%20cx%3D'45'%20cy%3D'36'%20r%3D'4.3'%20fill%3D'%237A4A24'%2F%3E%3Ccircle%20cx%3D'27'%20cy%3D'43'%20r%3D'3.7'%20fill%3D'%237A4A24'%2F%3E%3Ccircle%20cx%3D'17'%20cy%3D'37'%20r%3D'2.8'%20fill%3D'%237A4A24'%2F%3E%3Ccircle%20cx%3D'35'%20cy%3D'31'%20r%3D'2.5'%20fill%3D'%237A4A24'%2F%3E%3C%2Fsvg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: left center !important;
    background-size: contain !important;
}

@keyframes awccSlideUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#awcc-banner.awcc-center .awcc-inner {
    max-width: 480px;
    width: 90%;
}

/* Message */
#awcc-banner .awcc-message {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 14px !important;
    line-height: 1.65 !important;
    color: var(--awcc-banner-text, #1f2937) !important;
    background: none !important;
    opacity: 0.85;
}

#awcc-banner .awcc-privacy-link {
    color: var(--awcc-banner-text, #1f2937) !important;
    text-decoration: underline !important;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px !important;
    margin-left: 2px;
    white-space: nowrap;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    font-weight: 500 !important;
    transition: opacity 0.2s ease !important;
}

#awcc-banner .awcc-privacy-link:hover {
    opacity: 0.7;
}

/* Button group */
#awcc-banner .awcc-actions {
    display: flex !important;
    gap: 10px;
    flex-wrap: wrap;
}

#awcc-banner .awcc-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 12px 22px !important;
    border-radius: 10px !important;
    border: none !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    font-family: var(--awcc-font, inherit) !important;
    transition: all 0.2s ease !important;
    white-space: nowrap;
    line-height: 1 !important;
    text-decoration: none !important;
    text-align: center !important;
    text-transform: none !important;
    letter-spacing: 0.01em !important;
    outline: none;
    box-shadow: none !important;
    min-height: auto !important;
    width: auto !important;
    flex: 1;
    min-width: 0;
}

#awcc-banner .awcc-btn:hover {
    transform: translateY(-1px);
    text-decoration: none !important;
    filter: brightness(1.05);
}

#awcc-banner .awcc-btn:active {
    transform: translateY(0) scale(0.98);
}

#awcc-banner .awcc-btn:focus-visible {
    outline: 2px solid var(--awcc-btn-accept-bg, #2563eb) !important;
    outline-offset: 2px;
}

#awcc-banner .awcc-btn-accept {
    background-color: var(--awcc-btn-accept-bg, #2563eb) !important;
    color: var(--awcc-btn-accept-text, #ffffff) !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3) !important;
}

#awcc-banner .awcc-btn-accept:hover {
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35) !important;
}

#awcc-banner .awcc-btn-reject {
    background-color: var(--awcc-btn-reject-bg, #f3f4f6) !important;
    color: var(--awcc-btn-reject-text, #1f2937) !important;
}

#awcc-banner .awcc-btn-customise {
    background-color: var(--awcc-btn-customise-bg, transparent) !important;
    color: var(--awcc-btn-customise-text, #2563eb) !important;
    border: 1.5px solid currentColor !important;
}

/* ========================================
   Preferences panel
   ======================================== */
#awcc-banner .awcc-preferences {
    background: var(--awcc-banner-bg, #ffffff) !important;
    padding: 24px 28px !important;
    border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
    border-radius: 0 0 16px 16px !important;
    animation: awccFadeIn 0.3s ease both;
}

@keyframes awccFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#awcc-banner .awcc-preferences[hidden] {
    display: none !important;
}

#awcc-banner .awcc-pref-header h3 {
    margin: 0 0 6px !important;
    padding: 0 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    font-family: var(--awcc-font, inherit) !important;
    color: var(--awcc-banner-text, #1f2937) !important;
    background: none !important;
}

#awcc-banner .awcc-pref-header p {
    margin: 0 0 18px !important;
    padding: 0 !important;
    font-size: 13px !important;
    opacity: 0.65;
    line-height: 1.55 !important;
    color: var(--awcc-banner-text, #1f2937) !important;
}

#awcc-banner .awcc-pref-categories {
    display: flex !important;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}

#awcc-banner .awcc-category {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px !important;
    border: 1px solid rgba(0, 0, 0, 0.07) !important;
    border-radius: 12px !important;
    cursor: pointer;
    transition: all 0.15s ease;
    gap: 14px;
    background: rgba(0, 0, 0, 0.015) !important;
}

#awcc-banner .awcc-category:hover {
    background: rgba(0, 0, 0, 0.035) !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
}

#awcc-banner .awcc-cat-info {
    display: flex !important;
    flex-direction: column;
    gap: 1px;
    flex: 1;
}

#awcc-banner .awcc-cat-info strong {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--awcc-banner-text, #1f2937) !important;
}

#awcc-banner .awcc-cat-info span {
    font-size: 11.5px !important;
    opacity: 0.55;
    line-height: 1.4 !important;
    color: var(--awcc-banner-text, #1f2937) !important;
}

#awcc-banner .awcc-category input[type="checkbox"] {
    display: none !important;
}

/* Toggle switch */
#awcc-banner .awcc-toggle {
    position: relative;
    width: 40px !important;
    height: 22px !important;
    background: #d1d5db !important;
    border-radius: 11px !important;
    flex-shrink: 0;
    transition: background 0.25s ease;
    border: none !important;
    padding: 0 !important;
    cursor: pointer;
}

#awcc-banner .awcc-toggle::after {
    content: '' !important;
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px !important;
    height: 18px !important;
    background: #fff !important;
    border-radius: 50% !important;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18) !important;
}

#awcc-banner .awcc-category input:checked + .awcc-toggle {
    background: var(--awcc-btn-accept-bg, #2563eb) !important;
}

#awcc-banner .awcc-category input:checked + .awcc-toggle::after {
    transform: translateX(18px);
}

#awcc-banner .awcc-toggle-disabled {
    background: var(--awcc-btn-accept-bg, #2563eb) !important;
    opacity: 0.5;
    cursor: not-allowed;
}

#awcc-banner .awcc-toggle-disabled::after {
    transform: translateX(18px);
}

#awcc-banner .awcc-pref-actions {
    display: flex !important;
    gap: 10px;
}

/* ========================================
   Mobile
   ======================================== */
@media (max-width: 768px) {
    #awcc-banner.awcc-bottom,
    #awcc-banner.awcc-top {
        left: 12px;
        right: 12px;
        max-width: none;
    }

    #awcc-banner.awcc-bottom {
        bottom: 12px;
    }

    #awcc-banner.awcc-top {
        top: 12px;
    }

    #awcc-banner .awcc-inner {
        padding: 22px !important;
        gap: 16px;
    }

    #awcc-banner .awcc-actions {
        width: 100%;
    }

    #awcc-banner .awcc-btn {
        padding: 11px 14px !important;
        font-size: 12.5px !important;
    }

    #awcc-banner .awcc-preferences {
        padding: 18px 22px !important;
    }

    #awcc-banner .awcc-pref-actions {
        flex-direction: column;
    }

    #awcc-banner .awcc-pref-actions .awcc-btn {
        width: 100% !important;
    }

    #awcc-banner .awcc-content {
        min-width: unset;
    }
}
