/*
 * KAPITAL PARKING — anketa formasi uslublari.
 *
 * office.css dagi wizard/card konvensiyalari asos qilib olingan, lekin
 * `parking-` prefiksi bilan izolyatsiya qilingan: sinf nomlari office bilan
 * KESISHMAYDI, shuning uchun ikkala mahsulot bir-biriga ta'sir qilmaydi.
 * Brend rangi (sariq #ffc107) saqlangan.
 */

.parking-scope {
    --pk-brand: #ffc107;
    --pk-brand-soft: rgba(255, 193, 7, .18);
    --pk-ink: #1e2134;
    --pk-muted: #6b7280;
    --pk-line: #e9ecef;
    --pk-surface: #fff;
    --pk-radius: 14px;
    --pk-shadow: 0 2px 4px rgba(16, 24, 40, .03), 0 8px 24px rgba(16, 24, 40, .06);
}

/* ---------- Sarlavha bloki ---------- */
.parking-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    margin-bottom: 24px;
    border-radius: var(--pk-radius);
    background: linear-gradient(135deg, #fff8e1 0%, #fffdf7 100%);
    border: 1px solid #ffeeba;
}
.parking-hero__icon {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #7a5c00;
    background: var(--pk-brand);
}
.parking-hero__title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #7a5c00;
    line-height: 1.25;
}
.parking-hero__subtitle {
    margin: 2px 0 0;
    font-size: 13px;
    color: #96751a;
}

/* ---------- Wizard bosqichlari ---------- */
.parking-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 28px;
}
.parking-steps::before {
    content: '';
    position: absolute;
    top: 17px;
    left: 8%;
    right: 8%;
    height: 2px;
    background: var(--pk-line);
    z-index: 1;
}
.parking-step {
    position: relative;
    z-index: 2;
    flex: 1;
    text-align: center;
    padding: 0 6px;
}
.parking-step__icon {
    width: 36px;
    height: 36px;
    margin: 0 auto 10px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: var(--pk-muted);
    background: #fff;
    border: 2px solid var(--pk-line);
    transition: all .25s ease;
}
.parking-step__text {
    font-size: 12px;
    line-height: 1.3;
    color: var(--pk-muted);
    font-weight: 500;
}
.parking-step.is-active .parking-step__icon {
    background: var(--pk-brand);
    border-color: var(--pk-brand);
    color: #1e2134;
    box-shadow: 0 0 0 5px var(--pk-brand-soft);
}
.parking-step.is-active .parking-step__text {
    color: var(--pk-ink);
    font-weight: 700;
}
.parking-step.is-done .parking-step__icon {
    background: #28a745;
    border-color: #28a745;
    color: #fff;
}

/* ---------- Kartalar ---------- */
.parking-card {
    background: var(--pk-surface);
    border: 1px solid #f1f3f5;
    border-radius: var(--pk-radius);
    box-shadow: var(--pk-shadow);
    padding: 24px;
    margin-bottom: 20px;
}
.parking-card__title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 16px;
    font-weight: 700;
    color: var(--pk-ink);
}
.parking-card__title i {
    color: var(--pk-brand);
}
.parking-card__hint {
    margin: -12px 0 18px;
    font-size: 12.5px;
    color: var(--pk-muted);
}

/* Bosqich ko'rinishi */
.parking-pane { display: none; }
.parking-pane.is-active { display: block; }

/* ---------- Texpasport qidiruv (input yonidagi alohida sariq tugma) ---------- */
.parking-input-search {
    display: flex;
    align-items: stretch;
    gap: 8px;
}
.parking-input-search .form-control {
    flex: 1 1 auto;
    min-width: 0;
}
.parking-search-btn {
    flex: 0 0 auto;
    width: 46px;
    align-self: stretch;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    padding: 0;
    border-radius: 10px;
    background: var(--pk-brand);
    color: #1e2134;
    cursor: pointer;
    box-shadow: 0 2px 6px var(--pk-brand-soft);
    transition: background .15s ease, transform .05s ease;
}
.parking-search-btn:hover { background: #ffca2c; }
.parking-search-btn:active { transform: translateY(1px); }
.parking-search-btn:disabled { cursor: default; opacity: .8; box-shadow: none; }

/* Qidiruv (lupa) ikonkasi — sof CSS, tashqi shrift/rasmga bog'liq emas */
.parking-search-icon {
    width: 15px;
    height: 15px;
    border: 2px solid currentColor;
    border-radius: 50%;
    position: relative;
    display: inline-block;
}
.parking-search-icon::after {
    content: '';
    position: absolute;
    right: -5px;
    bottom: -4px;
    width: 7px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transform: rotate(45deg);
}

/* ---------- Butun sayt ustidagi yuklanish qatlami ---------- */
.parking-page-loader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(30, 33, 52, .45);
    backdrop-filter: blur(2px);
}
.parking-page-loader.is-on { display: flex; }
.parking-page-loader__box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 28px 36px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
}
.parking-page-loader__box .parking-spinner {
    width: 44px;
    height: 44px;
    border-width: 4px;
}
.parking-page-loader__text {
    font-size: 14px;
    font-weight: 600;
    color: var(--pk-ink);
}

