/* Cookie Banner Styles */

.cookie-banner-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 1rem;
    pointer-events: none;
}

.cookie-banner-overlay.hidden {
    display: none;
}

.cookie-banner {
    pointer-events: auto;
    width: 100%;
    max-width: 42rem;
    animation: slideInFromBottom 0.3s ease-out;
}

@keyframes slideInFromBottom {
    from {
        transform: translateY(1.25rem);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-banner-card {
    border: 2px solid #fed7aa;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    background-color: white;
    border-radius: 0.5rem;
}

.cookie-banner-header {
    padding: 1rem 1.5rem 0.75rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.cookie-banner-title-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cookie-banner-icon {
    padding: 0.5rem;
    background-color: #ffedd5;
    border-radius: 0.5rem;
}

.cookie-banner-icon svg {
    width: 1.5rem;
    height: 1.5rem;
    color: #ea580c;
}

.cookie-banner-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: #111827;
    margin: 0;
}

.cookie-banner-description {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.cookie-banner-close {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s;
}

.cookie-banner-close:hover {
    color: #4b5563;
}

.cookie-banner-content {
    padding: 0 1.5rem 1rem;
}

.cookie-banner-text {
    font-size: 0.875rem;
    color: #4b5563;
    line-height: 1.625;
    margin-bottom: 1rem;
}

.cookie-banner-details-btn {
    background: none;
    border: none;
    color: #ea580c;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    font-size: 0.875rem;
    text-decoration: none;
}

.cookie-banner-details-btn:hover {
    color: #c2410c;
}

.cookie-banner-preferences {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.cookie-preference-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
}

.cookie-preference-item.essential {
    background-color: #f9fafb;
    border-color: #e5e7eb;
}

.cookie-preference-item.active {
    background-color: white;
}

.cookie-preference-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.cookie-preference-icon.essential {
    color: #16a34a;
}

.cookie-preference-icon.functional {
    color: #2563eb;
}

.cookie-preference-icon.analytics {
    color: #9333ea;
}

.cookie-preference-icon.marketing {
    color: #ea580c;
}

.cookie-preference-content {
    flex: 1;
    min-width: 0;
}

.cookie-preference-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.cookie-preference-label {
    font-weight: 600;
    color: #111827;
    cursor: pointer;
    margin: 0;
}

.cookie-preference-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cookie-preference-status-text {
    font-size: 0.75rem;
    color: #16a34a;
    font-weight: 500;
}

.cookie-preference-description {
    font-size: 0.875rem;
    color: #4b5563;
    margin: 0;
}

/* Toggle Switch */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d1d5db;
    transition: 0.3s;
    border-radius: 34px;
}

.cookie-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: #ea580c;
}

.cookie-toggle input:checked + .cookie-toggle-slider:before {
    transform: translateX(20px);
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Footer */
.cookie-banner-footer {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
}

@media (min-width: 640px) {
    .cookie-banner-footer {
        flex-direction: row;
    }
}

.cookie-banner-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-size: 0.875rem;
}

.cookie-banner-btn-primary {
    background-color: #ea580c;
    color: white;
    flex: 1;
}

.cookie-banner-btn-primary:hover {
    background-color: #c2410c;
}

.cookie-banner-btn-outline {
    background-color: white;
    color: #374151;
    border: 1px solid #d1d5db;
}

.cookie-banner-btn-outline:hover {
    background-color: #f9fafb;
}

.cookie-banner-btn-ghost {
    background: none;
    color: #6b7280;
}

.cookie-banner-btn-ghost:hover {
    background-color: #f3f4f6;
}

@media (max-width: 639px) {
    .cookie-banner-btn {
        width: 100%;
    }

    .cookie-banner-footer {
        flex-direction: column-reverse;
    }
}
