/* ============================================
   COOKIE BANNER & MODAL STYLES
   ============================================ */

/* Banner */
.cookie-banner {
    position: fixed;
    bottom: 16px;
    right: 16px;
    max-width: 360px;
    background: #fff;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    z-index: 9999;
    display: none;
}

.cookie-banner h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
}

.cookie-banner p {
    font-size: 14px;
    color: #555;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.cookie-banner a {
    color: #8b8b8b;
    text-decoration: none;
}

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

.cookie-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 6px 12px;
    font-size: 14px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.cookie-btn.secondary {
    background: #f1f1f1;
    color: #333;
}

.cookie-btn.primary {
    background: #3b5cff;
    color: #fff;
}

/* Modal overlay */
.cookie-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
}

.cookie-modal {
    background: #fff;
    width: 90%;
    max-width: 450px;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.cookie-modal h3 {
    margin: 0 0 16px 0;
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
}

.cookie-modal > p {
    font-size: 14px;
    color: #666;
    margin-bottom: 24px;
    line-height: 1.5;
}

.cookie-setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.cookie-setting-item:last-of-type {
    border-bottom: none;
    margin-bottom: 24px;
}

.cookie-setting-info h4,
.cookie-setting-info h5 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.cookie-setting-info p {
    margin: 4px 0 0 0;
    font-size: 12px;
    color: #888;
}

/* Toggle switch */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

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

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

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

input:checked + .cookie-slider {
    background-color: #3b5cff;
}

input:focus-visible + .cookie-slider {
    outline: 2px solid #3b5cff;
    outline-offset: 3px;
}

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

input:checked:disabled + .cookie-slider {
    background-color: #3b5cff;
    opacity: 0.8;
}

input:disabled:not(:checked) + .cookie-slider {
    background-color: #e6e6e6;
    cursor: not-allowed;
}

.cookie-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Persistent consent controls */
.cookie-settings-trigger {
    appearance: none;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--gray-500, #6b7280);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: color 150ms ease;
}

.cookie-settings-trigger:hover {
    color: var(--gray-700, #374151);
}

.cookie-settings-trigger:focus-visible {
    outline: 2px solid var(--accent, #2563eb);
    outline-offset: 4px;
    border-radius: 2px;
}

.cookie-settings-trigger--floating {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 9998;
    padding: 9px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

@media (max-width: 480px) {
    .cookie-settings-trigger--floating {
        right: 12px;
        bottom: 12px;
    }
}
