/*
 * Cookie Consent Banner Styles
 * Uses Tailwind CSS for utility classes where possible.
 */

#cookie-consent-banner {
    position: fixed;
    bottom: 1rem; /* 16px */
    left: 1rem;
    right: 1rem;
    z-index: 1000; /* Ensure it's above other content */
    max-width: 40rem; /* Max width for desktop */
    margin-left: auto;
    margin-right: auto;
    background-color: rgba(var(--surface), 0.95); /* White with slight transparency */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 0.75rem; /* 12px */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(var(--border), 0.7);
    padding: 1.5rem; /* 24px */
    display: flex;
    flex-direction: column;
    gap: 1rem; /* 16px */
    transform: translateY(150%); /* Start off-screen */
    transition: transform 0.5s ease-out;
}

#cookie-consent-banner.show {
    transform: translateY(0); /* Slide in */
}

#cookie-consent-banner p {
    font-size: 0.875rem; /* text-sm */
    line-height: 1.5;
    color: rgba(var(--text-primary), 1);
}

#cookie-consent-banner a {
    color: rgba(var(--info), 1); /* Use info color for links */
    text-decoration: underline;
}

#cookie-consent-banner .cookie-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem; /* 12px */
    justify-content: flex-end; /* Align buttons to the right */
}

#cookie-consent-banner .cookie-button {
    padding: 0.625rem 1.25rem; /* 10px 20px */
    border-radius: 0.5rem; /* 8px */
    font-size: 0.875rem; /* text-sm */
    font-weight: 600; /* font-semibold */
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out, color 0.2s ease-in-out;
    white-space: nowrap; /* Prevent buttons from wrapping text */
}

#cookie-consent-banner .cookie-button.primary {
    background-color: rgba(var(--info), 1);
    color: white;
    border: 1px solid rgba(var(--info), 1);
}

#cookie-consent-banner .cookie-button.primary:hover {
    background-color: rgba(var(--info), 0.9);
}

#cookie-consent-banner .cookie-button.secondary {
    background-color: transparent;
    color: rgba(var(--text-primary), 1);
    border: 1px solid rgba(var(--border), 1);
}

#cookie-consent-banner .cookie-button.secondary:hover {
    background-color: rgba(var(--gray-100), 1);
}

/* Styles for granular consent details */
#cookie-consent-details {
    padding-top: 1rem;
    border-top: 1px solid rgba(var(--border), 0.7);
}

#cookie-consent-details .peer:checked ~ div {
    background-color: rgba(var(--info), 1);
}

#cookie-consent-details .peer:focus ~ div {
    box-shadow: 0 0 0 3px rgba(var(--info), 0.3);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #cookie-consent-banner {
        bottom: 0.5rem;
        left: 0.5rem;
        right: 0.5rem;
        padding: 1rem;
        border-radius: 0.5rem;
        gap: 0.75rem;
    }

    #cookie-consent-banner .cookie-buttons {
        flex-direction: column; /* Stack buttons on small screens */
        width: 100%;
    }

    #cookie-consent-banner .cookie-button {
        width: 100%; /* Full width buttons */
        text-align: center;
    }

    #cookie-consent-details {
        padding-top: 0.75rem;
    }
}