/* --- 1. CORE VARIABLES --- */
:root {
    --cookie-bg: #222;
    --cookie-text: #fff;
    --cookie-accent: #28a745; /* Success Green */
    --cookie-accent-hover: #218838;
    --cookie-secondary: #444; /* Neutral for Reject */
    --cookie-modal-bg: #ffffff;
    --cookie-modal-text: #333;
}

/* --- 2. MAIN COOKIE BANNER --- */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--cookie-bg);
    color: var(--cookie-text);
    padding: 20px;
    z-index: 9999;
    display: none; /* Controlled by JS */
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
    font-family: sans-serif;
}

.cookie-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

#cookie-banner p { margin: 0; font-size: 14px; line-height: 1.5; text-align: center; }
#cookie-banner a { color: var(--cookie-accent); text-decoration: underline; }

.cookie-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

/* Button Parity: Accept and Reject must look equally important */
#cookie-banner button, .modal-btns button {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
}

.btn-accept { background: var(--cookie-accent); color: white; }
.btn-reject { background: var(--cookie-secondary); color: white; }

.btn-accept:hover { background: var(--cookie-accent-hover); transform: translateY(-1px); }
.btn-reject:hover { background: #555; }

.btn-settings {
    font-size: 13px;
    color: #bbb;
    text-decoration: none;
    align-self: center;
}

/* --- 3. SETTINGS MODAL --- */
#cookie-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    display: none; /* Flex via JS openSettings() */
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: var(--cookie-modal-bg);
    color: var(--cookie-modal-text);
    padding: 30px;
    border-radius: 12px;
    max-width: 450px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.modal-content h3 { margin-top: 0; color: #222; }

.setting-item {
    margin: 20px 0;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.setting-item label { display: block; font-weight: bold; margin-bottom: 5px; cursor: pointer; }
.setting-item p { font-size: 13px; color: #666; margin: 0; }
.setting-item input[type="checkbox"] { margin-right: 10px; transform: scale(1.2); }

.modal-btns { display: flex; gap: 10px; margin-top: 25px; }

/* --- 4. FLOATING PRIVACY ICON --- */
/* To re-open settings at any time */
#privacy-trigger {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    background: var(--cookie-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9998;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    opacity: 0.7;
    transition: opacity 0.3s;
}

#privacy-trigger:hover { opacity: 1; }
#privacy-trigger svg { width: 20px; fill: white; }

/* --- 5. RESPONSIVE QUERIES --- */
@media (min-width: 768px) {
    .cookie-content {
        flex-direction: row;
        justify-content: space-between;
    }
    #cookie-banner p { text-align: left; max-width: 60%; }
}