/* ZetaLink Server Configurator v2 */

@import url('https://fonts.googleapis.com/css2?family=Karla:wght@400;500;600;700&family=Rubik:wght@500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ─── Root ─────────────────────────────────────── */

.zc-configurator {
    --zl-navy: #0D2352;
    --zl-deep: #15095E;
    --zl-blue: #103DBE;
    --zl-blue-light: #1868dd;
    --zl-surface: #f5f7fc;
    --zl-surface-2: #eaeff7;
    --zl-ink: #0f1729;
    --zl-ink-2: #3d4663;
    --zl-ink-3: #6b7394;
    --zl-border: #d0d7e6;
    --zl-accent: #00c48c;
    --zl-mono: 'JetBrains Mono', 'SF Mono', monospace;

    max-width: 1120px;
    margin: 0 auto;
    padding: 40px 24px 80px;
    font-family: 'Karla', sans-serif;
    color: var(--zl-ink);
    line-height: 1.5;
}

/* ─── Loading ──────────────────────────────────── */

.zc-loading {
    text-align: center;
    padding: 80px 20px;
    color: var(--zl-ink-3);
    font-size: 14px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.zc-spinner {
    width: 32px;
    height: 32px;
    border: 2px solid var(--zl-border);
    border-top-color: var(--zl-blue);
    border-radius: 50%;
    animation: zcSpin .7s linear infinite;
    margin: 0 auto 16px;
}

@keyframes zcSpin { to { transform: rotate(360deg); } }

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

.zc-header {
    margin-bottom: 28px;
}

.zc-title {
    font-family: 'Rubik', sans-serif;
    font-size: clamp(22px, 3.5vw, 32px);
    font-weight: 700;
    color: var(--zl-ink);
    letter-spacing: -0.01em;
}

/* ─── Tabs ─────────────────────────────────────── */

.zc-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}

.zc-tab {
    padding: 10px 24px;
    border: none;
    background: transparent;
    color: var(--zl-ink-3);
    font-family: 'Karla', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: color .15s;
    position: relative;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.zc-tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: transparent;
    transition: background .15s;
}

.zc-tab:hover { color: var(--zl-ink); }
.zc-tab.active { color: var(--zl-blue); }
.zc-tab.active::after { background: var(--zl-blue); }

.zc-cat-desc {
    color: var(--zl-ink-3);
    font-size: 14px;
    margin-bottom: 24px;
    padding-left: 2px;
}

/* ─── Components ───────────────────────────────── */

.zc-components {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 0;
}

.zc-component {
    padding: 20px 0;
    border-top: 1px solid var(--zl-border);
}

.zc-component:last-child {
    border-bottom: 1px solid var(--zl-border);
}

/* Extra gap before "soft" components (ОС, доп. опции) */
.zc-component:nth-last-child(-n+2) {
    padding-top: 28px;
}

.zc-comp-label {
    font-family: 'Karla', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: var(--zl-ink-3);
    margin-bottom: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.zc-required {
    color: var(--zl-blue);
    font-weight: 700;
}

/* ─── Select Options ───────────────────────────── */

.zc-options-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.zc-option {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 10px 16px;
    border: 1.5px solid var(--zl-border);
    background: #fff;
    cursor: pointer;
    transition: border-color .12s, background .12s, box-shadow .12s;
    position: relative;
    min-width: 0;
}

.zc-option:hover {
    border-color: var(--zl-blue-light);
    background: #f8faff;
}

.zc-option.selected {
    border-color: var(--zl-blue);
    background: #edf1ff;
    box-shadow: inset 0 0 0 1px var(--zl-blue);
}

.zc-opt-name {
    font-family: var(--zl-mono);
    font-weight: 500;
    font-size: 14px;
    color: var(--zl-ink);
    white-space: nowrap;
}

.zc-opt-price {
    font-family: var(--zl-mono);
    font-size: 12px;
    color: var(--zl-ink-3);
    white-space: nowrap;
}

.zc-option.selected .zc-opt-name { color: var(--zl-blue); }
.zc-option.selected .zc-opt-price { color: var(--zl-blue); }

/* ─── Checkbox Options ─────────────────────────── */

.zc-checkbox-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.zc-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border: 1.5px solid var(--zl-border);
    background: #fff;
    cursor: pointer;
    transition: border-color .12s, background .12s;
}

.zc-checkbox:hover { border-color: var(--zl-blue-light); }

.zc-checkbox.checked {
    border-color: var(--zl-blue);
    background: #edf1ff;
    box-shadow: inset 0 0 0 1px var(--zl-blue);
}

.zc-checkbox input {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid var(--zl-border);
    background: #fff;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: border-color .12s, background .12s;
}

.zc-checkbox input:checked {
    background: var(--zl-blue);
    border-color: var(--zl-blue);
}

.zc-checkbox input:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 4.5px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.zc-cb-name {
    font-family: var(--zl-mono);
    font-weight: 500;
    font-size: 14px;
    color: var(--zl-ink);
}

.zc-cb-price {
    font-family: var(--zl-mono);
    font-size: 12px;
    color: var(--zl-ink-3);
    margin-left: auto;
    padding-left: 16px;
}

.zc-checkbox.checked .zc-cb-name,
.zc-checkbox.checked .zc-cb-price { color: var(--zl-blue); }

/* ─── Slider ───────────────────────────────────── */

.zc-slider-wrap {
    padding: 2px 0;
}

.zc-slider-value {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 14px;
}

.zc-slider-cur-name {
    font-family: var(--zl-mono);
    font-size: 20px;
    font-weight: 600;
    color: var(--zl-ink);
}

.zc-slider-cur-price {
    font-family: var(--zl-mono);
    font-size: 15px;
    font-weight: 600;
    color: var(--zl-blue);
}

/* Range input — thick track, prominent thumb */
.zc-slider-input {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 10px;
    border-radius: 5px;
    background: linear-gradient(
        to right,
        var(--zl-blue) 0%,
        var(--zl-blue) var(--fill, 0%),
        var(--zl-surface-2) var(--fill, 0%),
        var(--zl-surface-2) 100%
    );
    border: none;
    outline: none;
    cursor: pointer;
    margin: 0;
}

.zc-slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--zl-blue);
    border: 4px solid #fff;
    box-shadow: 0 2px 8px rgba(13, 35, 82, .25);
    cursor: pointer;
    transition: transform .12s cubic-bezier(.2, 0, .2, 1), box-shadow .12s;
}

