/* Cookie Consent System Styles */

/* --- Banner (Bottom Bar) --- */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    z-index: 9999;
    display: none;
    /* Hidden by default, shown by JS */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
}

#cookie-banner.show {
    display: block;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

@media (min-width: 768px) {
    .cookie-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.cookie-text h3 {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.cookie-text p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #555;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s;
}

.cookie-btn-outline {
    background-color: white;
    border: 1px solid #1a73e8;
    color: #1a73e8;
}

.cookie-btn-outline:hover {
    background-color: #f1f8ff;
}

.cookie-btn-primary {
    background-color: #1a73e8;
    color: white;
}

.cookie-btn-primary:hover {
    background-color: #1557b0;
}


/* --- Preferences Modal (Overlay) --- */
#cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

#cookie-modal.show {
    display: flex;
}

.modal-dialog {
    background-color: white;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
}

.model-description {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 20px;
}

/* Accordion for Categories */
.cookie-category {
    border: 1px solid #eee;
    border-radius: 4px;
    margin-bottom: 10px;
}

.category-header {
    padding: 15px;
    background-color: #f9f9f9;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-title {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toggle-switch {
    display: inline-block;
    width: 40px;
    height: 20px;
    position: relative;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: #1a73e8;
}

input:checked+.slider:before {
    transform: translateX(20px);
}

input:disabled+.slider {
    background-color: #90caf9;
    /* Lighter blue to indicate active but locked */
    opacity: 0.7;
    cursor: not-allowed;
}

.category-body {
    padding: 15px;
    font-size: 0.9rem;
    color: #666;
    display: none;
    /* Collapsed by default */
    border-top: 1px solid #eee;
}

.category-body.open {
    display: block;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    /* Align buttons to the right */
    gap: 10px;
    background: #f9f9f9;
}

.status-text {
    font-size: 0.8rem;
    color: #1a73e8;
    font-weight: bold;
}