/* QR Info Portal consent banner polish aligned with Open Design gate 20260529. */
:root {
    --consent-primary: #0f766e;
    --consent-primary-dark: #115e59;
    --consent-success: #047857;
    --consent-warning: #b45309;
    --consent-danger: #b91c1c;
    --consent-ink: #111827;
    --consent-muted: #4b5563;
    --consent-border: #d1d5db;
    --consent-surface: #ffffff;
    --consent-soft: #f8fafc;
    --consent-radius: 8px;
}

body.cookie-banner-open {
    overflow: hidden;
}

.cookie-consent-banner {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.72);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    backdrop-filter: blur(4px);
}

.cookie-consent-banner.show {
    opacity: 1;
    visibility: visible;
}

.cookie-consent-content {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: min(760px, calc(100vw - 32px));
    max-height: min(820px, calc(100vh - 48px));
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: var(--consent-surface);
    color: var(--consent-ink);
    border: 1px solid var(--consent-border);
    border-radius: var(--consent-radius);
    box-shadow: 0 24px 56px rgba(15, 23, 42, 0.24);
}

.cookie-consent-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 22px 14px;
    border-bottom: 1px solid var(--consent-border);
    margin: 0;
}

.cookie-consent-header h3 {
    margin: 0;
    color: var(--consent-ink);
    font-size: 1.25rem;
    line-height: 1.25;
    letter-spacing: 0;
}

.cookie-consent-close {
    min-width: 44px;
    min-height: 44px;
    color: var(--consent-muted);
    border-radius: var(--consent-radius);
}

.cookie-consent-close:hover,
.cookie-consent-close:focus-visible {
    background: var(--consent-soft);
    color: var(--consent-primary);
}

.cookie-consent-body {
    padding: 18px 22px 0;
    overflow-y: auto;
}

.cookie-consent-description,
.cookie-description,
.cookie-details {
    color: var(--consent-muted);
}

.cookie-consent-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    border-bottom: 1px solid var(--consent-border);
    padding-bottom: 6px;
}

.cookie-consent-content .cookie-tab {
    min-height: 44px;
    min-width: 0;
    padding: 0.65rem 0.75rem;
    border-radius: var(--consent-radius) var(--consent-radius) 0 0;
    color: #374151;
    background: #ffffff;
    border: 1px solid transparent;
    line-height: 1.2;
    white-space: normal;
    overflow-wrap: anywhere;
}

.cookie-consent-content .cookie-tab:hover {
    color: #134e4a;
    background: #ecfdf5;
}

.cookie-consent-content .cookie-tab.active {
    color: #134e4a;
    border-bottom-color: var(--consent-primary);
    background: #d1fae5;
    border-color: #99f6e4;
}

.cookie-toggle input[type="checkbox"] {
    accent-color: var(--consent-primary);
}

.cookie-toggle-title,
.cookie-details strong {
    color: var(--consent-ink);
}

.cookie-consent-content .cookie-toggle-always {
    color: #065f46;
    font-weight: 700;
}

.medical-disclaimer-section {
    background: #fffbeb;
    border-left-color: var(--consent-warning);
    border-radius: var(--consent-radius);
}

.medical-disclaimer-text {
    display: block;
    margin-bottom: 0;
    padding: 0.25rem 0;
    background: #fffbeb;
    color: #78350f !important;
    border-radius: 4px;
}

.cookie-consent-footer {
    padding: 18px 22px 22px;
    border-top: 1px solid var(--consent-border);
    margin-top: 18px;
}

.cookie-consent-content .cookie-consent-links a {
    color: #115e59;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.cookie-consent-content .cookie-consent-links a:hover,
.cookie-consent-content .cookie-consent-links a:focus-visible {
    color: var(--consent-primary-dark);
}

.cookie-consent-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
}

.cookie-btn {
    min-height: 44px;
    border-radius: var(--consent-radius);
    font-weight: 700;
    white-space: normal;
    overflow-wrap: anywhere;
}

.cookie-btn-secondary {
    background: var(--consent-soft);
    color: var(--consent-ink);
    border: 1px solid var(--consent-border);
}

.cookie-btn-secondary:hover {
    background: #e5e7eb;
}

.cookie-btn-success {
    background: var(--consent-success);
    color: #ffffff;
}

.cookie-btn-success:hover {
    background: #065f46;
}

.cookie-btn-primary {
    background: var(--consent-primary);
    color: #ffffff;
}

.cookie-btn-primary:hover {
    background: var(--consent-primary-dark);
}

.cookie-btn:focus-visible,
.cookie-tab:focus-visible,
.cookie-consent-close:focus-visible {
    outline: 3px solid rgba(15, 118, 110, 0.32);
    outline-offset: 2px;
}

.compliance-notice {
    background: var(--consent-ink);
    color: #f8fafc;
    padding: 12px 22px;
}

.compliance-text {
    color: #e5e7eb;
}

@media (max-width: 640px) {
    .cookie-consent-banner {
        align-items: flex-end;
        padding: 12px;
    }

    .cookie-consent-content {
        width: 100%;
        max-height: calc(100vh - 24px);
        margin: 0;
    }

    .cookie-consent-header,
    .cookie-consent-body,
    .cookie-consent-footer {
        padding-left: 16px;
        padding-right: 16px;
    }

    .cookie-consent-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cookie-consent-buttons {
        display: grid;
        grid-template-columns: 1fr;
    }

    .cookie-tab,
    .cookie-btn {
        width: 100%;
    }

    .cookie-consent-content .cookie-tab {
        border-radius: var(--consent-radius);
    }
}

@media (max-width: 380px) {
    .cookie-consent-tabs {
        grid-template-columns: 1fr;
    }
}

@media (prefers-color-scheme: dark) {
    .cookie-consent-content {
        background: #111827;
        color: #f8fafc;
        border-color: #374151;
    }

    .cookie-consent-header,
    .cookie-consent-footer,
    .cookie-consent-tabs {
        border-color: #374151;
    }

    .cookie-consent-header h3,
    .cookie-toggle-title,
    .cookie-details strong {
        color: #f8fafc;
    }

    .cookie-consent-description,
    .cookie-description,
    .cookie-details {
        color: #d1d5db;
    }

    .cookie-consent-content .cookie-tab {
        background: #1f2937;
        color: #e5e7eb;
        border-color: #374151;
    }

    .cookie-consent-content .cookie-tab:hover,
    .cookie-consent-content .cookie-tab.active {
        background: #0f2926;
        color: #ccfbf1;
        border-color: #14b8a6;
    }

    .cookie-consent-content .cookie-toggle-always,
    .cookie-consent-content .cookie-consent-links a {
        color: #6ee7b7;
    }

    .cookie-btn-secondary {
        background: #1f2937;
        color: #f8fafc;
        border-color: #4b5563;
    }

    .medical-disclaimer-section {
        background: #451a03;
    }

    .medical-disclaimer-text {
        background: #451a03;
        color: #fde68a !important;
    }
}
