/*
 * Crossborder Wizard – Stílusok
 *
 * BEM-szerű osztályozás: .cbw__ prefix minden elemen.
 * A WP téma alap betűtípusait és színeit használja, ahol lehet.
 * CSS custom property-ket alkalmazunk, így a téma könnyen felülírhatja.
 *
 * TESTRESZABÁS:
 * A :root változók felülírhatók a téma style.css-éből vagy
 * a WP Customizer Additional CSS mezőjéből.
 */

/* ─── CSS VÁLTOZÓK ─────────────────────────────────────────────────────────── */

.cbw {
    --cbw-accent:        #db3a34;       /* Kiemelő szín (kártyák hover, szám badge) */
    --cbw-accent-light:  #f4f4f4;       /* Kiemelő szín halvány háttér */
    --cbw-text:          #1e293b;       /* Fő szöveg */
    --cbw-text-muted:    ##34495d;       /* Másodlagos szöveg */
    --cbw-border:        #e2e8f0;       /* Szegélyek */
    --cbw-bg:            #f8fafc;       /* Háttér (lépés body, kártya hover) */
    --cbw-radius:        12px;          /* Lekerekítés */
    --cbw-radius-sm:     8px;
    --cbw-shadow:        0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
    --cbw-transition:    0.2s ease;

    font-family: inherit;
    color: var(--cbw-text);
    /*max-width: 860px;*/
    margin: 0 auto;
}

/* ─── TOOLBAR ──────────────────────────────────────────────────────────────── */

.cbw__toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.cbw__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--cbw-border);
    border-radius: var(--cbw-radius-sm);
    background: transparent;
    color: var(--cbw-text-muted);
    font-size: .875rem;
    cursor: pointer;
    transition: background var(--cbw-transition), color var(--cbw-transition);
}

.cbw__btn:hover {
    background: var(--cbw-bg);
    color: var(--cbw-text);
}

.cbw__btn-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ─── PANEL (minden szekcióhoz közös) ──────────────────────────────────────── */

#cb-wizard-root h2{
    font-weight: bold;
    font-size: 20px;
    color: #1b1b1b;
    margin: 10px 0;
    padding: 10px 0 10px 0;
}
#cb-wizard-root h3{font-size: 18px;}
#cb-wizard-root h4{font-size: 18px;}

.cbw__panel {
    margin-bottom: 32px;
}

.cbw__panel-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 8px;
    color: var(--cbw-text);
}

.cbw__panel-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    color: var(--cbw-accent);
}

.cbw__panel-hint {
    color: var(--cbw-text-muted);
    font-size: .9rem;
    margin: 0 0 24px;
}

/* ─── KÁRTYA RÁCS ──────────────────────────────────────────────────────────── */

.cbw__choice-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.cbw__choice-grid--three {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 600px) {
    .cbw__choice-grid,
    .cbw__choice-grid--three {
        grid-template-columns: 1fr;
    }
}

/* ─── VÁLASZTÓ KÁRTYA ──────────────────────────────────────────────────────── */

.cbw__card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding: 20px;
    border: 1.5px solid var(--cbw-border);
    border-radius: var(--cbw-radius);
    background: #fff;
    cursor: pointer;
    transition:
        border-color var(--cbw-transition),
        box-shadow var(--cbw-transition),
        transform var(--cbw-transition);
}

.cbw__card:hover {
    border-color: var(--cbw-accent);
    box-shadow: 0 0 0 3px var(--cbw-accent-light);
    transform: translateY(-1px);
}

.cbw__card:focus-visible {
    outline: 2px solid var(--cbw-accent);
    outline-offset: 2px;
}

.cbw__card-flag,
.cbw__card-icon {
    font-size: 1.75rem;
    margin-bottom: 12px;
    display: block;
    line-height: 1;
}

.cbw__card-title {
    font-weight: 600;
    font-size: 1rem;
    margin: 0 0 6px;
    color: var(--cbw-text);
}

.cbw__card-desc {
    font-size: .85rem;
    color: var(--cbw-text-muted);
    margin: 0;
    line-height: 1.5;
}

/* ─── TIMELINE (lépések listája) ───────────────────────────────────────────── */

.cbw__timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    /* Bal oldali összekötő vonal */
    position: relative;
}

.cbw__timeline::before {
    content: '';
    position: absolute;
    left: 19px;           /* A számjegy badge közepére igazítva */
    top: 38px;
    bottom: 38px;
    width: 2px;
    background: var(--cbw-border);
    border-radius: 1px;
    pointer-events: none;
}

/* ─── ACCORDION LÉPÉS ──────────────────────────────────────────────────────── */

.cbw__step {
    position: relative;
    background: #fff;
    border: 1px solid var(--cbw-border);
    border-radius: var(--cbw-radius);
    margin-bottom: 8px;
    overflow: hidden;
    transition: box-shadow var(--cbw-transition);
}

.cbw__step:hover {
    box-shadow: var(--cbw-shadow);
}

/* Nyitott állapot */
.cbw__step--open {
    box-shadow: var(--cbw-shadow);
    border-color: var(--cbw-accent);
}

/* ─── ACCORDION FEJLÉC GOMB ────────────────────────────────────────────────── */

.cbw__step-header {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 16px 16px 16px 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: left;
    color: inherit;
    transition: background var(--cbw-transition);
}

.cbw__step-header:hover {
    background: var(--cbw-bg);
}

.cbw__step-header:focus-visible {
    outline: 2px solid var(--cbw-accent);
    outline-offset: -2px;
}

/* Sorszám badge */
.cbw__step-num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--cbw-accent-light);
    color: var(--cbw-accent);
    font-size: .8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--cbw-transition), color var(--cbw-transition);
}

