/* Klaro Cookie Banner Custom Styles for Modern Minimalist Design */
/* Overrides default Klaro CSS to prevent dark patterns and match site aesthetic */

.klaro {
    font-family: inherit;
}

.klaro .cookie-notice {
    background: rgba(18, 18, 18, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;

    /* Center on screen forcibly */
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    bottom: auto !important;
    right: auto !important;
    transform: translate(-50%, -50%) !important;

    /* Sizing & Anti-Overflow */
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    margin: 0 !important;
    border-radius: 0 !important;
    padding: 0 !important;

    /* Layout */
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;

    /* Subtle shadow for the modal itself */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8) !important;
    z-index: 2147483647 !important;
}

/* Override any desktop media queries that might break the centering */
@media (min-width: 1024px) {
    .klaro .cookie-notice {
        padding: 40px !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

.klaro .cookie-notice .cn-body {
    margin-bottom: 32px !important;
    text-align: center !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-right: 0 !important;
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Also ensure no weird row displays on desktop for the body */
@media (min-width: 1024px) {
    .klaro .cookie-notice .cn-body {
        text-align: center !important;
        margin-bottom: 32px !important;
        margin-right: 0 !important;
    }
}

.klaro .cookie-notice .cn-body a {
    color: #ffffff !important;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.4);
    text-underline-offset: 4px;
    transition: all 0.2s ease;
}

.klaro .cookie-notice .cn-body a:hover {
    text-decoration-color: #ffffff;
}

.klaro .cookie-notice .cn-buttons {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
}

@media (min-width: 640px) {
    .klaro .cookie-notice .cn-buttons {
        flex-direction: row !important;
    }
}

/* 
 * CRITICAL GDPR COMPLIANCE RULE:
 * Accept and Decline buttons must have EXACTLY EQUAL visual weight.
 * No specific highlighting for Accept All.
 * Override Klaro's .cm-btn-primary and .cm-btn-success etc.
 */
.klaro .cookie-notice .cn-buttons button,
.klaro .cookie-modal .cm-btn {
    background: transparent !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    padding: 12px 24px !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    border-radius: 4px !important;
    white-space: normal !important;
    /* Allow text to wrap if it's very long */
    flex: 1 1 auto;
    text-align: center;
    box-shadow: none !important;
    text-decoration: none !important;
    width: 100% !important;
}

/* Hover effects apply equally to all */
.klaro .cookie-notice .cn-buttons button:hover,
.klaro .cookie-modal .cm-btn:hover {
    background-color: #ffffff !important;
    color: #000000 !important;
    border-color: #ffffff !important;
}

/* Specific reset for Klaro's primary/accept buttons so they don't look blue */
.klaro .cookie-modal .cm-btn-primary,
.klaro .cookie-modal .cm-btn-success,
.klaro .cookie-modal .cm-btn-info {
    background: transparent !important;
    color: #ffffff !important;
    text-shadow: none !important;
}

.klaro .cookie-modal .cm-btn-primary:hover,
.klaro .cookie-modal .cm-btn-success:hover,
.klaro .cookie-modal .cm-btn-info:hover {
    background-color: #ffffff !important;
    color: #000000 !important;
}

/* Customize specific buttons slightly if needed, but keep visual weight equal */
.klaro .cookie-notice .cn-learn-more,
.klaro .cookie-modal .cm-link {
    font-size: 0.8rem !important;
    opacity: 0.7;
    margin-top: 12px;
    display: block;
    text-align: center;
    width: 100%;
    background: none !important;
    border: none !important;
    text-decoration: underline !important;
    padding: 0 !important;
    text-transform: none !important;
}

@media (min-width: 1024px) {

    .klaro .cookie-notice .cn-learn-more,
    .klaro .cookie-modal .cm-link {
        width: auto;
        margin-top: 0;
        margin-left: 12px;
        align-self: center;
    }
}

/* 
 * MUST CONSENT BACKDROP 
 * When using Klaro's modal, it adds a `.cm-bg` background.
 * We want a subtle dark blur instead of pure black.
 */
.klaro .cm-bg {
    background: rgba(0, 0, 0, 0.05) !important;
    backdrop-filter: blur(1px) !important;
    -webkit-backdrop-filter: blur(1px) !important;
}

/* Outer Full-Screen Overlay (Klaro's default is to stretch .cookie-modal) */
.klaro .cookie-modal {
    background: rgba(18, 18, 18, 0.05) !important;
    backdrop-filter: blur(1px) !important;
    -webkit-backdrop-filter: blur(1px) !important;
    border: none !important;
    box-shadow: none !important;
}

/* The actual Card (Modal Dialog) inside the overlay */
.klaro .cookie-modal .cm-modal {
    background: rgba(18, 18, 18, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    border-radius: 0 !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8) !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    margin: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    display: flex !important;
    flex-direction: column !important;
}

@media (min-width: 640px) {
    .klaro .cookie-modal .cm-modal {
        width: 90% !important;
        max-width: 600px !important;
        height: auto !important;
        max-height: 90vh !important;
        border-radius: 12px !important;
        margin: 0 auto !important;
    }
}

.klaro .cookie-modal a {
    color: #ffffff !important;
    text-decoration: underline !important;
    text-decoration-color: rgba(255, 255, 255, 0.4) !important;
    text-underline-offset: 4px !important;
    transition: all 0.2s ease !important;
}

.klaro .cookie-modal a:hover {
    text-decoration-color: #ffffff !important;
}

.klaro .cookie-modal .cm-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 16px 24px !important;
}

.klaro .cookie-modal .cm-header h1.title {
    color: #ffffff !important;
    font-size: 1.25rem !important;
    font-weight: 600 !important;
}

@media (min-width: 640px) {
    .klaro .cookie-modal .cm-header h1.title {
        font-size: 1.5rem !important;
    }
}

.klaro .cookie-modal .cm-body {
    color: rgba(255, 255, 255, 0.8) !important;
    padding: 16px 24px !important;
}

.klaro .cookie-modal .cm-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    background: transparent !important;
    padding: 16px 24px !important;
}

.klaro .cookie-modal .cm-footer .cm-footer-buttons {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
}

@media (min-width: 640px) {
    .klaro .cookie-modal .cm-footer .cm-footer-buttons {
        flex-direction: row !important;
    }
}

/* Toggle Switches */

/* Active State (Track) - Green */
.klaro .cookie-modal .cm-list-input:checked+.cm-list-label .cm-switch .slider,
.klaro .cookie-modal .cm-list-input.half-checked+.cm-list-label .cm-switch .slider {
    background-color: rgba(34, 197, 94, 0.8) !important;
}

/* Active State (Thumb) */
.klaro .cookie-modal .cm-list-input:checked+.cm-list-label .cm-switch .slider::before,
.klaro .cookie-modal .cm-list-input.half-checked+.cm-list-label .cm-switch .slider::before {
    background-color: #ffffff !important;
}

/* Inactive State (Track) - Red */
.klaro .cookie-modal .cm-list-input:not(:checked)+.cm-list-label .cm-switch .slider {
    background-color: rgba(220, 38, 38, 0.6) !important;
}

/* Inactive State (Thumb) */
.klaro .cookie-modal .cm-list-input:not(:checked)+.cm-list-label .cm-switch .slider::before {
    background-color: rgba(255, 255, 255, 0.9) !important;
}

/* Purpose Headers */
.klaro .cookie-modal .cm-purposes .cm-purpose .cm-purpose-title {
    color: #ffffff !important;
}

/* Service / App Details and Descriptions */
.klaro .cookie-modal .cm-app .cm-app-description,
.klaro .cookie-modal .cm-app .cm-app-description * {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Titles of the services themselves */
.klaro .cookie-modal .cm-app .cm-app-title {
    color: #ffffff !important;
}

/* Specific deep text overriding for Klaro's list info */
.klaro .cm-modal .cm-service p.cm-list-description b {
    color: #ffffff !important;
}

.klaro .cm-modal .cm-service p.cm-list-description {
    color: rgba(255, 255, 255, 0.7) !important;
}

.klaro .cm-modal .cm-service p.purposes {
    color: rgba(255, 255, 255, 0.7) !important;
}