.zc-slider-input::-webkit-slider-thumb:hover {
    transform: scale(1.12);
    box-shadow: 0 2px 12px rgba(16, 61, 190, .35);
}

.zc-slider-input::-webkit-slider-thumb:active {
    transform: scale(1.2);
}

.zc-slider-input::-moz-range-thumb {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--zl-blue);
    border: 4px solid #fff;
    box-shadow: 0 2px 8px rgba(13, 35, 82, .25);
    cursor: pointer;
}

.zc-slider-input::-moz-range-track {
    height: 10px;
    border-radius: 5px;
    background: var(--zl-surface-2);
    border: none;
}

.zc-slider-input::-moz-range-progress {
    height: 10px;
    border-radius: 5px;
    background: var(--zl-blue);
}

/* Labels under slider */
.zc-slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    padding: 0 4px;
}

.zc-slider-label {
    font-family: var(--zl-mono);
    font-size: 11px;
    color: var(--zl-ink-3);
    text-align: center;
    white-space: nowrap;
    transition: color .12s, font-weight .12s;
    user-select: none;
}

.zc-slider-label.active {
    color: var(--zl-blue);
    font-weight: 600;
}

/* ─── Summary ──────────────────────────────────── */

.zc-summary {
    margin-top: 32px;
    background: var(--zl-navy);
    padding: 28px 36px;
    color: #fff;
    position: relative;
    overflow: hidden;
    margin-left: -24px;
    margin-right: -24px;
}

.zc-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    position: relative;
}

.zc-summary-config {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px 32px;
}

.zc-sum-item {
    font-size: 13px;
    display: flex;
    gap: 8px;
    padding: 3px 0;
}