.cbw__step--open .cbw__step-num {
    background: var(--cbw-accent);
    color: #fff;
}

.cbw__step-texts {
    flex: 1;
    min-width: 0;
}

.cbw__step-title {
    display: block;
    font-weight: 600;
    font-size: .95rem;
    color: var(--cbw-text);
}

.cbw__step-summary {
    display: block;
    font-size: .83rem;
    color: var(--cbw-text-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* Nyitott állapotban elrejtjük a summary-t, mert a detail látszik */
    transition: opacity var(--cbw-transition);
}

.cbw__step--open .cbw__step-summary {
    opacity: 0;
    height: 0;
    margin: 0;
    overflow: hidden;
}

/* Chevron ikon */
.cbw__step-chevron {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--cbw-text-muted);
    transition: transform var(--cbw-transition);
}

.cbw__step--open .cbw__step-chevron {
    transform: rotate(180deg);
}

/* ─── ACCORDION TARTALOM ───────────────────────────────────────────────────── */

/* Csukott állapot: display:none helyett max-height animáció,
   hogy a CSS transition simán működjön */
.cbw__step-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.cbw__step--open .cbw__step-body {
    /* Elég nagy érték ahhoz, hogy bármilyen tartalom elférjen.
       Ennél hosszabb tartalomnál növeld meg. */
    max-height: 8000px;
}




.cbw__step-detail {
 padding: 20px 60px 20px 60px;
  font-size: 1rem;
    line-height: 1.7;
    color: var(--cbw-text);
}

/* A wysiwyg-ből érkező HTML elemek stílusa */
.cbw__step-detail p  { margin: 0 0 .75em; }
.cbw__step-detail ul,
.cbw__step-detail ol { margin: 0 0 .75em; padding-left: 1.4em; }
.cbw__step-detail li { margin-bottom: .25em; }
.cbw__step-detail h3,
.cbw__step-detail h4 { margin: 1em 0 .4em; font-size: 1rem; }
.cbw__step-detail a  { color: var(--cbw-accent); }

/* ─── LETÖLTÉSEK (lépésen belül) ───────────────────────────────────────────── */

.cbw__step-downloads {
    list-style: none;
    margin: 0;
    padding: 0 20px 20px 58px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ─── LETÖLTÉS LINK ────────────────────────────────────────────────────────── */

.cbw__dl-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid var(--cbw-border);
    border-radius: var(--cbw-radius-sm);
    background: var(--cbw-bg);
    color: var(--cbw-accent);
    font-size: .875rem;
    font-weight: 500;
    text-decoration: none;
    transition: background var(--cbw-transition), border-color var(--cbw-transition);
}

.cbw__dl-link:hover {
    background: var(--cbw-accent-light);
    border-color: var(--cbw-accent);
}

.cbw__dl-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Globális letöltések lista */
.cbw__download-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cbw__dl-item {
    flex: 0 0 auto;
}

/* ─── INFO ALOLDALAK ───────────────────────────────────────────────────────── */

.cbw__info-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cbw__info-item {
    border-radius: var(--cbw-radius-sm);
    overflow: hidden;
}

.cbw__info-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--cbw-bg);
    text-decoration: none;
    color: var(--cbw-text);
    border: 1px solid transparent;
    border-radius: var(--cbw-radius-sm);
    transition: background var(--cbw-transition), border-color var(--cbw-transition);
}

.cbw__info-link:hover {
    background: var(--cbw-accent-light);
    border-color: var(--cbw-accent);
}

.cbw__info-title {
    font-weight: 500;
    font-size: .92rem;
}

.cbw__info-arrow {
    width: 16px;
    height: 16px;
    color: var(--cbw-text-muted);
    flex-shrink: 0;
    transition: transform var(--cbw-transition);
}

.cbw__info-link:hover .cbw__info-arrow {
    transform: translateX(3px);
    color: var(--cbw-accent);
}

.cbw__info-teaser {
    font-size: .82rem;
    color: var(--cbw-text-muted);
    margin: 4px 0 8px 16px;
    line-height: 1.5;
}

/* ─── NINCS ADAT ────────────────────────────────────────────────────────────── */

.cbw__no-data {
    padding: 32px;
    text-align: center;
    color: var(--cbw-text-muted);
    border: 1px dashed var(--cbw-border);
    border-radius: var(--cbw-radius);
    font-size: .9rem;
}

/* ─── DARK MODE ALAPSTÁMOGATÁS ─────────────────────────────────────────────── */

@media (prefers-color-scheme: dark) {
    .cbw {
        --cbw-accent:        #60a5fa;
        --cbw-accent-light:  #1e3a5f;
        --cbw-text:          #f1f5f9;
        --cbw-text-muted:    #94a3b8;
        --cbw-border:        #334155;
        --cbw-bg:            #1e293b;
    }

    .cbw__card,
    .cbw__step {
        background: #0f172a;
    }

    .cbw__step-header:hover {
        background: #1e293b;
    }
}


/* ─── BEVEZETÉS BLOKK ──────────────────────────────────────────────────────── */

.cbw__intro {
    margin-bottom: 24px;
    padding: 16px 20px;
    background: var(--cbw-bg);
    //border-left: 3px solid var(--cbw-accent);
    border-radius: 0 var(--cbw-radius-sm) var(--cbw-radius-sm) 0;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--cbw-text);
}

.cbw__intro p  { margin: 0 0 .75em; }
.cbw__intro p:last-child { margin-bottom: 0; }
.cbw__intro ul,
.cbw__intro ol { margin: 0 0 .75em; padding-left: 1.4em; }
.cbw__intro a  { color: var(--cbw-accent); }