/* Cookie Banner Styles */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #ffffff;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 20px;
    z-index: 1000;
    display: block;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.cookie-banner:target {
    transform: translateY(0);
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.cookie-banner-text {
    flex: 1;
    font-size: 0.9rem;
    color: #374151;
    line-height: 1.5;
}

.cookie-banner-text a {
    color: #2563eb;
    text-decoration: none;
}

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

.cookie-banner-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    white-space: nowrap;
}

.cookie-btn-accept {
    background-color: #2563eb;
    color: white;
    border-color: #2563eb;
}

.cookie-btn-accept:hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
}

.cookie-btn-reject {
    background-color: #6b7280;
    color: white;
    border-color: #6b7280;
}

.cookie-btn-reject:hover {
    background-color: #4b5563;
    border-color: #4b5563;
}

.cookie-btn-customize {
    background-color: transparent;
    color: #2563eb;
    border-color: #2563eb;
}

.cookie-btn-customize:hover {
    background-color: #f3f4f6;
}

/* Cookie Customization Modal */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cookie-modal:target {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.cookie-modal-content {
    background-color: white;
    border-radius: 12px;
    padding: 32px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.cookie-modal:target .cookie-modal-content {
    transform: scale(1);
}

.cookie-modal-header {
    margin-bottom: 24px;
}

.cookie-modal-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.cookie-modal-header p {
    color: #6b7280;
    font-size: 1rem;
}

.cookie-category {
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.cookie-category h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

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

.cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d1d5db;
    transition: 0.2s;
    border-radius: 24px;
}

.cookie-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.2s;
    border-radius: 50%;
}

.cookie-toggle input:checked + .cookie-slider {
    background-color: #2563eb;
}

.cookie-toggle input:checked + .cookie-slider:before {
    transform: translateX(20px);
}

.cookie-toggle input:disabled + .cookie-slider {
    background-color: #9ca3af;
    cursor: not-allowed;
}

.cookie-category p {
    color: #6b7280;
    font-size: 0.9rem;
    margin: 0;
}

.cookie-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

/* Hide banner after interaction */
.cookie-banner.hidden {
    display: none;
}

/* Show banner by default */
body:not(.cookies-accepted):not(.cookies-rejected) .cookie-banner {
    transform: translateY(0);
}

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

    .cookie-banner-actions {
        justify-content: center;
        flex-wrap: wrap;
    }

    .cookie-btn {
        flex: 1;
        min-width: 100px;
    }

    .cookie-modal-content {
        padding: 24px;
        margin: 10px;
    }

    .cookie-modal-actions {
        flex-direction: column;
    }

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

@media (max-width: 480px) {
    .cookie-banner {
        padding: 16px;
    }

    .cookie-banner-actions {
        flex-direction: column;
    }

    .cookie-category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}