/**
 * Cookie Consent Styles
 * Uses CSS variables from main.css for theme support
 */

/* Cookie Consent Banner */
.cookieConsent {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
    padding: 20px;
    z-index: 1001;
    box-shadow: var(--shadow-lg);
}

.cookieConsent.visible {
    display: block;
}

.cookieContent {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.cookieText h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: var(--text);
}

.cookieText p {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
    max-width: 600px;
}

.cookieActions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.cookieBtn {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.cookieBtnPrimary {
    background: var(--accent);
    border: none;
    color: white;
}

.cookieBtnPrimary:hover {
    background: var(--accent-hover);
}

.cookieBtnSecondary {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
}

.cookieBtnSecondary:hover {
    background: var(--bg-elevated);
    border-color: var(--accent);
}

.cookieBtnLink {
    background: none;
    border: none;
    color: var(--accent);
    padding: 10px;
}

.cookieBtnLink:hover {
    text-decoration: underline;
    color: var(--accent-hover);
}

/* Cookie Settings Modal */
.cookieSettingsModal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1002;
    align-items: center;
    justify-content: center;
}

.cookieSettingsModal.visible {
    display: flex;
}

.cookieSettingsContent {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    overflow: auto;
    position: relative;
}

.cookieCloseBtn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-glow);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    z-index: 2;
    transition: all 0.2s;
}

.cookieCloseBtn:hover {
    background: var(--accent-glow);
    color: var(--text);
    border-color: var(--accent);
}

.cookieSettingsContent h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
    color: var(--text);
}

.cookieSettingsSubtitle {
    color: var(--text-secondary);
    font-size: 13px;
    margin: 0 0 24px 0;
}

.cookieCategory {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.cookieCategory:last-of-type {
    border-bottom: none;
}

.cookieCategoryHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.cookieCategoryName {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.cookieCategoryDesc {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Toggle Switch */
.cookieToggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

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

.cookieToggleSlider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--border);
    border-radius: 26px;
    transition: 0.3s;
}

.cookieToggleSlider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.cookieToggle input:checked + .cookieToggleSlider {
    background: var(--accent);
}

.cookieToggle input:checked + .cookieToggleSlider:before {
    transform: translateX(22px);
}

.cookieToggle.cookieToggleDisabled .cookieToggleSlider {
    opacity: 0.6;
    cursor: not-allowed;
}

.cookieSettingsActions {
    margin-top: 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .cookieContent {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .cookieActions {
        justify-content: center;
    }

    .cookieSettingsContent {
        padding: 24px;
        margin: 16px;
    }
}