/* ---------- Muddat tanlagich ---------- */
.parking-periods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
    gap: 10px;
}
.parking-period {
    position: relative;
    cursor: pointer;
    text-align: center;
    padding: 14px 8px;
    border-radius: 10px;
    border: 2px solid var(--pk-line);
    background: #fff;
    transition: all .18s ease;
    user-select: none;
}
.parking-period:hover { border-color: #ffe082; }
.parking-period input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.parking-period__num {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--pk-ink);
    line-height: 1.1;
}
.parking-period__unit {
    display: block;
    margin-top: 2px;
    font-size: 11.5px;
    color: var(--pk-muted);
}
.parking-period.is-selected {
    border-color: var(--pk-brand);
    background: #fffdf5;
    box-shadow: 0 0 0 4px var(--pk-brand-soft);
}

/* ---------- Yon panel: taklif ---------- */
/* Sticky EMAS — kontent bilan birga suriladi (tepada qotib qolmaydi). */
.parking-summary {
    padding: 0;
    overflow: hidden;
}
.parking-summary__head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 22px;
    background: linear-gradient(135deg, #1e2134 0%, #2c3050 100%);
    color: #fff;
}
.parking-summary__head i { color: var(--pk-brand); font-size: 18px; }
.parking-summary__head h3 { margin: 0; font-size: 15px; font-weight: 700; }
.parking-summary__body { padding: 20px 22px 22px; }

/* Vertikal metrika: label ustда (kichik), qiymat pastда (katta). Tor panelда
   ham har doim toza — raqam va birlik bir qatorда, hech qachon bo'linmaydi. */
.parking-metric {
    padding: 12px 0;
    border-bottom: 1px dashed var(--pk-line);
}
.parking-metric:last-of-type { border-bottom: 0; }
.parking-metric__label {
    font-size: 12.5px;
    color: var(--pk-muted);
    margin-bottom: 6px;
    line-height: 1.3;
}
.parking-metric__value {
    font-size: 20px;
    font-weight: 700;
    color: var(--pk-ink);
    line-height: 1.15;
    white-space: nowrap;       /* "504 000 000 сўм" bir qatorда qoladi */
}
.parking-metric__value em {
    font-style: normal;
    font-size: 13px;
    font-weight: 600;
    color: var(--pk-muted);
    margin-left: 4px;
}

/* Asosiy summa — sariq quti, kattaroq raqam */
.parking-metric--total {
    margin-top: 12px;
    padding: 14px 16px;
    border: 1px solid #ffeeba;
    border-radius: 12px;
    background: #fffdf5;
}
.parking-metric--total .parking-metric__label { color: #96751a; }
.parking-metric--total .parking-metric__value { font-size: 26px; }
.parking-metric--total .parking-metric__value em { font-size: 14px; }

.parking-note {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    font-size: 12px;
    line-height: 1.45;
    color: var(--pk-muted);
}
.parking-note i { color: var(--pk-brand); margin-top: 2px; }

/* Hisoblash paytidagi overlay */
.parking-summary { position: relative; }
.parking-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .75);
}
.parking-overlay.is-on { display: flex; }
.parking-spinner {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 3px solid var(--pk-line);
    border-top-color: var(--pk-brand);
    animation: parking-spin .7s linear infinite;
}
@keyframes parking-spin { to { transform: rotate(360deg); } }

/* ---------- Navigatsiya ---------- */
.parking-nav {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
    margin-bottom: 28px;
}
.parking-nav .parking-nav__spacer { margin-left: auto; }

/* ---------- Tasdiqlash jadvali (approve) ---------- */
.parking-review { border-radius: var(--pk-radius); overflow: hidden; }
.parking-review__group {
    padding: 12px 18px;
    background: #f8f9fa;
    font-size: 13px;
    font-weight: 700;
    color: var(--pk-ink);
    border-bottom: 1px solid var(--pk-line);
}
.parking-review__row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    padding: 12px 18px;
    border-bottom: 1px solid #f4f5f7;
    font-size: 13.5px;
}
.parking-review__row:last-child { border-bottom: 0; }
.parking-review__label { flex: 0 0 42%; color: var(--pk-muted); }
.parking-review__value { flex: 1; color: var(--pk-ink); font-weight: 600; word-break: break-word; }

/* ---------- Mobil ---------- */
@media (max-width: 767px) {
    .parking-card { padding: 18px 16px; }
    .parking-hero { padding: 16px; gap: 12px; }
    .parking-hero__icon { width: 44px; height: 44px; font-size: 20px; }
    .parking-hero__title { font-size: 17px; }
    .parking-steps::before { left: 12%; right: 12%; }
    .parking-step__text { font-size: 10.5px; }
    .parking-step__icon { width: 30px; height: 30px; font-size: 12.5px; }
    .parking-summary { position: static; }
    .parking-review__label { flex: 0 0 100%; }
}
