/* =======================================================
   02-TYPOGRAPHY-CARDS.CSS
   Konsep Kartu Jadwal Keberangkatan (Mobile, Tablet 2 Grid & Desktop 4 Grid)
   serta Sistem Tipografi Seragam 5 Tingkat
   ======================================================= */

#step-2,
#schedule-container,
#schedule-container button {
    font-family: 'Plus Jakarta Sans', sans-serif;
}

#schedule-container .schedule-card {
    padding: 10px 14px !important;
    margin-bottom: 10px !important;
    border-radius: 16px !important;
    min-width: 0;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04) !important;
}

/* Kunci ukuran huruf 3 bagian utama kartu jadwal (dikurangi sedikit) */
#schedule-container .schedule-card h4 {
    font-size: 15px !important;
    line-height: 1.25 !important;
}

#schedule-container .schedule-card .schedule-time {
    font-size: 16px !important;
    line-height: 1.2 !important;
    font-variant-numeric: tabular-nums;
}

#schedule-container .schedule-card .schedule-time > span {
    font-size: 11.5px !important;
}

#schedule-container .schedule-card .schedule-price {
    font-size: 15px !important;
    line-height: 1.25 !important;
    font-variant-numeric: tabular-nums;
}

#schedule-container .schedule-card .schedule-price > span {
    font-size: 12px !important;
}

/* Padatkan jarak vertikal di dalam kartu agar ketinggian berkurang rapi */
#schedule-container .schedule-card > div[id^="real-"],
#schedule-container .schedule-card > div[id^="skel-"] {
    gap: 6px !important;
}

#schedule-container .service-section {
    padding-top: 2px !important;
    padding-bottom: 8px !important;
    margin-bottom: 8px !important;
}

/* Mencegah teks pecah per huruf di semua ukuran layar */
#schedule-container .schedule-card h4,
#schedule-container .schedule-card p,
#schedule-container .schedule-card span,
#schedule-container .schedule-card div {
    word-break: normal;
    overflow-wrap: break-word;
}

/* =======================================================
   TABLET & DESKTOP (>= 768px): TINGGI KARTU SERAGAM
   ======================================================= */
@media (min-width: 768px) {
    #schedule-container .schedule-card {
        margin-bottom: 0 !important;
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    #schedule-container .schedule-card > div[id^="real-"],
    #schedule-container .schedule-card > div[id^="skel-"] {
        flex: 1 1 auto;
        min-width: 0;
    }
}

/* =======================================================
   TABLET (768px - 1023px): 2 KOLOM BERJAJAR
   ======================================================= */
@media (min-width: 768px) and (max-width: 1023px) {
    #schedule-container {
        max-width: 100% !important;
        width: 100% !important;
    }

    #schedule-container .service-section > div {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
        align-items: stretch !important;
    }
}

/* =======================================================
   DESKTOP (>= 1024px): 4 GRID KE SAMPING & LEBAR DIPERLUAS
   ======================================================= */
@media (min-width: 1024px) {
    #step-2-content:has(#schedule-container) {
        max-width: 1440px !important;
        width: 100% !important;
    }

    #schedule-container {
        max-width: 100% !important;
        width: 100% !important;
    }

    #schedule-container .service-section > div {
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 14px !important;
        align-items: stretch !important;
    }

    #schedule-container .schedule-card {
        padding: 11px 14px !important;
    }
}

/* Pada Desktop 4-kolom layar sedang (1024px - 1359px), rapikan tombol ke bawah harga agar tidak menghimpit teks */
@media (min-width: 1024px) and (max-width: 1359px) {
    #schedule-container .card-bottom-split {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }

    #schedule-container .card-action-col {
        width: 100% !important;
        align-items: stretch !important;
    }

    #schedule-container .card-action-col > button:first-child {
        width: 100% !important;
    }

    #schedule-container .card-action-col > button:last-child {
        justify-content: center !important;
    }
}

/* =======================================================
   SISTEM TIPOGRAFI SERAGAM 5 TINGKAT (16 / 14 / 13 / 12 / 11px)
   ======================================================= */

