/* =====================================================================
   Tra cứu đơn — dùng chung cho trang khách (nhúng trong gimsorj.com) và
   trang nội bộ (chat.gimsorj.com/tra-cuu).

   MỌI lớp đều nằm dưới .gs-tc và tiền tố "tc-": trang này được chèn vào
   giữa giao diện WordPress (Astra + Elementor), đặt tên chung chung như
   .card/.badge sẽ dính CSS của theme hoặc đè lên theme.
   Màu lấy đúng bảng màu toàn cục của website (Astra global colors).
   ===================================================================== */
.gs-tc {
  --tc-do: #C6242B;          /* màu chính website */
  --tc-do-dam: #9E1B21;
  --tc-than: #1D2A44;        /* xanh than tiêu đề */
  --tc-chu: #23262B;
  --tc-mo: #5B6170;
  --tc-vien: #E6E1DA;
  --tc-nen: #FFF8F1;         /* kem của website */
  --tc-the: #FFFFFF;
  --tc-cam: #B54708;  --tc-cam-nen: #FEF0E6;
  --tc-la: #1E6B3A;   --tc-la-nen: #E3F3E8;
  --tc-hoan: #9E1B21; --tc-hoan-nen: #FDE8E8;
  --tc-xam: #5B6170;  --tc-xam-nen: #EEF0F3;
  --tc-xanh: #1D2A44; --tc-xanh-nen: #E9EDF5;
  font-family: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--tc-chu);
  font-size: 15px;
  line-height: 1.5;
  max-width: 1080px;
  margin: 0 auto;
  box-sizing: border-box;
}
.gs-tc *, .gs-tc *::before, .gs-tc *::after { box-sizing: border-box; }
.gs-tc a { color: var(--tc-do); }
.gs-tc button { font-family: inherit; }
.gs-tc .tc-mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-weight: 600; letter-spacing: .3px; }
.gs-tc .tc-mo { color: var(--tc-mo); }
.gs-tc .tc-an { position: absolute; left: -9999px; }
/* Phải có: .tc-nb-than đặt display:flex, đè mất [hidden] của trình duyệt */
.gs-tc [hidden] { display: none !important; }

