/* ================================================================
   COOKIE-SETTINGS.CSS — Nexora cookie preferences control
   Depends on root-tokens.css + core.css. Styles the "Cookie
   Settings" trigger in footer-bottom plus the modal it opens.
   ================================================================ */

.footer-bottom-cookie-btn {
    font-family: var(--font-family-sans);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-500);
    color: var(--color-text-secondary);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color var(--duration-fast) var(--ease-standard);
}

.footer-bottom-cookie-btn:hover {
    color: var(--color-primary-hover);
}

/* ----------------------------------------------------------------
   MODAL
   ---------------------------------------------------------------- */
.cookie-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-24);
    background: rgba(var(--color-text-rgb), 0.4);
}

.cookie-modal-overlay[hidden] {
    display: none;
}

.cookie-modal {
    width: 100%;
    max-width: 440px;
    max-height: calc(100vh - var(--space-48));
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-20);
    padding: var(--space-24);
    background: var(--color-background);
    border: var(--border-width-thin) solid var(--color-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
}

.cookie-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-16);
}

.cookie-modal-title {
    font-family: var(--font-family-display);
    font-size: var(--font-size-lg);
    color: var(--color-text);
}

.cookie-modal-close {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    font-size: var(--font-size-md);
    line-height: 1;
    color: var(--color-text-secondary);
    border-radius: var(--radius-circle);
    transition: background var(--duration-fast) var(--ease-standard),
                color var(--duration-fast) var(--ease-standard);
}

.cookie-modal-close:hover {
    background: var(--color-surface);
    color: var(--color-text);
}

.cookie-modal-desc {
    font-family: var(--font-family-sans);
    font-size: var(--font-size-sm);
    line-height: var(--leading-relaxed);
    color: var(--color-text-secondary);
}

.cookie-modal-options {
    display: flex;
    flex-direction: column;
    gap: var(--space-16);
}

.cookie-option {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-16);
    padding-bottom: var(--space-16);
    border-bottom: var(--border-width-thin) solid var(--color-border);
}

.cookie-option:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.cookie-option-text {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.cookie-option-title {
    font-family: var(--font-family-sans);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-600);
    color: var(--color-text);
}

.cookie-option-desc {
    font-family: var(--font-family-sans);
    font-size: var(--font-size-xs);
    line-height: var(--leading-relaxed);
    color: var(--color-text-secondary);
}

/* Toggle switch */
.cookie-toggle {
    position: relative;
    flex: none;
    width: 40px;
    height: 24px;
}

.cookie-toggle-input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

.cookie-toggle-track {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: var(--color-border);
    border-radius: var(--radius-full);
    transition: background var(--duration-fast) var(--ease-standard);
}

.cookie-toggle-track::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: var(--color-background);
    border-radius: var(--radius-circle);
    box-shadow: var(--shadow-xs);
    transition: transform var(--duration-fast) var(--ease-standard);
}

.cookie-toggle-input:checked + .cookie-toggle-track {
    background: var(--color-primary);
}

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

.cookie-toggle-input:disabled + .cookie-toggle-track {
    background: var(--color-primary);
    opacity: 0.5;
    cursor: not-allowed;
}

.cookie-toggle-input:focus-visible + .cookie-toggle-track {
    box-shadow: var(--shadow-focus-ring);
}

.cookie-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-8);
}

.cookie-modal-actions .btn {
    flex: 1;
}
