/* ============================================================
   Szerszámolcsón.hu – cookie-consent.css
   Süti-hozzájárulás sáv + /suti-beallitasok oldal
   A base.css változóira épül (--gold, --surface, --fd, --ease stb.)
   ============================================================ */

/* ============================================================
   SÁV – fixen az oldal alján
   ============================================================ */
.ck-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9998;                 /* a flash-messages (9999) alatt marad */
    display: flex;
    justify-content: center;
    padding: 0 var(--page-pad) var(--page-pad);
    pointer-events: none;          /* a sávon kívüli terület kattintható marad */
}

.ck-inner {
    pointer-events: auto;
    width: 100%;
    max-width: 1040px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-lg);
    overflow: hidden;
    position: relative;

    /* Kiinduló (rejtett) állapot – a JS adja hozzá az .is-open osztályt */
    transform: translateY(130%);
    opacity: 0;
    transition: transform .55s var(--ease), opacity .35s var(--ease);
}

/* Arany akcentus csík a tetején – illeszkedik az oldal arculatához */
.ck-inner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg,
                var(--gold) 0%,
                var(--gold-h) 45%,
                var(--gold) 100%);
}

.ck-banner.is-open .ck-inner {
    transform: translateY(0);
    opacity: 1;
}

/* Bezáráskor lefelé csúszik */
.ck-banner.is-closing .ck-inner {
    transform: translateY(130%);
    opacity: 0;
}

/* ============================================================
   FŐ SÁV TARTALOM
   ============================================================ */
.ck-main {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 22px;
}

.ck-icon {
    font-size: 30px;
    line-height: 1;
    flex-shrink: 0;
}

.ck-text {
    flex: 1;
    min-width: 0;
}

.ck-title {
    font-family: var(--fd);
    font-weight: 800;
    font-size: 16px;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: var(--text);
    line-height: 1.1;
    margin-bottom: 4px;
}

.ck-desc {
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--text-3);
    margin: 0;
}

.ck-desc a {
    color: var(--gold);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: var(--t);
}
.ck-desc a:hover { color: var(--gold-h); }

.ck-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* ============================================================
   GOMBOK
   Saját osztályok (nem .btn), mert a .btn::before shine-effekt
   és a nagy padding itt zavaró lenne. Az elfogadás és elutasítás
   AZONOS méretű – jogszabályi elvárás (egyenrangú választás).
   ============================================================ */
.ck-btn {
    font-family: var(--fd);
    font-weight: 800;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 10px 18px;
    border-radius: var(--r-sm);
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: var(--t);
    white-space: nowrap;
    line-height: 1;
}

.ck-btn--gold {
    background: var(--gold);
    color: #fff;
    border-color: var(--gold);
}
[data-theme="dark"] .ck-btn--gold { color: #000; }
.ck-btn--gold:hover {
    background: var(--gold-h);
    border-color: var(--gold-h);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(var(--gold-rgb),.35);
}

/* Elutasítás – kitöltött, semleges. Vizuálisan azonos súlyú az elfogadással. */
.ck-btn--plain {
    background: var(--surface-2);
    color: var(--text);
    border-color: var(--border);
}
.ck-btn--plain:hover {
    background: var(--surface-2);
    border-color: var(--text-3);
    transform: translateY(-2px);
}

/* Beállítások – visszafogottabb, mert ez nem választás, hanem továbblépés */
.ck-btn--ghost {
    background: transparent;
    color: var(--text-3);
    border-color: transparent;
    text-decoration: underline;
    text-underline-offset: 3px;
    padding: 10px 10px;
}
.ck-btn--ghost:hover { color: var(--gold); }

/* ============================================================
   LENYÍLÓ BEÁLLÍTÁS PANEL
   ============================================================ */
.ck-panel {
    border-top: 1px solid var(--border-soft);
    background: var(--surface-3);
    padding: 18px 22px;
    animation: ckPanelIn .35s var(--ease);
}

@keyframes ckPanelIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ck-cats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.ck-cat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: 13px 14px;
}

.ck-cat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.ck-cat-badge {
    font-family: var(--fm);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .9px;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: var(--r-xs);
    white-space: nowrap;
}

