/* =============================================================================
   SECTIONS/CENIK-MODAL.CSS — okno „Upravit balíček"
   -----------------------------------------------------------------------------
   Načítá se jen s blokem ceníku.
   ========================================================================== */

/* ============================================================
   pricing-modal.css – tlačítka v ceníku + konfigurátor balíčku
   Navazuje na pricing.css / design system mojekariera.online
   ============================================================ */

/* ----- Tlačítka pod cenou balíčku ----- */
.split-cta {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 0.75rem;
}

.split-btn {
    -webkit-flex: 1 1 160px;
    flex: 1 1 160px;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.75rem 1rem;
    border-radius: 9px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    border: 1.5px solid transparent;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.split-btn .material-icons {
    font-size: 1.05rem;
}

.split-btn--order {
    background: #ffffff;
    color: var(--primary-blue, #0066cc);
}

.split-btn--order:hover {
    background: #e8f1f9;
    -webkit-transform: translateY(-1px);
    transform: translateY(-1px);
}

.pricing-split--student .split-btn--order {
    color: #c2410c;
}

.split-btn--config {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
}

.split-btn--config:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.7);
    -webkit-transform: translateY(-1px);
    transform: translateY(-1px);
}

/* ============================================================
   Overlay + dialog
   ============================================================ */
body.pkgcfg-lock {
    overflow: hidden;
}

.pkgcfg-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 9999;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(10, 25, 41, 0.75);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.2s ease;
    overflow-y: auto;
}

.pkgcfg-overlay[hidden] {
    display: none;
}

.pkgcfg-overlay.is-open {
    opacity: 1;
}

.pkgcfg-dialog {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: auto;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
    padding: 2rem 2rem 1.6rem;
    -webkit-transform: translateY(14px);
    transform: translateY(14px);
    transition: transform 0.25s ease;
}

.pkgcfg-overlay.is-open .pkgcfg-dialog {
    -webkit-transform: translateY(0);
    transform: translateY(0);
}

.pkgcfg-close {
    position: absolute;
    top: 0.9rem;
    right: 0.9rem;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 9px;
    background: #eef2f7;
    color: #64748b;
    cursor: pointer;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
}

.pkgcfg-close:hover {
    background: #e2e8f0;
    color: #1a1a1a;
}

.pkgcfg-close .material-icons {
    font-size: 1.25rem;
}

/* ----- Hlavička ----- */
.pkgcfg-head {
    margin-bottom: 1.4rem;
    padding-right: 3rem;
}

.pkgcfg-head h3 {
    font-family: 'Raleway', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-blue, #0066cc);
    line-height: 1.25;
    margin: 0 0 0.35rem;
}

.pkgcfg-head p {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

/* ============================================================
   Tabulka konfigurace – hlavička / přepínače / rozdíl v ceně
   ============================================================ */
.pkgcfg-table {
    --pkgcfg-cols: 118px 0.95fr 1.15fr 1fr 1.6fr 0.95fr 1.3fr;
    display: grid;
    grid-template-columns: var(--pkgcfg-cols);
    border: 1px solid #d6e0ea;
    border-radius: 12px;
    overflow: hidden;
}

.pkgcfg-cell {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-justify-content: center;
    justify-content: center;
    min-width: 0;
    padding: 0.7rem 0.8rem;
}

.pkgcfg-cell.is-right {
    -webkit-align-items: flex-end;
    align-items: flex-end;
    text-align: right;
}

/* ----- Řádek 1: hlavička ----- */
.pkgcfg-cell.is-head {
    background: #0a1929;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    line-height: 1.3;
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
}

.pkgcfg-cell.is-head + .pkgcfg-cell.is-head {
    -webkit-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.12);
    box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.12);
}

/* ----- Řádek 2: přepínače ----- */
.pkgcfg-cell.is-ctrl {
    background: #ffffff;
    padding-top: 0.95rem;
    padding-bottom: 0.95rem;
}

.pkgcfg-cell.is-ctrl + .pkgcfg-cell.is-ctrl {
    border-left: 1px solid #e8eef4;
}

/* ----- Řádek 3: rozdíl v ceně ----- */
.pkgcfg-cell.is-delta {
    background: #f4f8fc;
    border-top: 1px solid #e2eaf2;
}

.pkgcfg-cell.is-delta + .pkgcfg-cell.is-delta {
    border-left: 1px solid #e2eaf2;
}