/* ---------- Ô tra cứu ---------- */
.gs-tc .tc-hop {
  background: var(--tc-the); border: 1px solid var(--tc-vien); border-radius: 16px;
  padding: 18px; box-shadow: 0 8px 26px rgba(29, 42, 68, .07);
  max-width: 760px; margin: 0 auto;
}
.gs-tc .tc-tabs { display: flex; gap: 6px; background: #F4EFE8; padding: 5px; border-radius: 12px; margin-bottom: 14px; }
.gs-tc .tc-tab {
  flex: 1 1 0; min-height: 44px; border: 0; border-radius: 9px; background: transparent;
  color: var(--tc-mo); font-size: 15px; font-weight: 500; cursor: pointer; padding: 6px 8px;
}
.gs-tc .tc-tab[aria-selected="true"] { background: #fff; color: var(--tc-chu); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.gs-tc .tc-nhan { display: block; font-weight: 600; font-size: 14px; margin-bottom: 7px; }
.gs-tc .tc-dong { display: flex; flex-wrap: wrap; gap: 10px; }
.gs-tc .tc-o {
  flex: 1 1 240px; min-width: 0; height: 52px; border: 1.5px solid #D6CFC6; border-radius: 12px;
  padding: 0 16px; font: inherit; font-size: 17px; color: var(--tc-chu); background: #fff;
}
.gs-tc .tc-o:focus { outline: 2px solid var(--tc-do); outline-offset: 1px; border-color: var(--tc-do); }
.gs-tc .tc-nut {
  height: 52px; padding: 0 26px; border: 0; border-radius: 12px; background: var(--tc-do);
  color: #fff; font-size: 16px; font-weight: 600; cursor: pointer;
}
.gs-tc .tc-nut:hover { background: var(--tc-do-dam); }
.gs-tc .tc-nut:disabled { opacity: .6; cursor: default; }
.gs-tc .tc-nut-vien {
  min-height: 40px; padding: 0 14px; border: 1.5px solid var(--tc-than); border-radius: 10px;
  background: #fff; color: var(--tc-than); font-weight: 600; font-size: 14px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
}
.gs-tc .tc-goi-y { margin: 10px 2px 0; font-size: 13.5px; color: var(--tc-mo); }

/* ---------- Thông báo ---------- */
.gs-tc .tc-kq { margin-top: 22px; }
.gs-tc .tc-tin {
  max-width: 760px; margin: 0 auto 14px; padding: 16px 18px; border-radius: 14px;
  background: var(--tc-the); border: 1px solid var(--tc-vien); color: var(--tc-mo);
}
.gs-tc .tc-tin.loi { color: var(--tc-hoan); background: var(--tc-hoan-nen); border-color: #F5C2C2; }
.gs-tc .tc-tin.xanh { color: var(--tc-than); background: var(--tc-xanh-nen); border-color: #D3DBEA; }
.gs-tc .tc-tieu-de { max-width: 760px; margin: 0 auto 12px; }
.gs-tc .tc-tieu-de h2 { margin: 0; font-size: 20px; color: var(--tc-than); }

/* ---------- Thẻ đơn ---------- */
.gs-tc .tc-don {
  background: var(--tc-the); border: 1px solid var(--tc-vien); border-radius: 16px;
  margin: 0 auto 14px; overflow: hidden; max-width: 760px;
}
.gs-tc .tc-don.rong { max-width: none; }
.gs-tc .tc-dau { padding: 16px 18px 6px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
.gs-tc .tc-nho { font-size: 13px; color: var(--tc-mo); }
.gs-tc .tc-lon { font-size: 17px; font-weight: 600; }
.gs-tc .tc-nhan-tt { align-self: flex-start; font-size: 14px; font-weight: 600; padding: 5px 12px; border-radius: 999px; white-space: nowrap; }
.gs-tc .tt-cho { background: var(--tc-xanh-nen); color: var(--tc-xanh); }
.gs-tc .tt-dang_giao { background: var(--tc-cam-nen); color: var(--tc-cam); }
.gs-tc .tt-da_giao { background: var(--tc-la-nen); color: var(--tc-la); }
.gs-tc .tt-hoan { background: var(--tc-hoan-nen); color: var(--tc-hoan); }
.gs-tc .tt-huy { background: var(--tc-xam-nen); color: var(--tc-xam); }

.gs-tc .tc-buoc { list-style: none; margin: 10px 0 0; padding: 0 18px; display: flex; gap: 6px; }
.gs-tc .tc-buoc li { flex: 1 1 0; text-align: center; font-size: 12.5px; color: #8A8F99; }
.gs-tc .tc-buoc li::before { content: ""; display: block; height: 6px; border-radius: 3px; background: #E8E3DC; margin-bottom: 6px; }
.gs-tc .tc-buoc li.xong { color: var(--tc-la); font-weight: 600; }
.gs-tc .tc-buoc li.xong::before { background: #2F8A52; }
.gs-tc .tc-buoc li.dang { color: var(--tc-cam); font-weight: 700; }
.gs-tc .tc-buoc li.dang::before { background: #E07A3F; }

.gs-tc .tc-cac-o { padding: 14px 18px; display: flex; flex-wrap: wrap; gap: 10px 28px; }
.gs-tc .tc-chan { border-top: 1px dashed var(--tc-vien); background: #FCFAF7; padding: 14px 18px; }

/* ---------- Chi tiết đầy đủ ---------- */
.gs-tc .tc-luoi { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.gs-tc .tc-luoi > .tc-trai { flex: 999 1 440px; min-width: 0; }
.gs-tc .tc-luoi > .tc-phai { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.gs-tc .tc-khoi { background: var(--tc-the); border: 1px solid var(--tc-vien); border-radius: 16px; padding: 18px 20px; }
.gs-tc .tc-khoi h3 { margin: 0 0 12px; font-size: 17px; color: var(--tc-than); }
.gs-tc .tc-tom { background: var(--tc-the); border: 1px solid var(--tc-vien); border-radius: 18px; padding: 20px; margin-bottom: 16px; box-shadow: 0 8px 26px rgba(29,42,68,.06); }
.gs-tc .tc-ma-lon { font-size: 21px; }
.gs-tc .tc-logo-hang { width: 46px; height: 46px; border-radius: 11px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 12.5px; flex: none; }
.gs-tc .h-vtp { background: #D7262E; } .gs-tc .h-spx { background: #EE4D2D; }
.gs-tc .h-ghn { background: #F26522; } .gs-tc .h-jt { background: #D81E06; } .gs-tc .h-khac { background: #5B6170; }

.gs-tc .tc-dl { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 14px; font-size: 14.5px; }
.gs-tc .tc-dl dt { color: var(--tc-mo); }
.gs-tc .tc-dl dd { margin: 0; }
.gs-tc .tc-sp { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #F1ECE5; font-size: 14.5px; }
.gs-tc .tc-sp:last-of-type { border-bottom: 0; }
.gs-tc .tc-sp img { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; flex: none; }
.gs-tc .tc-tien { display: flex; justify-content: space-between; align-items: baseline; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--tc-vien); }
.gs-tc .tc-tien b { font-size: 19px; }

.gs-tc .tc-ht { list-style: none; margin: 0; padding: 0; }
.gs-tc .tc-ht li { position: relative; padding: 0 0 18px 28px; border-left: 2px solid #ECE6DE; margin-left: 7px; }
.gs-tc .tc-ht li:last-child { border-left-color: transparent; padding-bottom: 2px; }
.gs-tc .tc-ht li::before { content: ""; position: absolute; left: -7px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: #D6CFC6; }
.gs-tc .tc-ht li:first-child::before { left: -9px; top: 2px; width: 16px; height: 16px; background: #E07A3F; box-shadow: 0 0 0 4px var(--tc-cam-nen); }
.gs-tc .tc-ht li:first-child .tc-ht-tt { font-weight: 700; }
.gs-tc .tc-ht-tt { font-weight: 600; }
.gs-tc .tc-ht-phu { font-size: 14px; color: #3F4450; }
.gs-tc .tc-buu-ta {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between;
  background: var(--tc-cam-nen); border: 1px solid #F7D3BD; border-radius: 14px; padding: 12px 16px; margin-bottom: 16px;
}
.gs-tc .tc-goi {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 10px;
  background: var(--tc-than); color: #fff !important; font-weight: 600; text-decoration: none;
}
.gs-tc .tc-luu-y { display: flex; gap: 10px; align-items: flex-start; border-radius: 14px; padding: 14px 16px; font-size: 14px; }
.gs-tc .tc-luu-y.shopee { background: #FFF1EC; border: 1px solid #F7CDBF; }
.gs-tc .tc-luu-y.vang { background: #FFF6DB; border: 1px solid #F0D98A; color: #5C4407; }
.gs-tc .tc-luu-y svg { flex: none; margin-top: 2px; }
.gs-tc .tc-ho-tro { background: #F7EFE6; border-radius: 16px; padding: 16px 18px; font-size: 14px; }
.gs-tc .tc-nhan-nguon { display: inline-block; font-size: 12.5px; font-weight: 700; padding: 3px 9px; border-radius: 6px; }
.gs-tc .tc-nhan-nguon.shopee { background: #EE4D2D; color: #fff; }
.gs-tc .tc-nhan-nguon.noi { background: var(--tc-xanh-nen); color: var(--tc-than); }

/* Nội bộ: một dòng tóm tắt mỗi đơn, bấm để mở */
.gs-tc .tc-hang-nb {
  width: 100%; display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; padding: 14px 16px;
  background: #FBF8F4; border: 0; border-bottom: 1px solid var(--tc-vien); text-align: left;
  font-size: 14px; color: var(--tc-chu); cursor: pointer;
}
.gs-tc .tc-hang-nb[aria-expanded="false"] { border-bottom: 0; background: #fff; }
.gs-tc .tc-nb-than { display: flex; flex-wrap: wrap; }
.gs-tc .tc-nb-than > section { flex: 1 1 380px; min-width: 0; padding: 16px 18px; }
.gs-tc .tc-nb-than > section + section { border-left: 1px solid #F1ECE5; }
.gs-tc .tc-ht-bang li { display: grid; grid-template-columns: 102px minmax(0, 1fr); gap: 12px; padding: 7px 0; border-bottom: 1px solid #F4F0EA; font-size: 14px; list-style: none; }
.gs-tc .tc-ht-bang { margin: 0; padding: 0; }
.gs-tc .tc-hang-nut { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.gs-tc .tc-quay { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; margin-bottom: 12px; background: none; border: 0; color: var(--tc-do); cursor: pointer; padding: 6px 0; }
.gs-tc .tc-xoay { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%; animation: tc-xoay .7s linear infinite; vertical-align: -3px; }
@keyframes tc-xoay { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .gs-tc .tc-xoay { animation: none; } }

@media (max-width: 600px) {
  .gs-tc .tc-hop { padding: 14px; }
  .gs-tc .tc-nut { width: 100%; }
  .gs-tc .tc-o { font-size: 16px; }    /* iOS phóng to trang khi chữ < 16px */
  .gs-tc .tc-nb-than > section + section { border-left: 0; border-top: 1px solid #F1ECE5; }
  .gs-tc .tc-ma-lon { font-size: 17px; }
}