/* TINGKAT 1 (16px): Angka Harga Utama */
#modal-dynamic-price,
#seat-dynamic-price,
#pay-total-amount {
    font-size: 16px !important;
    line-height: 1.25 !important;
    letter-spacing: -0.01em;
}

/* TINGKAT 2 (14px): Judul Modal/Sheet, Tab Utama & Tombol Utama */
#tab-oneway,
#tab-roundtrip,
#btn-cari,
#map-picker-title,
#calendar-sheet-title,
#sheet-penumpang h3,
#ubah-modal > div:first-child h3,
#detail-modal > div:first-child h3,
#seat-modal > div:first-child h3,
#snk-modal-title,
#snk-modal-title span,
#pay-invoice-num,
#pay-channel-section h3 {
    font-size: 14px !important;
    line-height: 1.35 !important;
}

/* TINGKAT 3 (13px): Semua Input, Nilai Terpilih, Daftar Opsi & Tombol Aksi */
#step-1 .dropdown-selected,
#step-1 .dropdown-search,
#display-tanggal,
#display-tanggal-pulang,
#text-penumpang-selected,
#list-penumpang-radio span,
#calendar-month-year,
#cal-preview-selected,
#map-search-input,
#map-search-box-wrapper button[onclick*="cariTempatDiPeta"],
#map-picked-address,
#manual-city-label,
#manual-area-search,
#map-manual-address-input,
#container-form-pemesan input,
#container-form-pemesan textarea,
.city-route-suggestion p:first-child,
.map-suggestion-item p:first-child,
#summary-modal-rute,
#summary-modal-jadwal,
#summary-modal-jemput-area,
#summary-modal-antar-area,
#summary-seat-rute,
#detail-modal .bg-blue-50 span:first-child,
#seat-modal .bg-blue-50 span:first-child,
#detail-modal > div:last-child button,
#seat-modal > div:last-child button,
#sheet-penumpang > div > div:last-child button,
#map-footer-section button,
#map-manual-panel > div:last-child button,
.dropdown-menu button[onclick*="closeAllDropdowns"],
#step-4 .pay-channel-card h4,
#step-4 .pay-channel-card span,
#btn-trigger-pay-wrapper button {
    font-size: 13px !important;
    line-height: 1.4 !important;
}

/* TINGKAT 4 (12px): Label Input, Sub-header, Chip Area & Tombol Sekunder */
#step-1 .quick-date-btn,
.shortcut-pill,
#form-pencarian button[onclick*="jalankanTutorial"],
#map-manual-panel label,
#manual-area-chips .manual-area-chip,
#map-manual-panel button[onclick*="tutupFormAlamatManualPeta"],
#detail-modal label,
#detail-modal h4,
#seat-modal label,
#pp-leg1-notice-modal,
#pp-leg1-notice-seat,
#pay-order-detail,
#dropdown-list-dari > div:first-child span:first-child,
#dropdown-list-ke > div:first-child span:first-child,
.city-route-suggestion > div:last-child {
    font-size: 12px !important;
    line-height: 1.35 !important;
}

#manual-area-chips .manual-area-chip {
    padding: 5px 10px !important;
}

/* TINGKAT 5 (11px): Label Mikro, Sub-alamat & Teks Bantuan */
#step-1 .dropdown-trigger span.uppercase,
#container-tanggal-pulang span.uppercase,
#calendar-sheet-subtitle,
#sheet-penumpang p,
#map-manual-panel p,
.city-route-suggestion p:last-child,
.map-suggestion-item p:last-child,
#summary-modal-jemput-detail,
#summary-modal-antar-detail,
#summary-seat-jemput,
#summary-seat-antar,
#display-status-pemesan,
#step-4 .pay-channel-card p {
    font-size: 11px !important;
    line-height: 1.35 !important;
}

.city-route-suggestion p:last-child {
    margin-top: 3px !important;
}

/* Warna placeholder seragam agar kontras dengan teks yang sudah diisi */
#step-1 input::placeholder,
#map-picker-modal input::placeholder,
#map-picker-modal textarea::placeholder,
#container-form-pemesan input::placeholder,
#container-form-pemesan textarea::placeholder {
    color: #94a3b8 !important;
    font-weight: 400 !important;
}