/* ============================================================
   Endorbit Cookie Consent — centered popup, light gray
   ============================================================ */

/* Overlay */
#endorbit-cookie-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

#endorbit-cookie-overlay.ecc-visible {
    opacity: 1;
}

/* Popup card */
#endorbit-cookie-popup {
    background: #f0f0f0;
    color: #111;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.22);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.55;
    transform: scale(0.96) translateY(12px);
    transition: transform 0.25s ease;
}

#endorbit-cookie-overlay.ecc-visible #endorbit-cookie-popup {
    transform: scale(1) translateY(0);
}

/* ── Header ────────────────────────────────────────────────── */

.ecc-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 24px 24px 0;
}

.ecc-icon {
    width: 22px;
    height: 22px;
    color: #555;
    flex-shrink: 0;
}

.ecc-title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #111;
    letter-spacing: -0.01em;
}

/* ── Body text ─────────────────────────────────────────────── */

.ecc-body {
    padding: 14px 24px 20px;
}

.ecc-text {
    margin: 0;
    color: #555;
    font-size: 13px;
}

.ecc-privacy-link {
    color: #111;
    text-decoration: underline;
}
.ecc-privacy-link:hover {
    color: #555;
}

/* ── Details panel ─────────────────────────────────────────── */

.ecc-details {
    border-top: 1px solid #ddd;
    overflow: hidden;
}

/* Single consent row */
.ecc-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 24px;
    border-bottom: 1px solid #e4e4e4;
    background: #f8f8f8;
}

.ecc-item:first-child {
    background: #f8f8f8;
}

.ecc-item--essential {
    opacity: .7;
}

.ecc-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.ecc-item-label {
    font-size: 13px;
    font-weight: 600;
    color: #111;
    display: flex;
    align-items: center;
    gap: 7px;
}

.ecc-badge {
    display: inline-block;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    border: 1px solid #bbb;
    color: #888;
    border-radius: 2px;
}

.ecc-item-desc {
    font-size: 12px;
    color: #888;
}

/* Toggle switch — dark-on-light */
.ecc-toggle {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
    cursor: pointer;
}

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

.ecc-toggle-track {
    position: absolute;
    inset: 0;
    background: #ccc;
    border: 2px solid #bbb;
    transition: background .22s, border-color .22s;
}

.ecc-toggle-track::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
    transition: transform .22s, background .22s;
}

.ecc-toggle input:checked + .ecc-toggle-track {
    background: #222;
    border-color: #222;
}

.ecc-toggle input:checked + .ecc-toggle-track::before {
    background: #fff;
    transform: translateX(20px);
}

.ecc-toggle input:disabled + .ecc-toggle-track {
    cursor: not-allowed;
}

.ecc-toggle input:focus-visible + .ecc-toggle-track {
    outline: 2px solid #111;
    outline-offset: 2px;
}

/* Save row inside details */
.ecc-save-row {
    padding: 16px 24px;
    background: #f0f0f0;
}

/* ── Footer ────────────────────────────────────────────────── */

.ecc-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #ddd;
    flex-wrap: wrap;
}

.ecc-footer-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* ── Buttons ───────────────────────────────────────────────── */

.ecc-btn {
    display: inline-block;
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: .02em;
    cursor: pointer;
    border: 2px solid transparent;
    background: none;
    color: inherit;
    font-family: inherit;
    transition: background .18s, color .18s, border-color .18s;
    white-space: nowrap;
}

.ecc-btn--full {
    width: 100%;
    text-align: center;
}

/* Text — Testreszabás */
.ecc-btn--text {
    padding-left: 0;
    padding-right: 0;
    color: #888;
    border-color: transparent;
}
.ecc-btn--text:hover {
    color: #111;
}

/* Outline — Elutasítás */
.ecc-btn--outline {
    border-color: #bbb;
    color: #444;
    background: transparent;
}
.ecc-btn--outline:hover {
    border-color: #111;
    color: #111;
}

/* Primary — Elfogadom / Mentés */
.ecc-btn--primary {
    background: #111;
    color: #fff;
    border-color: #111;
}
.ecc-btn--primary:hover {
    background: #333;
    border-color: #333;
}

/* ── Scrollbar (details panel) ─────────────────────────────── */

#endorbit-cookie-popup::-webkit-scrollbar { width: 4px; }
#endorbit-cookie-popup::-webkit-scrollbar-track { background: transparent; }
#endorbit-cookie-popup::-webkit-scrollbar-thumb { background: #ccc; }

/* ── Responsive ────────────────────────────────────────────── */

@media (max-width: 540px) {
    .ecc-footer {
        flex-direction: column;
        align-items: stretch;
    }
    .ecc-footer-right {
        flex-direction: column;
    }
    .ecc-btn--outline,
    .ecc-btn--primary {
        width: 100%;
        text-align: center;
    }
    .ecc-btn--text {
        text-align: center;
    }
}