/* ----- Štítky řádků (první sloupec) ----- */
.pkgcfg-cell.col-0 {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
    line-height: 1.3;
}

.pkgcfg-cell.is-ctrl.col-0,
.pkgcfg-cell.is-delta.col-0 {
    background: #eef3f8;
}

/* ----- Pevné hodnoty ----- */
.pkgcfg-fixed {
    font-size: 0.88rem;
    font-weight: 700;
    color: #475569;
}

/* ----- Cena a úspora ----- */
.pkgcfg-total {
    font-family: 'Raleway', sans-serif;
    font-size: 1.65rem;
    font-weight: 900;
    line-height: 1;
    color: var(--primary-blue, #0066cc);
    white-space: nowrap;
}

.pkgcfg-save {
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-align-items: center;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.55rem;
    border-radius: 20px;
    background: #dcfce7;
    color: #15803d;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.pkgcfg-save .material-icons {
    font-size: 0.85rem;
}

/* ----- Rozdíly ----- */
.pkgcfg-delta {
    font-size: 0.84rem;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}

.pkgcfg-delta.is-plus {
    color: #b45309;
}

.pkgcfg-delta.is-minus {
    color: #15803d;
}

.pkgcfg-delta.is-zero {
    color: #94a3b8;
    font-weight: 600;
}

/* ============================================================
   Ovládací prvky
   ============================================================ */
.pkgcfg-stepper {
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-align-items: center;
    align-items: center;
    gap: 2px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    padding: 2px;
    -webkit-align-self: flex-start;
    align-self: flex-start;
}

.pkgcfg-step {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 7px;
    background: #eef2f7;
    color: var(--primary-blue, #0066cc);
    cursor: pointer;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    transition: background 0.15s ease, opacity 0.15s ease;
}

.pkgcfg-step .material-icons {
    font-size: 1.05rem;
}

.pkgcfg-step:hover:not(:disabled) {
    background: #dbe9f7;
}

.pkgcfg-step:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.pkgcfg-step-val {
    min-width: 30px;
    text-align: center;
    font-family: 'Raleway', sans-serif;
    font-size: 1.05rem;
    font-weight: 900;
    color: #1e293b;
}

/* ----- Segmentovaný přepínač ----- */
.pkgcfg-seg {
    display: -webkit-inline-flex;
    display: inline-flex;
    background: #e8edf3;
    border-radius: 9px;
    padding: 3px;
    gap: 2px;
    -webkit-align-self: flex-start;
    align-self: flex-start;
    max-width: 100%;
}

.pkgcfg-seg-btn {
    -webkit-flex: 1;
    flex: 1;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #7d8ea3;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.4rem 0.55rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}

.pkgcfg-seg-btn:hover:not(.is-on) {
    color: var(--primary-blue, #0066cc);
    background: rgba(255, 255, 255, 0.6);
}

.pkgcfg-seg-btn.is-on {
    background: #ffffff;
    color: var(--primary-blue, #0066cc);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

/* ============================================================
   Patička modálu
   ============================================================ */
.pkgcfg-foot {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    gap: 1.2rem 2rem;
    margin-top: 1.4rem;
    padding-top: 1.3rem;
    border-top: 1px solid #e2e8f0;
}

.pkgcfg-note {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: flex-start;
    align-items: flex-start;
    gap: 0.6rem;
    -webkit-flex: 1 1 360px;
    flex: 1 1 360px;
    min-width: 0;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #64748b;
}

.pkgcfg-note .material-icons {
    font-size: 1.15rem;
    color: #059669;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.pkgcfg-note strong {
    display: block;
    color: #1e293b;
    font-weight: 700;
}

.pkgcfg-note b {
    color: #1e293b;
    font-weight: 700;
    white-space: nowrap;
}

/* ----- Akce ----- */
.pkgcfg-actions {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-justify-content: flex-end;
    justify-content: flex-end;
    gap: 0.7rem;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
}

.pkgcfg-btn {
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-align-items: center;
    align-items: center;
    gap: 0.45rem;
    padding: 0.72rem 1.35rem;
    border-radius: 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.pkgcfg-btn .material-icons {
    font-size: 1.05rem;
}

.pkgcfg-btn--ghost {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #64748b;
}

.pkgcfg-btn--ghost:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.pkgcfg-btn--primary {
    background: var(--primary-blue, #0066cc);
    color: #ffffff;
}

.pkgcfg-btn--primary:hover {
    -webkit-transform: translateY(-1px);
    transform: translateY(-1px);
    background: #0a1929;
}

/* ----- Focus ----- */
.pkgcfg-overlay button:focus-visible,
.pkgcfg-overlay a:focus-visible,
.split-btn:focus-visible {
    outline: 2px solid #2E8AC7;
    outline-offset: 2px;
}

/* ============================================================
   Responsive – pod 980 px se tabulka skládá po sloupcích
   ============================================================ */
@media (max-width: 980px) {
    .pkgcfg-dialog {
        padding: 1.5rem 1.2rem 1.2rem;
    }

    .pkgcfg-table {
        display: -webkit-flex;
        display: flex;
        -webkit-flex-direction: column;
        flex-direction: column;
    }

    /* štítky řádků nedávají ve sloupcovém režimu smysl */
    .pkgcfg-cell.col-0 {
        display: none;
    }

    .pkgcfg-cell {
        -webkit-flex-direction: row;
        flex-direction: row;
        -webkit-align-items: center;
        align-items: center;
        -webkit-justify-content: space-between;
        justify-content: space-between;
        gap: 0.75rem;
        text-align: left;
    }

    .pkgcfg-cell.is-right {
        -webkit-align-items: center;
        align-items: center;
        text-align: left;
    }

    .pkgcfg-cell.is-head + .pkgcfg-cell.is-head,
    .pkgcfg-cell.is-ctrl + .pkgcfg-cell.is-ctrl,
    .pkgcfg-cell.is-delta + .pkgcfg-cell.is-delta {
        border-left: none;
        -webkit-box-shadow: none;
        box-shadow: none;
    }

    .pkgcfg-cell.is-ctrl {
        padding-bottom: 0.6rem;
    }

    .pkgcfg-cell.is-delta {
        border-top: none;
        padding-top: 0;
        padding-bottom: 0.95rem;
        -webkit-justify-content: flex-end;
        justify-content: flex-end;
    }

    /* pořadí: hlavička → přepínač → rozdíl, sloupec po sloupci */
    .pkgcfg-cell:nth-child(2)  { order: 1; }
    .pkgcfg-cell:nth-child(9)  { order: 2; }
    .pkgcfg-cell:nth-child(16) { order: 3; }
    .pkgcfg-cell:nth-child(3)  { order: 4; }
    .pkgcfg-cell:nth-child(10)  { order: 5; }
    .pkgcfg-cell:nth-child(17) { order: 6; }
    .pkgcfg-cell:nth-child(4)  { order: 7; }
    .pkgcfg-cell:nth-child(11)  { order: 8; }
    .pkgcfg-cell:nth-child(18) { order: 9; }
    .pkgcfg-cell:nth-child(5)  { order: 10; }
    .pkgcfg-cell:nth-child(12)  { order: 11; }
    .pkgcfg-cell:nth-child(19) { order: 12; }
    .pkgcfg-cell:nth-child(6)  { order: 13; }
    .pkgcfg-cell:nth-child(13)  { order: 14; }
    .pkgcfg-cell:nth-child(20) { order: 15; }
    .pkgcfg-cell:nth-child(7)  { order: 16; }
    .pkgcfg-cell:nth-child(14)  { order: 17; }
    .pkgcfg-cell:nth-child(21) { order: 18; }

    .pkgcfg-foot {
        -webkit-justify-content: flex-start;
        justify-content: flex-start;
    }

    .pkgcfg-actions {
        -webkit-flex: 1 1 100%;
        flex: 1 1 100%;
    }
}

@media (max-width: 560px) {
    .pkgcfg-overlay {
        padding: 0.75rem;
    }

    .pkgcfg-head h3 {
        font-size: 1.25rem;
    }

    .pkgcfg-seg-btn {
        font-size: 0.64rem;
        padding: 0.4rem 0.45rem;
    }

    .pkgcfg-actions .pkgcfg-btn {
        -webkit-flex: 1 1 100%;
        flex: 1 1 100%;
        -webkit-justify-content: center;
        justify-content: center;
    }
}

/* ----- Omezená animace ----- */
@media (prefers-reduced-motion: reduce) {
    .pkgcfg-overlay,
    .pkgcfg-dialog,
    .split-btn,
    .pkgcfg-btn {
        transition: none;
    }
}
