/* ============================================
   AJAIA Cookie Consent Banner
   Corner Widget - token design system (theme.css)
   ============================================ */

/* === Cookie Banner Container === */
.cookie-consent-banner {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 380px;
    max-width: calc(100vw - 48px);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 1px 0 var(--line), 0 24px 48px -30px rgba(13, 16, 23, 0.35);
    z-index: 10000;
    font-family: var(--font-body);
    transform: translateY(20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s var(--ease);
}

.cookie-consent-banner.visible {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.cookie-consent-banner[hidden] {
    display: none;
}

/* === Banner Header === */
.cookie-banner-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--line);
}

.cookie-banner-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-sft);
    border: 1px solid var(--accent-brd);
    border-radius: 8px;
}

.cookie-banner-icon::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 2px;
    background: var(--accent);
}

.cookie-banner-title {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    margin: 0;
}

.cookie-banner-subtitle {
    font-size: 12px;
    color: var(--muted);
    margin: 2px 0 0;
}

/* === Banner Body === */
.cookie-banner-body {
    padding: 16px 20px;
}

.cookie-banner-text {
    font-size: 13px;
    line-height: 1.6;
    color: var(--ink-soft);
    margin: 0 0 16px;
}

.cookie-banner-text a {
    color: var(--accent-ink);
    text-decoration: none;
    transition: color 0.2s var(--ease);
}

.cookie-banner-text a:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* === Cookie Categories === */
.cookie-categories {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.cookie-category {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 10px;
    transition: border-color 0.2s var(--ease);
}

.cookie-category:hover {
    border-color: var(--accent-brd);
}

.cookie-category-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Square category marker (icon font removed) */
.cookie-category-icon {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
    border-radius: 2px;
    font-size: 0;
    color: transparent;
}

.cookie-category-icon.essential {
    background: var(--ok);
}

.cookie-category-icon.functional {
    background: var(--warn);
}

.cookie-category-icon.analytics {
    background: var(--accent);
}

.cookie-category-label {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink);
}

.cookie-category-desc {
    font-size: 11px;
    color: var(--muted);
    margin-top: 1px;
}

/* === Toggle Switch === */
.cookie-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

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

.cookie-toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--line-str);
    border-radius: 24px;
    transition: all 0.3s var(--ease);
}

.cookie-toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: var(--surface);
    border-radius: 50%;
    transition: all 0.3s var(--ease);
}

.cookie-toggle input:checked+.cookie-toggle-slider {
    background: var(--accent);
}

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

.cookie-toggle input:disabled+.cookie-toggle-slider {
    opacity: 0.55;
    cursor: not-allowed;
}

.cookie-toggle input:disabled+.cookie-toggle-slider::before {
    background: var(--surface);
}

/* === GPC Notice === */
.gpc-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--accent-sft);
    border: 1px solid var(--accent-brd);
    border-radius: 8px;
    margin-bottom: 16px;
}

/* Neutralized icon element rendered as a square marker */
.gpc-notice i {
    display: inline-block;
    width: 9px;
    height: 9px;
    flex-shrink: 0;
    border-radius: 2px;
    background: var(--accent-ink);
    font-size: 0;
}

.gpc-notice span {
    font-size: 12px;
    color: var(--accent-ink);
    line-height: 1.4;
}

/* === Banner Actions === */
.cookie-banner-actions {
    display: flex;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid var(--line);
}

.cookie-btn {
    flex: 1;
    padding: 11px 16px;
    border: none;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s var(--ease), border-color 0.2s var(--ease),
        color 0.2s var(--ease), transform 0.2s var(--ease);
}

.cookie-btn-reject {
    background: transparent;
    border: 1.5px solid var(--line-str);
    color: var(--ink-soft);
}

.cookie-btn-reject:hover {
    border-color: var(--accent);
    color: var(--accent-ink);
    transform: translateY(-1px);
}

.cookie-btn-accept {
    background: var(--accent);
    color: white;
}

.cookie-btn-accept:hover {
    background: var(--accent-ink);
    color: white;
    transform: translateY(-1px);
}

.cookie-btn-save {
    background: var(--accent);
    color: white;
}

.cookie-btn-save:hover {
    background: var(--accent-ink);
    color: white;
    transform: translateY(-1px);
}

/* === Responsive === */
@media (max-width: 480px) {
    .cookie-consent-banner {
        bottom: 16px;
        right: 16px;
        left: 16px;
        width: auto;
        max-width: none;
    }

    .cookie-banner-actions {
        flex-direction: column;
    }

    .cookie-btn {
        width: 100%;
    }
}

/* === Animation for minimize/settings toggle === */
.cookie-banner-settings {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.cookie-banner-settings.expanded {
    max-height: 300px;
}
