/* =========================================================
   AT Cookie Consent — v1.0.1
   Compact bottom bar, no dimming overlay
   ========================================================= */

:root {
    --at-cc-accent:     #1e4fa3;
    --at-cc-accent-dk:  #163a7a;
    --at-cc-text:       #1a1a2e;
    --at-cc-muted:      #6b7280;
    --at-cc-bg:         #ffffff;
    --at-cc-border:     #e2e6f0;
    --at-cc-font:       'Heebo', 'Assistant', Arial, sans-serif;
    --at-cc-ease:       0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Bar — fixed bottom strip, no overlay ---- */
#at-cc-overlay {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999999;
    font-family: var(--at-cc-font);
    direction: rtl;
    animation: at-cc-rise 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}

#at-cc-overlay.at-cc-hidden {
    animation: at-cc-sink 0.22s ease both;
}

@keyframes at-cc-rise {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
@keyframes at-cc-sink {
    from { transform: translateY(0);    opacity: 1; }
    to   { transform: translateY(100%); opacity: 0; }
}

/* ---- Main bar ---- */
.at-cc-banner {
    background: var(--at-cc-bg);
    border-top: 1px solid var(--at-cc-border);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* ---- Text block ---- */
.at-cc-text-wrap {
    flex: 1;
    min-width: 200px;
}

.at-cc-desc {
    font-size: 0.8rem;
    color: var(--at-cc-muted);
    line-height: 1.5;
    margin: 0;
}

.at-cc-link {
    color: var(--at-cc-accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color var(--at-cc-ease);
}
.at-cc-link:hover {
    border-bottom-color: var(--at-cc-accent);
}

/* ---- Buttons row ---- */
.at-cc-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.at-cc-btn {
    font-family: var(--at-cc-font);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 6px;
    padding: 7px 16px;
    cursor: pointer;
    transition: all var(--at-cc-ease);
    white-space: nowrap;
    line-height: 1;
    border: 1px solid transparent;
}

.at-cc-btn--primary {
    background: var(--at-cc-accent);
    color: #fff;
    border-color: var(--at-cc-accent);
}
.at-cc-btn--primary:hover {
    background: var(--at-cc-accent-dk);
    border-color: var(--at-cc-accent-dk);
}

.at-cc-btn--ghost {
    background: transparent;
    color: var(--at-cc-muted);
    border-color: var(--at-cc-border);
}
.at-cc-btn--ghost:hover {
    color: var(--at-cc-text);
    border-color: #b0b8cc;
}

.at-cc-btn--link {
    background: transparent;
    color: var(--at-cc-muted);
    border: none;
    padding: 7px 4px;
    font-weight: 400;
    font-size: 0.75rem;
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: color var(--at-cc-ease), text-decoration-color var(--at-cc-ease);
}
.at-cc-btn--link:hover {
    color: var(--at-cc-text);
    text-decoration-color: currentColor;
}

/* ---- Save custom (hidden until panel open) ---- */
.at-cc-btn--secondary {
    background: #eef2fb;
    color: var(--at-cc-accent);
    border-color: #c8d5f0;
}
.at-cc-btn--secondary:hover {
    background: #dce6f8;
}

/* ---- Category panel (expands above bar) ---- */
.at-cc-categories {
    background: #f8f9fc;
    border-top: 1px solid var(--at-cc-border);
    padding: 12px 20px;
    display: none;
    gap: 0;
}

.at-cc-categories.at-cc-open {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    animation: at-cc-expand 0.2s ease both;
}

@keyframes at-cc-expand {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.at-cc-category {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid var(--at-cc-border);
    border-radius: 8px;
    padding: 8px 12px;
}

.at-cc-category-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--at-cc-text);
}

.at-cc-badge--required {
    font-size: 0.68rem;
    color: var(--at-cc-muted);
    font-weight: 400;
}

/* ---- Toggle switch ---- */
.at-cc-toggle {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    flex-shrink: 0;
    cursor: pointer;
}

.at-cc-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.at-cc-slider {
    position: absolute;
    inset: 0;
    background: #cbd5e1;
    border-radius: 20px;
    transition: background var(--at-cc-ease);
}

.at-cc-slider::before {
    content: '';
    position: absolute;
    height: 14px;
    width: 14px;
    right: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform var(--at-cc-ease);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.at-cc-toggle input:checked + .at-cc-slider { background: var(--at-cc-accent); }
.at-cc-toggle input:checked + .at-cc-slider::before { transform: translateX(-16px); }

.at-cc-toggle--disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* ---- Focus ---- */
.at-cc-btn:focus-visible {
    outline: 2px solid var(--at-cc-accent);
    outline-offset: 2px;
}
.at-cc-toggle input:focus-visible + .at-cc-slider {
    outline: 2px solid var(--at-cc-accent);
    outline-offset: 1px;
}

/* ---- Mobile ---- */
@media (max-width: 600px) {
    .at-cc-banner {
        padding: 10px 14px;
        gap: 10px;
    }

    .at-cc-text-wrap {
        width: 100%;
        min-width: unset;
        flex: none;
    }

    .at-cc-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .at-cc-categories.at-cc-open {
        padding: 10px 14px;
    }

    .at-cc-category {
        width: 100%;
    }
}
