/*
 * tinh-cuoc.css — component riêng trang Công cụ tính cước (/cong-cu-tinh-cuoc/),
 * nạp SAU front-page.css (inline) nên dùng chung token + .wrap/.btn/.eyebrow/
 * .center/.sub/.pat/.faq/.endcta/.rv có sẵn. Chỉ định nghĩa class tc-* và
 * .crumbs (breadcrumb hero — đồng bộ pattern contact.css).
 * Viết mobile-first; mẫu đã chốt: "Xanh Á Châu" — card trắng trên nền băng
 * xanh nhạt, panel kết quả navy, CTA đỏ.
 */

/* ===== breadcrumb trên nền hero tối ===== */
.crumbs { font-size: 13px; margin-bottom: 16px; }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.crumbs li { display: flex; align-items: center; gap: 8px; color: rgba(255, 255, 255, .78); }
.crumbs li + li::before { content: "›"; color: #ff8d96; font-weight: 800; }
.crumbs a { color: rgba(255, 255, 255, .78); text-decoration: none; transition: color 140ms ease; }
@media (hover: hover) and (pointer: fine) { .crumbs a:hover { color: #fff; } }
.crumbs [aria-current="page"] { color: #fff; font-weight: 700; }

/* ===== hero gọn: gradient navy + lưới chấm (LCP = chữ, không ảnh) ===== */
.tc-hero { position: relative; isolation: isolate; color: #fff; padding-block: 56px 52px; background: linear-gradient(120deg, var(--navy-ink) 0%, var(--primary-deep) 62%, var(--primary) 130%); }
.tc-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(rgba(255, 255, 255, .10) 1.1px, transparent 1.4px); background-size: 32px 32px; }
.tc-hero h1 { color: #fff; font-size: clamp(30px, 4.6vw, 46px); font-weight: 800; line-height: 1.18; letter-spacing: -0.025em; margin: 0; text-wrap: balance; }
.tc-hero h1 em { font-style: normal; color: #ff6b76; }
.tc-hero .lead { color: rgba(255, 255, 255, .86); font-size: 16.5px; line-height: 1.65; max-width: 66ch; margin: 14px 0 0; }

/* ===== centerpiece: card trắng = form + panel kết quả navy ===== */
.tc-main { background: var(--band); border-bottom: 1px solid var(--line); padding-block: 56px 72px; }
.tc-card { display: grid; grid-template-columns: 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: 0 24px 48px -24px rgba(15, 47, 87, .18); }
@media (min-width: 980px) { .tc-card { grid-template-columns: 1fr 400px; } }
.tc-form-wrap { padding: 26px 20px 30px; }
@media (min-width: 700px) { .tc-form-wrap { padding: 34px 32px 38px; } }
.tc-h2 { color: var(--ink); font-size: clamp(23px, 2.8vw, 30px); font-weight: 800; line-height: 1.18; letter-spacing: -0.02em; margin: 10px 0 8px; text-wrap: balance; }
.tc-form-wrap .sub { margin-bottom: 24px; }
.tc-form-wrap form { margin-top: 0; }

.tc-fields { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 620px) { .tc-fields { grid-template-columns: 1fr 1fr; gap: 16px; } }
.tc-full { grid-column: 1 / -1; }

.tc-field label { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.tc-lbl { font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-2); }
.tc-field select,
.tc-field input { width: 100%; min-height: 48px; font: 500 15px/1.3 var(--font); color: var(--text); background: var(--surface); border: 1.5px solid var(--line-2); border-radius: var(--r); padding: 11px 14px; transition: border-color 140ms ease, box-shadow 140ms ease; appearance: none; }
.tc-field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2358697d' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; cursor: pointer; }
.tc-field input { font-variant-numeric: tabular-nums; }
.tc-field input::placeholder { color: color-mix(in srgb, var(--text-2) 72%, transparent); }
@media (hover: hover) and (pointer: fine) {
  .tc-field select:hover:not(:focus),
  .tc-field input:hover:not(:focus) { border-color: color-mix(in srgb, var(--primary) 45%, var(--line-2)); }
}
.tc-field select:focus-visible,
.tc-field input:focus-visible { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 14%, transparent); }
.tc-hint { margin: 6px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--text-2); }
.tc-err { margin: 6px 0 0; font-size: 13px; line-height: 1.5; color: var(--accent-dark); font-weight: 600; }
.tc-field.invalid select,
.tc-field.invalid input { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent); }

/* combobox tỉnh/phường: input gõ tìm (bỏ dấu) + danh sách thả xuống */
.tc-combo-wrap { position: relative; }
.tc-combo-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: 0 18px 40px -18px rgba(15, 47, 87, .3); max-height: 262px; overflow-y: auto; }
.tc-combo-list li { padding: 9px 11px; border-radius: 4px; font-size: 14.5px; color: var(--text); cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .tc-combo-list li:hover { background: var(--band); } }
.tc-combo-list li.hov { background: color-mix(in srgb, var(--primary) 12%, var(--surface)); }
.tc-combo-list li.none { color: var(--text-2); cursor: default; }

/* 2 cột thông tin: bên gửi (lấy hàng) | bên nhận (giao hàng) */
.tc-cols { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 620px) { .tc-cols { grid-template-columns: 1fr 1fr; } }
.tc-col { display: grid; gap: 14px; align-content: start; border: 1px solid var(--line); border-radius: 8px; padding: 16px 14px 18px; background: color-mix(in srgb, var(--band) 55%, var(--surface)); }
.tc-col-t { margin: 0; font-size: 12.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--primary); display: flex; align-items: center; gap: 8px; }
.tc-col-t::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* phương thức giao nhận: 4 radio card 2×2 */
.tc-pt { border: 0; padding: 0; margin: 0; }
.tc-pt legend { font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-2); margin-bottom: 8px; padding: 0; }
.tc-pt-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 620px) { .tc-pt-grid { grid-template-columns: 1fr 1fr; } }
.tc-pt-card { position: relative; display: flex; align-items: flex-start; gap: 10px; border: 1.5px solid var(--line-2); border-radius: var(--r); padding: 12px 14px; min-height: 44px; cursor: pointer; background: var(--surface); transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease; }
.tc-pt-card input { position: absolute; opacity: 0; pointer-events: none; }
.tc-pt-card strong { display: block; font-size: 14px; font-weight: 700; color: var(--text); }
.tc-pt-card small { display: block; font-size: 12.5px; line-height: 1.45; color: var(--text-2); margin-top: 2px; }
.tc-pt-card::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 2px; border: 2px solid var(--line-2); border-radius: 50%; transition: border-color 140ms ease, box-shadow 140ms ease; }
.tc-pt-card:has(input:checked) { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 5%, var(--surface)); }
.tc-pt-card:has(input:checked)::before { border-color: var(--primary); box-shadow: inset 0 0 0 4px var(--primary); }
.tc-pt-card:has(input:focus-visible) { box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 14%, transparent); }
@media (hover: hover) and (pointer: fine) { .tc-pt-card:hover { border-color: var(--primary); } }

