/* Cookie Consent Banner Styles */
/* Design-system aligned — uses CSS custom properties from host page */

.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid color-mix(in srgb, var(--primary, #2c2c2c) 8%, transparent);
    box-shadow: 0 -4px 32px rgba(0, 0, 0, 0.06);
    z-index: 10000;
    padding: 20px 24px;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    display: none;
}

.cookie-consent-banner.show {
    display: block;
    animation: cookieSlideUp 0.4s ease-out;
}

@keyframes cookieSlideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.cookie-consent-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.cookie-consent-text {
    flex: 1;
    min-width: 0;
}

.cookie-consent-text h3 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 6px 0;
    color: var(--text, #2c2c2c);
    letter-spacing: 0.01em;
}

.cookie-consent-text p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-light, #6b6b6b);
}

.cookie-consent-links {
    display: inline-flex;
    gap: 16px;
    margin-top: 8px;
}

.cookie-consent-links a {
    color: var(--text-light, #6b6b6b);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: color 0.2s;
}

.cookie-consent-links a:hover {
    color: var(--accent, #b8860b);
}

.cookie-consent-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.cookie-consent-banner .btn {
    padding: 9px 20px;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Inter', system-ui, sans-serif;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1.4;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.btn-accept-all {
    background: var(--accent, #b8860b);
    color: white;
    box-shadow: 0 1px 4px color-mix(in srgb, var(--accent, #b8860b) 25%, transparent);
}

.btn-accept-all:hover {
    background: var(--accent-dark, #8b6914);
    box-shadow: 0 2px 8px color-mix(in srgb, var(--accent, #b8860b) 30%, transparent);
}

.btn-reject-all {
    background: transparent;
    color: var(--text-light, #6b6b6b);
    border: 1px solid color-mix(in srgb, var(--primary, #2c2c2c) 15%, transparent);
}

.btn-reject-all:hover {
    background: color-mix(in srgb, var(--primary, #2c2c2c) 4%, transparent);
    color: var(--text, #2c2c2c);
}

.btn-customize {
    background: transparent;
    color: var(--text-light, #6b6b6b);
    border: 1px solid color-mix(in srgb, var(--primary, #2c2c2c) 15%, transparent);
}

.btn-customize:hover {
    background: color-mix(in srgb, var(--primary, #2c2c2c) 4%, transparent);
    color: var(--text, #2c2c2c);
}

.btn-settings {
    background: transparent;
    color: var(--text-light, #6b6b6b);
    border: none;
    padding: 0;
    font-size: 12px;
    font-weight: 500;
    font-family: 'Inter', system-ui, sans-serif;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-settings:hover {
    color: var(--accent, #b8860b);
    background: transparent;
}

/* Modal Styles for Cookie Settings */
.cookie-settings-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10001;
    overflow-y: auto;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 2rem 1rem;
    justify-content: center;
    align-items: flex-start;
}

.cookie-settings-modal.show {
    display: flex;
}

.cookie-settings-modal .modal-dialog {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
}

.cookie-settings-modal .modal-content {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.cookie-settings-modal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid color-mix(in srgb, var(--primary, #2c2c2c) 8%, transparent);
}

.cookie-settings-modal .modal-header h5,
.cookie-settings-modal .modal-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--text, #2c2c2c);
    margin: 0;
}

.cookie-settings-modal .modal-header .close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-light, #6b6b6b);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.cookie-settings-modal .modal-header .close:hover {
    color: var(--text, #2c2c2c);
}

.cookie-settings-modal .modal-body {
    padding: 24px;
}

.cookie-settings-modal .modal-body h4 {
    color: var(--text, #2c2c2c);
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
}

.cookie-category-item {
    background: color-mix(in srgb, var(--muted, #f5f0eb) 60%, white);
    border: 1px solid color-mix(in srgb, var(--primary, #2c2c2c) 6%, transparent);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}

.cookie-category-item h5 {
    margin: 0 0 6px 0;
    color: var(--text, #2c2c2c);
    font-size: 14px;
    font-weight: 600;
}

.cookie-category-description {
    font-size: 13px;
    color: var(--text-light, #6b6b6b);
    margin-bottom: 10px;
    line-height: 1.5;
}

.cookie-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cookie-toggle label {
    margin: 0;
    font-weight: normal;
}

.cookie-toggle span {
    font-size: 12px;
    color: var(--text-light, #6b6b6b);
    font-weight: 500;
}

/* Switch Toggle Styles */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: color-mix(in srgb, var(--primary, #2c2c2c) 15%, transparent);
    transition: 0.3s;
    border-radius: 22px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

input:checked + .slider {
    background-color: var(--accent, #b8860b);
}

input:checked + .slider:before {
    transform: translateX(22px);
}

.cookie-settings-modal .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 24px;
    border-top: 1px solid color-mix(in srgb, var(--primary, #2c2c2c) 8%, transparent);
}

.cookie-settings-modal .modal-footer .btn {
    padding: 9px 20px;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Inter', system-ui, sans-serif;
    transition: all 0.2s ease;
}

.cookie-settings-modal .modal-footer .btn-secondary {
    background: color-mix(in srgb, var(--primary, #2c2c2c) 6%, transparent);
    color: var(--text-light, #6b6b6b);
}

.cookie-settings-modal .modal-footer .btn-secondary:hover {
    background: color-mix(in srgb, var(--primary, #2c2c2c) 10%, transparent);
    color: var(--text, #2c2c2c);
}

.cookie-settings-modal .modal-footer .btn-primary {
    background: var(--accent, #b8860b);
    color: white;
    box-shadow: 0 1px 4px color-mix(in srgb, var(--accent, #b8860b) 25%, transparent);
}

.cookie-settings-modal .modal-footer .btn-primary:hover {
    background: var(--accent-dark, #8b6914);
}

/* Responsive Design */
@media (max-width: 768px) {
    .cookie-consent-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .cookie-consent-links {
        justify-content: center;
    }

    .cookie-consent-buttons {
        width: 100%;
        justify-content: center;
    }

    .cookie-consent-banner {
        padding: 16px 20px;
    }
}

@media (max-width: 480px) {
    .cookie-consent-buttons {
        flex-direction: column;
    }

    .cookie-consent-banner .btn {
        width: 100%;
    }

    .cookie-consent-banner {
        padding: 14px 16px;
    }

    .cookie-consent-text h3 {
        font-size: 15px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .cookie-consent-banner {
        border-top: 2px solid #000;
        background: #fff;
    }

    .btn-accept-all {
        background: #000;
        color: #fff;
    }

    .btn-accept-all:hover {
        background: #333;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .cookie-consent-banner.show {
        animation: none;
    }

    .cookie-consent-banner .btn,
    .slider,
    .slider:before {
        transition: none;
    }
}