.zc-sum-label {
    color: rgba(255,255,255,.4);
    font-family: var(--zl-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    min-width: 50px;
}

.zc-sum-value {
    color: #fff;
    font-family: var(--zl-mono);
    font-size: 13px;
    font-weight: 500;
}

.zc-summary-price {
    text-align: right;
    flex-shrink: 0;
}

.zc-total-label {
    font-size: 11px;
    color: rgba(255,255,255,.4);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 2px;
    font-family: var(--zl-mono);
}

.zc-total-amount {
    font-family: 'Rubik', sans-serif;
    font-size: clamp(28px, 5vw, 42px);
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.zc-total-amount small {
    font-family: var(--zl-mono);
    font-size: 13px;
    font-weight: 400;
    color: rgba(255,255,255,.45);
    display: block;
    margin-top: 3px;
}

/* ─── Order ────────────────────────────────────── */

.zc-order-section {
    margin-top: 20px;
    display: flex;
    position: relative;
}

.zc-order-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 48px;
    background: var(--zl-accent);
    color: #0f1729;
    border: none;
    font-family: 'Karla', sans-serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .15s, transform .12s;
    text-decoration: none;
}

.zc-order-btn:hover {
    background: #00d697;
    transform: translateY(-1px);
    color: #0f1729;
}

/* Order form removed — CTA links to billing */

/* ─── Sticky Price Bar ─────────────────────────── */

.zc-sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    background: #0D2352;
    border-top: 1px solid rgba(255,255,255,.1);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    transform: translateY(100%);
    transition: transform .25s cubic-bezier(.2, 0, .2, 1);
    box-shadow: 0 -4px 20px rgba(13, 35, 82, .3);
    font-family: 'Karla', sans-serif;
}

.zc-sticky-bar.visible {
    transform: translateY(0);
}

.zc-sticky-config {
    display: flex;
    gap: 20px;
    color: rgba(255,255,255,.6);
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
}

.zc-sticky-config strong {
    color: #fff;
    font-weight: 500;
}

.zc-sticky-price {
    font-family: 'Rubik', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.01em;
}

.zc-sticky-price small {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 400;
    color: rgba(255,255,255,.45);
    margin-left: 4px;
}

.zc-sticky-cta {
    padding: 10px 28px;
    background: #00c48c;
    color: #0f1729;
    border: none;
    font-family: 'Karla', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .15s;
    text-decoration: none;
}

.zc-sticky-cta:hover {
    background: #00d697;
    color: #0f1729;
}

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

@media (max-width: 768px) {
    .zc-configurator {
        padding: 20px 16px 100px;
    }

    .zc-title { font-size: 22px; }

    .zc-tabs {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 0;
        scrollbar-width: none;
    }

    .zc-tabs::-webkit-scrollbar { display: none; }

    .zc-tab {
        white-space: nowrap;
        padding: 10px 14px;
        font-size: 12px;
        flex-shrink: 0;
    }

    .zc-cat-desc { margin-bottom: 16px; font-size: 13px; }
    .zc-component { padding: 16px 0; }

    .zc-options-grid { flex-direction: column; gap: 6px; }

    .zc-option {
        width: 100%;
        justify-content: space-between;
        padding: 12px 14px;
    }

    .zc-opt-name { font-size: 13px; }
    .zc-opt-price { font-size: 11px; flex-shrink: 0; }

    .zc-checkbox-list { flex-direction: column; gap: 6px; }
    .zc-checkbox { width: 100%; padding: 12px 14px; }
    .zc-cb-name { font-size: 13px; }
    .zc-cb-price { font-size: 11px; }

    /* Slider mobile */
    .zc-slider-input { height: 12px; border-radius: 6px; }

    .zc-slider-input::-webkit-slider-thumb { width: 30px; height: 30px; }
    .zc-slider-input::-moz-range-thumb { width: 30px; height: 30px; }

    .zc-slider-cur-name { font-size: 17px; }
    .zc-slider-cur-price { font-size: 14px; }
    .zc-slider-label { font-size: 9px; }

    .zc-summary {
        padding: 20px 16px;
        margin-left: -16px;
        margin-right: -16px;
    }

    .zc-summary-row { flex-direction: column; gap: 16px; }
    .zc-summary-config { grid-template-columns: 1fr; gap: 2px; }
    .zc-summary-price { text-align: left; }
    .zc-total-amount { font-size: 32px; }

    .zc-order-section { margin-top: 16px; }
    .zc-order-btn { width: 100%; justify-content: center; padding: 16px 24px; }
    .zc-order-form { padding: 16px; }
    .zc-form-fields { grid-template-columns: 1fr; gap: 8px; }

    /* Sticky bar mobile */
    .zc-sticky-bar {
        padding: 10px 16px;
        gap: 12px;
    }

    .zc-sticky-config { display: none; }
    .zc-sticky-price { font-size: 20px; }
    .zc-sticky-cta { padding: 10px 20px; font-size: 12px; flex-shrink: 0; }
}