/* hình thức: segmented 3 nút (ghép / nguyên xe / hoả tốc) */
.tc-seg { display: grid; grid-template-columns: repeat(3, 1fr); border: 1.5px solid var(--line-2); border-radius: var(--r); overflow: hidden; }
.tc-seg button { font: 700 14px/1.2 var(--font); color: var(--text-2); background: var(--surface); border: 0; min-height: 44px; padding: 12px 10px; cursor: pointer; touch-action: manipulation; transition: color 140ms ease, background-color 140ms ease, transform 160ms var(--ease); }
.tc-seg button:active { transform: scale(0.97); }
.tc-seg button[aria-pressed="true"] { background: var(--primary); color: #fff; }
.tc-seg button:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }

/* trợ giúp tính số khối từ kích thước kiện */
.tc-cbm-toggle { margin-top: 8px; background: none; border: 0; padding: 0; font: 600 13px var(--font); color: var(--primary); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-align: left; touch-action: manipulation; }
@media (hover: hover) and (pointer: fine) { .tc-cbm-toggle:hover { color: var(--primary-deep); } }
.tc-cbm-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.tc-cbm { border: 1px dashed var(--line-2); border-radius: 8px; padding: 14px 14px 16px; background: color-mix(in srgb, var(--band) 55%, var(--surface)); }
.tc-cbm-row { display: grid; grid-template-columns: repeat(4, 1fr) 34px; gap: 10px; align-items: end; margin-top: 8px; }
@media (max-width: 560px) { .tc-cbm-row { grid-template-columns: 1fr 1fr 34px; } }
.tc-cbm-row label { display: flex; flex-direction: column; gap: 5px; }
.tc-lbl2 { font-size: 11.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--text-2); }
.tc-cbm-del { width: 34px; height: 46px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); color: var(--text-2); font-size: 19px; line-height: 1; cursor: pointer; touch-action: manipulation; transition: color 140ms ease, border-color 140ms ease, transform 160ms var(--ease); }
.tc-cbm-del:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .tc-cbm-del:hover { color: var(--accent-dark); border-color: var(--accent); } }
.tc-cbm-del:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tc-cbm-add { margin-top: 12px; background: none; border: 0; padding: 0; font: 600 13px var(--font); color: var(--primary); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; touch-action: manipulation; }
@media (hover: hover) and (pointer: fine) { .tc-cbm-add:hover { color: var(--primary-deep); } }
.tc-cbm-add:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }

.tc-submit { margin-top: 6px; }
.tc-submit .btn { width: 100%; }
@media (min-width: 620px) { .tc-submit .btn { width: auto; } }