.ck-cat-badge--req  { background: var(--surface-2); color: var(--text-3); border: 1px solid var(--border); }
.ck-cat-badge--stat { background: rgba(37,99,235,.10);  color: var(--blue); border: 1px solid rgba(37,99,235,.22); }
.ck-cat-badge--mkt  { background: var(--gold-dim);      color: var(--gold); border: 1px solid rgba(var(--gold-rgb),.28); }

.ck-cat-title {
    font-family: var(--fd);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .3px;
    text-transform: uppercase;
    color: var(--text);
    line-height: 1.2;
    margin-bottom: 5px;
}

.ck-cat-desc {
    font-size: 11.5px;
    line-height: 1.55;
    color: var(--text-3);
    margin: 0;
}

.ck-panel-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.ck-panel-link {
    font-family: var(--fm);
    font-size: 10px;
    letter-spacing: .5px;
    color: var(--text-4);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: var(--t);
}
.ck-panel-link:hover { color: var(--gold); }

/* ============================================================
   KAPCSOLÓ (switch)
   ============================================================ */
.ck-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}

.ck-switch input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.ck-slider {
    position: absolute;
    inset: 0;
    background: var(--border);
    border-radius: 999px;
    transition: var(--t);
    pointer-events: none;
}

.ck-slider::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    left: 3px;
    top: 3px;
    background: var(--surface);
    border-radius: 50%;
    box-shadow: var(--sh-sm);
    transition: transform .22s var(--ease);
}

.ck-switch input:checked ~ .ck-slider { background: var(--gold); }
.ck-switch input:checked ~ .ck-slider::before { transform: translateX(18px); }

.ck-switch input:disabled { cursor: not-allowed; }
.ck-switch input:disabled ~ .ck-slider { opacity: .5; }

.ck-switch input:focus-visible ~ .ck-slider {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* ============================================================
   /suti-beallitasok OLDAL
   ============================================================ */
.ck-page {
    max-width: 780px;
    margin: 0 auto;
    padding: 8px 0 60px;
}

.ck-page-lead {
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.7;
    margin-bottom: 26px;
}

.ck-page .ck-cats {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 22px;
}

.ck-page .ck-cat { padding: 16px 18px; }
.ck-page .ck-cat-title { font-size: 15px; }
.ck-page .ck-cat-desc  { font-size: 12.5px; }

.ck-page-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 18px;
    border-top: 1px solid var(--border-soft);
}

.ck-page-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--fm);
    font-size: 11px;
    color: var(--green);
    margin-top: 14px;
    opacity: 0;
    transition: opacity .3s var(--ease);
}
.ck-page-status.is-shown { opacity: 1; }

.ck-page-current {
    background: var(--surface-3);
    border: 1px solid var(--border-soft);
    border-radius: var(--r-sm);
    padding: 12px 14px;
    font-family: var(--fm);
    font-size: 11px;
    color: var(--text-3);
    line-height: 1.7;
    margin-bottom: 24px;
}

/* ============================================================
   RESZPONZÍV
   ============================================================ */
@media (max-width: 900px) {
    .ck-cats { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .ck-banner { padding: 0 10px 10px; }

    .ck-main {
        flex-wrap: wrap;
        gap: 12px;
        padding: 16px 16px 14px;
    }

    .ck-icon { font-size: 24px; }

    .ck-text { flex: 1 1 auto; }

    .ck-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    /* Mobilon az elfogadás/elutasítás egymás mellett, teljes szélességben */
    .ck-actions .ck-btn--plain,
    .ck-actions .ck-btn--gold {
        flex: 1 1 0;
        padding: 12px 10px;
        font-size: 12px;
    }
    .ck-actions .ck-btn--ghost {
        order: 3;
        flex: 1 1 100%;
        padding: 6px 0 0;
    }

    .ck-panel { padding: 14px 16px 16px; }

    .ck-panel-foot { flex-direction: column-reverse; align-items: stretch; }
    .ck-panel-foot .ck-btn { width: 100%; padding: 12px; }
    .ck-panel-link { text-align: center; }

    .ck-page-actions .ck-btn { flex: 1 1 100%; padding: 13px; }
}

/* ============================================================
   CSÖKKENTETT MOZGÁS
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    .ck-inner {
        transition: opacity .2s linear;
        transform: none;
    }
    .ck-banner.is-open .ck-inner,
    .ck-banner.is-closing .ck-inner { transform: none; }
    .ck-panel { animation: none; }
    .ck-btn:hover { transform: none; }
}
