/* Tra cứu booking (/search_booking) - user_2019/search_booking.php
   Tách khỏi <style> inline trong PHP 2026-07-28 theo CLAUDE.md. Toàn bộ class dùng
   tiền tố .tsb- và chỉ xuất hiện ở trang này nên không đụng cascade của trang khác. */

.tsb-page { background: #f7f8fa; min-height: 70vh; padding: 24px 0 50px; }
.tsb-wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.tsb-bc { font-size: 13px; color: #666; margin-bottom: 14px; }
.tsb-bc a { color: #666; text-decoration: none; }
.tsb-bc a:hover { color: #d6248c; }
.tsb-bc .cur { color: #d6248c; font-weight: 600; }
.tsb-title { font-size: 28px; font-weight: 700; color: #d6248c; margin: 0 0 6px; }
.tsb-sub { color: #666; font-size: 14px; margin-bottom: 24px; }
.tsb-card { background: #fff; border: 1px solid #ececec; border-radius: 10px; padding: 22px 24px; box-shadow: 0 2px 8px rgba(0,0,0,.04); margin-bottom: 18px; }
.tsb-tabs { display: flex; gap: 4px; margin: 0 0 20px; border-bottom: 2px solid #fdf0f6; }
.tsb-tab { background: none; border: none; padding: 12px 22px; font-size: 14px; font-weight: 600; color: #666; cursor: pointer; position: relative; transition: color .15s; font-family: inherit; border-radius: 10px 10px 0 0; text-decoration: none; display: inline-block; }
.tsb-tab:hover { color: #d6248c; background: #fdf0f6; }
.tsb-tab.is-active { color: #d6248c; }
.tsb-tab.is-active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: #d6248c; }
.tsb-form-grid { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 12px; align-items: end; }
@media (max-width: 720px) { .tsb-form-grid { grid-template-columns: 1fr; } }
.tsb-field label { display: block; font-size: 13px; font-weight: 600; color: #333; margin-bottom: 6px; }
.tsb-field input { width: 100%; height: 44px; border: 1.5px solid #e0e0e0; border-radius: 10px; padding: 0 14px; font-size: 14px; font-family: inherit; background: #fff; color: #000; transition: border-color .15s; box-sizing: border-box; }
.tsb-field input:focus { outline: none; border-color: #d6248c; box-shadow: 0 0 0 3px rgba(214,36,140,.1); }
.tsb-submit { height: 44px; padding: 0 28px; background: #d6248c; color: #fff; border: 0; border-radius: 10px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; transition: background .15s; white-space: nowrap; }
.tsb-submit:hover { background: #b81e76; }
.tsb-hint { font-size: 13px; color: #888; margin-top: 12px; line-height: 1.5; }
.tsb-error { background: #fef2f2; border: 1px solid #fca5a5; border-radius: 10px; padding: 12px 16px; color: #991b1b; font-size: 14px; margin-bottom: 18px; display: flex; align-items: flex-start; gap: 10px; }
/* Thông báo KHÔNG phải lỗi (vd "mã này thuộc dịch vụ khác, đã chuyển tab") - cùng khung
   .tsb-error nhưng tông xanh dương để khách không tưởng là tra thất bại. */
.tsb-error.tsb-note { background: #eff6ff; border-color: #93c5fd; color: #1e40af; }

/* Booking detail (hotel) */
.tsb-detail { display: grid; grid-template-columns: 1fr 320px; gap: 18px; align-items: start; }
/* Con của grid mặc định min-width:auto → cột 1fr KHÔNG co được, bị bảng hành khách
   (min-width 560px) kéo giãn quá bề ngang máy thay vì để bảng tự cuộn ngang. */
.tsb-detail > * { min-width: 0; }
/* Kết quả không có cột phải (vé máy bay) → dùng trọn bề ngang, không chừa track 320px trống. */
.tsb-detail-full { grid-template-columns: 1fr; }
@media (max-width: 860px) { .tsb-detail { grid-template-columns: 1fr; } }
.tsb-sec { background: #fff; border: 1px solid #ececec; border-radius: 10px; overflow: hidden; }
.tsb-sec-head { padding: 14px 20px; background: #fdf0f6; border-bottom: 1px solid #f4b8d8; font-size: 14px; font-weight: 700; color: #d6248c; }
.tsb-sec-body { padding: 16px 20px; }
.tsb-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; font-size: 14px; }
.tsb-info-grid .row { display: flex; flex-direction: column; gap: 2px; }
.tsb-info-grid .lbl { font-size: 12px; color: #888; }
.tsb-info-grid .val { color: #222; font-weight: 600; }
.tsb-info-grid .val.code { font-family: monospace; color: #d6248c; }
.tsb-status-badge { display: inline-block; padding: 4px 12px; border-radius: 10px; font-size: 12px; font-weight: 700; color: #fff; }

.tsb-policy-item { padding: 10px 0; border-bottom: 1px solid #f3f4f6; font-size: 14px; line-height: 1.55; color: #444; }
.tsb-policy-item:last-child { border-bottom: 0; }
.tsb-policy-item b { color: #222; }
.tsb-policy-warn { color: #92400e; }
.tsb-policy-ok { color: #166534; }

/* Cancel sidebar */
.tsb-cancel-card { background: #fff; border: 2px solid #d6248c; border-radius: 10px; padding: 20px; }
.tsb-cancel-title { font-size: 15px; font-weight: 700; color: #d6248c; margin: 0 0 10px; }
.tsb-cancel-desc { font-size: 13px; color: #555; line-height: 1.55; margin-bottom: 14px; }
.tsb-cancel-btn { width: 100%; height: 46px; background: #d6248c; color: #fff; border: 0; border-radius: 10px; font-size: 15px; font-weight: 700; cursor: pointer; font-family: inherit; transition: background .15s; }
.tsb-cancel-btn:hover { background: #b81e76; }
.tsb-cancel-btn:disabled { background: #ccc; cursor: not-allowed; }
.tsb-cancel-blocked { background: #fef3c7; border: 1px solid #fde68a; border-radius: 10px; padding: 12px 14px; font-size: 13px; color: #92400e; line-height: 1.5; }

/* Modal */
.tsb-modal { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 9999; display: none; align-items: center; justify-content: center; padding: 16px; }
.tsb-modal.is-open { display: flex; }
.tsb-modal-box { background: #fff; border-radius: 12px; max-width: 480px; width: 100%; padding: 28px 26px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.tsb-modal-icon { font-size: 40px; color: #d6248c; text-align: center; margin-bottom: 8px; }
.tsb-modal-title { font-size: 18px; font-weight: 700; color: #222; text-align: center; margin: 0 0 8px; }
.tsb-modal-msg { font-size: 14px; color: #555; line-height: 1.6; text-align: center; margin: 0 0 20px; }
.tsb-modal-actions { display: flex; gap: 10px; }
.tsb-modal-btn { flex: 1; height: 44px; border-radius: 10px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; transition: background .15s, border-color .15s; }
.tsb-modal-btn-secondary { background: #fff; border: 1.5px solid #e0e0e0; color: #444; }
.tsb-modal-btn-secondary:hover { border-color: #d6248c; color: #d6248c; }
.tsb-modal-btn-primary { background: #d6248c; color: #fff; border: 0; }
.tsb-modal-btn-primary:hover { background: #b81e76; }

/* Tour result item (simplified) */
.tsb-item { background: #fff; border: 1px solid #ececec; border-radius: 10px; overflow: hidden; display: grid; grid-template-columns: 200px 1fr; gap: 18px; }
@media (max-width: 720px) { .tsb-item { grid-template-columns: 1fr; } }
.tsb-item-img { min-height: 150px; background: #f5f5f5 center/cover no-repeat; }
.tsb-item-body { padding: 16px 20px 18px 0; display: flex; flex-direction: column; gap: 10px; }
.tsb-item-title { font-size: 16px; font-weight: 700; color: #222; }
.tsb-item-title a { color: inherit; text-decoration: none; }
.tsb-item-title a:hover { color: #d6248c; }
.tsb-item-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 14px; font-size: 13px; color: #555; }
.tsb-item-meta .lbl { color: #888; }
.tsb-item-meta b { color: #222; font-weight: 600; }
.tsb-item-price { font-size: 16px; font-weight: 800; color: #d6248c; padding-top: 8px; border-top: 1px dashed #eee; }
.tsb-empty { background: #fff; border: 1px solid #ececec; border-radius: 10px; padding: 36px 24px; text-align: center; color: #666; }
.tsb-empty-ico { font-size: 36px; color: #ddd; margin-bottom: 10px; }
.tsb-empty-title { font-size: 16px; font-weight: 700; color: #333; margin-bottom: 6px; }

/* ── Kết quả vé máy bay: dựng theo mặt vé PDF gửi khách ──────────────────
   (user_2019/pdf_flight_itinerary.php - mục 2/3/4). Chỉ dùng ở /search_booking. */
.tsb-muted { font-size: 13px; color: #666; line-height: 1.6; }
.tsb-mt10 { margin-top: 10px; }
.tsb-hotline { color: #d6248c; font-weight: 700; }
.tsb-mono { font-family: ui-monospace, Menlo, Consolas, monospace; }

/* Một chiều bay */
.tsb-leg-next { margin-top: 14px; padding-top: 16px; border-top: 1px dashed #e5e7eb; }
.tsb-leg-top { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.tsb-leg-tag { background: #fdf0f6; color: #d6248c; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 20px; }
.tsb-leg-date { font-size: 13px; font-weight: 700; color: #222; }
.tsb-leg-fn { font-size: 12px; font-weight: 700; color: #444; background: #f3f4f6; padding: 3px 9px; border-radius: 6px; }

/* Giờ đi - thời gian bay - giờ đến */
.tsb-leg-route { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.tsb-leg-end-r { text-align: right; }
.tsb-leg-time { font-size: 22px; font-weight: 800; color: #222; line-height: 1.2; }
.tsb-leg-code { font-size: 13px; font-weight: 700; color: #d6248c; }
.tsb-leg-city { font-size: 12px; color: #777; }
.tsb-leg-mid { min-width: 96px; text-align: center; }
.tsb-leg-dur { font-size: 12px; color: #666; margin-bottom: 3px; }
/* Đường nối 2 đầu chặng: chấm - gạch - mũi tên, thuần CSS nên không cần ảnh. */
.tsb-leg-line { height: 1px; background: #d9d9d9; position: relative; }
.tsb-leg-line::before,
.tsb-leg-line::after { content: ''; position: absolute; top: -2.5px; width: 6px; height: 6px; border-radius: 50%; background: #d6248c; }
.tsb-leg-line::before { left: 0; }
.tsb-leg-line::after { right: 0; }
.tsb-leg-stops { font-size: 11px; color: #999; margin-top: 3px; }

/* Hãng / hạng / hành lý */
.tsb-leg-facts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #f3f4f6; font-size: 13px; color: #555; }
.tsb-leg-facts b { color: #222; font-weight: 600; }

/* Bảng hành khách - bảng hẹp hơn màn thì tự cuộn NGANG trong khung, không đẩy cả trang */
.tsb-table-scroll { overflow-x: auto; }
.tsb-pax { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 560px; }
.tsb-pax th { text-align: left; font-size: 12px; font-weight: 600; color: #888; padding: 0 10px 8px 0; border-bottom: 1px solid #eee; white-space: nowrap; }
.tsb-pax td { padding: 10px 10px 10px 0; border-bottom: 1px solid #f5f5f5; color: #333; vertical-align: top; }
.tsb-pax tr:last-child td { border-bottom: 0; }

/* Bảng giá */
.tsb-price { width: 100%; border-collapse: collapse; font-size: 14px; }
.tsb-price td { padding: 9px 0; border-bottom: 1px solid #f5f5f5; color: #444; }
.tsb-price-v { text-align: right; font-weight: 600; color: #222; white-space: nowrap; }
.tsb-price-total td { border-bottom: 0; padding-top: 12px; font-weight: 800; color: #222; }
.tsb-price-total .tsb-price-v { color: #d6248c; font-size: 18px; font-weight: 800; }

/* Nút tải mặt vé */
.tsb-sec-cta .tsb-sec-body { padding: 18px 20px; }
.tsb-pdf-btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 22px; background: #d6248c; color: #fff; border-radius: 10px; font-size: 14px; font-weight: 700; text-decoration: none; transition: background .15s; }
.tsb-pdf-btn:hover { background: #b81e76; color: #fff; }

@media (max-width: 575px) {
    .tsb-leg-time { font-size: 19px; }
    .tsb-leg-mid { min-width: 68px; }
    .tsb-leg-facts { gap: 6px 14px; }
}