/* ===== panel kết quả navy ===== */
.tc-res-panel { background: linear-gradient(160deg, var(--navy) 0%, var(--navy-ink) 100%); color: #fff; padding: 28px 24px 30px; display: flex; flex-direction: column; }
@media (min-width: 700px) { .tc-res-panel { padding: 32px 30px 34px; } }
.tc-res-panel h2 { color: #a9c6ea; font-size: 13px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; margin: 0 0 4px; }
.tc-empty { margin: auto 0; color: #a9c6ea; font-size: 14.5px; line-height: 1.6; }
.tc-contact h3 { color: #fff; font-size: 17px; font-weight: 800; margin: 0 0 6px; }
.tc-contact p { color: #a9c6ea; font-size: 14px; line-height: 1.6; margin: 0 0 14px; }

.tc-res { display: none; opacity: 0; transform: translateY(10px) scale(.97); pointer-events: none; transition: opacity 220ms var(--ease), transform 220ms var(--ease); }
.tc-res.on { display: block; }
.tc-res.show { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.tc-rrow { opacity: 0; transform: translateY(6px); transition: opacity 200ms var(--ease), transform 200ms var(--ease); }
.tc-res.show .tc-rrow { opacity: 1; transform: translateY(0); }
.tc-res.show .tc-rrow:nth-child(2) { transition-delay: 40ms; }
.tc-res.show .tc-rrow:nth-child(3) { transition-delay: 80ms; }
.tc-res.show .tc-rrow:nth-child(4) { transition-delay: 120ms; }
.tc-res.show .tc-rrow:nth-child(5) { transition-delay: 160ms; }

.tc-price { font-size: clamp(26px, 3vw, 32px); font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.tc-unit { font-size: 13px; color: #a9c6ea; margin-top: 2px; }
.tc-break { display: grid; margin: 16px 0 0; padding: 14px 0; font-size: 13.5px; border-block: 1px solid rgba(255, 255, 255, .16); gap: 7px; }
.tc-brow { display: flex; justify-content: space-between; gap: 14px; }
.tc-brow dt { margin: 0; color: #a9c6ea; }
.tc-brow dd { margin: 0; text-align: right; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tc-brow.tong { border-top: 1px dashed rgba(255, 255, 255, .25); padding-top: 9px; margin-top: 2px; }
.tc-brow.tong dt { color: #fff; font-weight: 800; }
.tc-brow.tong dd { font-weight: 800; }
.tc-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 14px; font-size: 13.5px; color: #a9c6ea; }
.tc-meta strong { color: #fff; font-weight: 700; }
.tc-warns { margin: 12px 0 0; font-size: 12.5px; line-height: 1.6; color: #a9c6ea; }
.tc-res .btn { margin-top: 16px; width: 100%; }
.tc-note { margin: 12px 0 0; font-size: 12.5px; line-height: 1.55; color: #a9c6ea; }
.tc-note strong { color: #fff; }
/* nút "?" trên dòng phụ phí nhiên liệu + đoạn giải thích FSC */
.tc-fsc-info { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; padding: 0; margin-left: 4px; border: 1px solid rgba(255, 255, 255, .45); border-radius: 50%; background: none; color: #a9c6ea; font-size: 10.5px; font-weight: 700; line-height: 1; cursor: pointer; vertical-align: 1px; }
.tc-fsc-info:hover, .tc-fsc-info[aria-expanded="true"] { color: #fff; border-color: #fff; }
.tc-fsc-info:focus-visible { outline: 2px solid #ff8d96; outline-offset: 2px; }
.tc-fsc-note { margin: 10px 0 0; padding: 10px 12px; font-size: 12.5px; line-height: 1.6; color: #dbe9fb; background: rgba(255, 255, 255, .08); border-radius: 8px; }
.tc-fsc-note a { color: #fff; text-decoration: underline; }
.tc-res-panel a:focus-visible { outline: 2px solid #ff8d96; outline-offset: 3px; }

/* ===== supporting: cách tính cước ===== */
.tc-rules-sec { padding-block: 64px 72px; }
.tc-rules { display: grid; gap: 18px; margin-top: 36px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .tc-rules { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .tc-rules { grid-template-columns: repeat(4, 1fr); } }
.tc-rule { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 22px 20px; transition: transform 220ms var(--ease), box-shadow 220ms var(--ease); }
@media (hover: hover) and (pointer: fine) { .tc-rule:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -20px rgba(15, 47, 87, .25); } }
.tc-rule-ic { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: var(--primary); background: color-mix(in srgb, var(--primary) 9%, transparent); margin-bottom: 14px; }
.tc-rule h3 { font-size: 16px; font-weight: 800; color: var(--ink); margin: 0 0 6px; letter-spacing: -0.01em; }
.tc-rule p { font-size: 13.5px; line-height: 1.6; color: var(--text-2); margin: 0; }

@media (prefers-reduced-motion: reduce) {
  .tc-res, .tc-rrow { transition: opacity 200ms ease; transform: none; }
  .tc-seg button:active { transform: none; }
  .tc-rule, .tc-rule:hover { transform: none; }
}
