﻿/**
 * Cookie Consent Banner - Corner Popup with Granular Controls
 * Standalone CSS for production site
 */

/* Cookie Consent Container */
.cookie-consent {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 9999;
    width: 100%;
    max-width: 380px;
    background-color: hsl(0 0% 100%);
    border: 1px solid hsl(0 0% 88%);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Animation */
    animation: slideInFromBottom 0.3s ease-out;
}

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

/* Hidden state */
.cookie-consent.hidden {
    display: none;
}

/* Header */
.cookie-consent-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid hsl(0 0% 88%);
}

.cookie-consent-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9375rem;
    color: hsl(0 0% 13%);
}

.cookie-consent-title svg {
    width: 1.25rem;
    height: 1.25rem;
    color: hsl(0 100% 45%);
}

.cookie-consent-close {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: hsl(0 0% 45%);
    transition: color 0.2s ease;
}

.cookie-consent-close:hover {
    color: hsl(0 0% 13%);
}

.cookie-consent-close svg {
    width: 1rem;
    height: 1rem;
}

/* Content */
.cookie-consent-content {
    padding: 1rem;
}

.cookie-consent-text {
    font-size: 0.875rem;
    color: hsl(0 0% 45%);
    line-height: 1.5;
    margin: 0 0 1rem 0;
}

/* Details Toggle */
.cookie-consent-toggle-details {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(0 100% 45%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    margin-bottom: 1rem;
}

.cookie-consent-toggle-details:hover {
    text-decoration: underline;
}

.cookie-consent-toggle-details svg {
    width: 1rem;
    height: 1rem;
}

/* Cookie Options */
.cookie-consent-options {
    display: none;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 1rem;
    margin-bottom: 1rem;
    border-top: 1px solid hsl(0 0% 88%);
}

.cookie-consent-options.visible {
    display: flex;
}

.cookie-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.cookie-option-info {
    flex: 1;
}

.cookie-option-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(0 0% 13%);
    margin: 0;
}

.cookie-option-desc {
    font-size: 0.75rem;
    color: hsl(0 0% 45%);
    margin: 0.125rem 0 0 0;
}

/* Toggle Switch */
.cookie-switch {
    position: relative;
    width: 2.5rem;
    height: 1.25rem;
    flex-shrink: 0;
}

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

.cookie-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: hsl(0 0% 88%);
    border-radius: 9999px;
    transition: background-color 0.2s ease;
}

.cookie-switch-slider::before {
    position: absolute;
    content: "";
    height: 1rem;
    width: 1rem;
    left: 0.125rem;
    bottom: 0.125rem;
    background-color: hsl(0 0% 100%);
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.cookie-switch input:checked + .cookie-switch-slider {
    background-color: hsl(0 100% 45%);
}

.cookie-switch input:checked + .cookie-switch-slider::before {
    transform: translateX(1.25rem);
}

.cookie-switch input:disabled + .cookie-switch-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Buttons */
.cookie-consent-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cookie-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s ease, background-color 0.2s ease;
}

.cookie-btn-primary {
    background-color: hsl(0 100% 45%);
    color: hsl(0 0% 100%);
}

.cookie-btn-primary:hover {
    opacity: 0.9;
}

.cookie-btn-secondary {
    background-color: transparent;
    color: hsl(0 0% 13%);
    border: 1px solid hsl(0 0% 88%);
}

.cookie-btn-secondary:hover {
    background-color: hsl(0 0% 96%);
}

/* Privacy Link */
.cookie-consent-privacy {
    font-size: 0.75rem;
    color: hsl(0 0% 45%);
    text-align: center;
    margin-top: 0.75rem;
}

.cookie-consent-privacy a {
    color: hsl(0 100% 45%);
    text-decoration: none;
}

.cookie-consent-privacy a:hover {
    text-decoration: underline;
}

/* ===== reCAPTCHA Blocker ===== */

.recaptcha-blocker {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.recaptcha-blocker.hidden {
    display: none;
}

.recaptcha-blocker-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.recaptcha-blocker-modal {
    position: relative;
    background: hsl(0 0% 100%);
    border: 1px solid hsl(0 0% 88%);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 2rem;
    max-width: 420px;
    width: 90%;
    text-align: center;
    animation: slideInFromBottom 0.3s ease-out;
}

.recaptcha-blocker-icon {
    margin-bottom: 1rem;
    color: hsl(0 100% 45%);
}

.recaptcha-blocker-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: hsl(0 0% 13%);
    margin: 0 0 0.5rem 0;
}

.recaptcha-blocker-text {
    font-size: 0.875rem;
    color: hsl(0 0% 45%);
    line-height: 1.5;
    margin: 0 0 1.5rem 0;
}

.recaptcha-widget {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
    min-height: 78px;
}

.recaptcha-blocker-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: hsl(0 0% 60%);
    font-size: 0.8125rem;
}

.recaptcha-blocker-divider::before,
.recaptcha-blocker-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: hsl(0 0% 88%);
}

/* Responsive */
@media (max-width: 480px) {
    .cookie-consent {
        bottom: 0;
        right: 0;
        left: 0;
        max-width: 100%;
        border-left: none;
        border-right: none;
        border-bottom: none;
    }

    .recaptcha-blocker-modal {
        width: 95%;
        padding: 1.5rem;
    }
}
