/* Main Modal Container */
.consent-modal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: 20px;
    background: var(--modal-bg, #ffffff);
    color: var(--modal-text, #000000);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    border-top: 1px solid var(--modal-border, rgba(0, 0, 0, 0.1));
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    .consent-modal {
        --modal-bg: #1a1a1a;
        --modal-text: #ffffff;
        --modal-border: rgba(255, 255, 255, 0.1);
    }
}

/* Modal Content Layout */
.consent-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Header Styles */
.consent-header {
    margin-bottom: 20px;
}

.consent-header h2 {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--modal-text);
}

.consent-header p {
    color: var(--modal-text);
    opacity: 0.8;
}

/* Options Container */
.consent-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Individual Option */
.consent-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: var(--option-bg, rgba(0, 0, 0, 0.03));
    border-radius: 8px;
}

.option-info h3 {
    font-size: 16px;
    margin-bottom: 5px;
    color: var(--modal-text);
}

.option-info p {
    font-size: 14px;
    color: var(--modal-text);
    opacity: 0.8;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc; /* Unchecked background */
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: #fff; /* Toggle button color */
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2); /* Add shadow for depth */
}

input:checked + .slider {
    background-color: #2196F3;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Buttons Container */
.consent-buttons {
    display: flex;
    flex-direction: column; /* Always vertical */
    gap: 12px;
    margin-top: 20px;
    width: 100%;
}

/* Button Styles */
.consent-button {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
    text-align: center;
}

.accept-button {
    background-color: #4285f4;
    color: white;
    order: 1; /* Shows first */
}

.accept-button:hover {
    background-color: #3367d6;
}

.decline-button {
    background-color: #f1f1f1;
    color: #666;
    order: 2; /* Shows second */
}

.decline-button:hover {
    background-color: #e4e4e4;
}

/* Dark Mode Specifics */
@media (prefers-color-scheme: dark) {
    .consent-option {
        --option-bg: rgba(255, 255, 255, 0.05);
    }
    
    .decline-button {
        background-color: #2d2d2d;
        color: #a0a0a0;
    }
    
    .decline-button:hover {
        background-color: #3d3d3d;
    }
}

@media (prefers-color-scheme: dark) {
    .slider {
        background-color: #555; /* Darker unchecked background */
    }
    .slider:before {
        background-color: #fff; /* Keep toggle white for contrast */
    }
    input:checked + .slider {
        background-color: #2196F3; /* Keep blue when checked */
    }
}