/* Quýt Bio — kiểu riêng của Bảng giá một gói (bang-gia.html) và trang đặt thiết kế (thanh-toan.html).
   Nạp SAU style.css: dùng lại biến màu, .seg, .plan, .price, .feat, .btn ở đó. */

/* ---------- ô chọn kỳ: 4 nhãn chia đều, vừa 320px ---------- */
.seg-ky { display: grid; grid-template-columns: repeat(4, 1fr); width: min(100%, 440px); margin-inline: auto; }
.seg-ky label { justify-content: center; padding: 0 4px; white-space: nowrap; }
@media (max-width: 359px) { .seg-ky label { font-size: 14px; } }

/* ---------- Bảng giá: một gói ---------- */
.goi { max-width: 880px; margin: 48px auto 0; text-align: left; }
.goi-gia { display: flex; flex-direction: column; gap: 12px; }
.goi .plan-d { min-height: 0; }
.goi .price > span { display: inline-block; } /* để hiệu ứng đổi giá của style.css (.price > span) chạy được */
.goi-tong { margin-top: 6px; color: var(--slate); }
.goi .btn { margin-top: 16px; }
.goi-them { display: flex; flex-direction: column; margin-top: 4px; color: var(--slate); font-size: 15px; }
.goi-them li { display: flex; flex-wrap: wrap; align-items: center; column-gap: 6px; min-height: 32px; }
.goi-them a { display: inline-flex; align-items: center; min-height: 44px; }
/* Chỉ hiện giá, tổng và nút của kỳ đang chọn. Trình duyệt không hiểu :has thì hiện cả 4 kỳ (ô chọn đã được style.css ẩn). */
.pricing:has(#ky-1:checked) :is(.k3, .k6, .k12),
.pricing:has(#ky-3:checked) :is(.k1, .k6, .k12),
.pricing:has(#ky-6:checked) :is(.k1, .k3, .k12),
.pricing:has(#ky-12:checked) :is(.k1, .k3, .k6) { display: none; }
@supports not selector(:has(*)) { .goi-ky > div + div { margin-top: 28px; } }
@media (min-width: 734px) {
  .goi { display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px; align-items: start; padding: 44px 44px; }
  .goi .feat { margin-top: 0; padding: 4px 0 4px 48px; border-top: 0; border-left: 1px solid var(--hair); }
}

/* ---------- trang đặt thiết kế ---------- */
.dat .band { padding-top: 48px; }
.dat [hidden] { display: none !important; } /* các khối ở đây có đặt display riêng, thuộc tính hidden phải thắng */
.dat-form { display: grid; gap: 32px; max-width: 520px; margin-inline: auto; text-align: left; }
.dat-o { display: grid; gap: 20px; min-width: 0; }
.dat-bao { max-width: 520px; margin-inline: auto; padding: 20px 22px; border-radius: 20px; background: var(--mist); }
.dat-bao a { display: inline-flex; align-items: center; min-height: 44px; }

/* ô nhập: nhãn bọc ô, chữ 17px để iPhone không tự phóng to khi chạm */
.o { display: block; }
.o > span, .nhom legend { display: block; margin-bottom: 8px; padding: 0; font-size: 15px; font-weight: 600; }
.o input, .o textarea {
  display: block; width: 100%; min-height: 52px; padding: 0 16px; border: 0; border-radius: 16px;
  background: var(--mist); box-shadow: inset 0 0 0 1px #86868b; /* viền ô nhập từ 3:1 trên nền trắng */
  font: inherit; letter-spacing: inherit; color: var(--ink);
}
.o textarea { padding-block: 14px; resize: vertical; }
.o :is(input, textarea)::placeholder { color: var(--slate); opacity: 1; }
.o :is(input, textarea):focus-visible { outline: 0; box-shadow: inset 0 0 0 2px var(--blue); }
.o :is(input, textarea)[aria-invalid="true"] { box-shadow: inset 0 0 0 2px #b3261e; }
.o-loi { margin-top: -12px; color: #b3261e; font-size: 14px; }
.bay { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } /* ô bẫy: người không thấy, máy gửi rác hay điền */

.nhom { min-width: 0; margin: 0; padding: 0; border: 0; }
.nhom .seg { margin: 0; }
.nhom-ghi { margin-top: 10px; color: var(--slate); font-size: 14px; }
.nhom-ghi a { display: inline-flex; align-items: center; min-height: 44px; }

/* danh sách giao diện: mỗi mẫu một nhãn bọc nút radio */
.mau-ds { display: grid; gap: 8px; }
.mau { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 12px; min-height: 60px; padding: 10px 16px; border-radius: 16px; background: var(--mist); cursor: pointer; transition: background .2s, box-shadow .2s; }
.mau input { position: absolute; opacity: 0; pointer-events: none; }
.mau b { font-weight: 600; }
.mau small { grid-column: 1; color: var(--slate); font-size: 14px; }
.mau i { grid-area: 1 / 2 / span 2; font-style: normal; font-weight: 600; white-space: nowrap; }
.mau:has(input:checked) { background: #fff; box-shadow: inset 0 0 0 2px var(--blue); }
.mau:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }
.mau:active { opacity: .6; }
@supports not selector(:has(*)) { .mau input { position: static; opacity: 1; pointer-events: auto; grid-area: 1 / 2; } .mau i { grid-area: 2 / 2; } }

/* ô chọn thu gọn: hiện mẫu đang chọn, mũi tên lật lên khi danh sách sổ xuống */
.mau-chon { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 10px 16px; border: 0; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 1px #86868b; font: inherit; letter-spacing: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.mau-chon:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.mau-chon[aria-expanded="true"] { box-shadow: inset 0 0 0 2px var(--blue); }
.mau-hien { flex: 1; display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 12px; min-width: 0; }
.mau-hien b { font-weight: 600; }
.mau-hien small { grid-column: 1; color: var(--slate); font-size: 14px; }
.mau-hien i { grid-area: 1 / 2 / span 2; font-style: normal; font-weight: 600; white-space: nowrap; }
.mau-chon svg { flex: none; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: rotate .2s var(--ease); }
.mau-chon[aria-expanded="true"] svg { rotate: 180deg; }
.mau-chon + .mau-ds { margin-top: 8px; }

/* bảng tính tiền */
.hd { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 28px 22px; border-radius: var(--r-card); background: var(--mist); }
.hd h2 { font-size: 24px; }
.hd-bang { width: 100%; border-collapse: collapse; }
.hd-bang th, .hd-bang td { padding: 12px 0; border-bottom: 1px solid var(--hair); vertical-align: top; font-weight: 400; }
.hd-bang th { padding-right: 12px; text-align: left; }
.hd-bang td { text-align: right; white-space: nowrap; font-weight: 600; }
.hd-bang small { display: block; color: var(--slate); font-size: 14px; }
.hd-bang tfoot :is(th, td) { border-bottom: 0; font-size: 21px; font-weight: 600; }
.hd-ly-do, .hd-ghi { color: var(--slate); font-size: 14px; }
.hd-ghi a { display: flex; align-items: center; min-height: 44px; } /* link nằm riêng một dòng: vùng bấm 44px không làm lệch dòng chữ */
.hd .btn { width: 100%; min-height: 52px; border: 0; font-family: inherit; letter-spacing: inherit; cursor: pointer; }

/* phí thiết lập: in đậm chỗ khách cần thấy; dòng "kỳ sau" thành nhãn nổi có dấu ✓ */
.hd-ly-do b { color: var(--ink); font-weight: 600; }
.hd-ky-sau { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 14px; background: #fff1e6; color: #9a3412; font-size: 15px; font-weight: 600; }
.hd-ky-sau svg { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

/* Bấm "Đặt thiết kế bio": dấu tích vẽ nét + bước gửi Zalo bắt buộc (web không gửi gì đi) */
.lui { padding: 24px 22px; border-radius: 20px; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .06), 0 12px 32px -18px rgb(0 0 0 / .35); }
.lui:focus-visible { outline-offset: 4px; }
.lui-dau { display: flex; align-items: center; gap: 12px; }
.lui-dau h3 { font-size: 21px; line-height: 1.25; }
.tich { flex: none; width: 44px; height: 44px; fill: none; stroke: #16a34a; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.tich circle { fill: #dcfce7; stroke-width: 0; }
.lui.ve .tich circle { animation: tich-nen .35s var(--ease) both; transform-origin: center; }
.lui.ve .tich path { stroke-dasharray: 36; animation: tich-net .45s var(--ease) .2s both; }
@keyframes tich-nen { from { scale: .4; opacity: 0; } }
@keyframes tich-net { from { stroke-dashoffset: 36; } to { stroke-dashoffset: 0; } }
.lui-buoc { margin-top: 16px; padding: 12px 14px; border-radius: 14px; background: #fff1e6; box-shadow: inset 0 0 0 1.5px var(--brand); color: #7c2d12; font-size: 15px; line-height: 1.45; }
/* Khối "Bước cuối" bật lên sau dấu tích rồi toả vòng cam 3 nhịp cho khách dễ thấy; chạy xong tự dừng, không lặp mãi. */
.lui.ve .lui-buoc { animation: buoc-bat .5s var(--ease) .6s both, buoc-vong 1.3s ease-out 1.1s 3; }
@keyframes buoc-bat { from { opacity: 0; scale: .94; translate: 0 8px; } }
@keyframes buoc-vong { from { box-shadow: inset 0 0 0 1.5px var(--brand), 0 0 0 0 rgb(242 140 40 / .55); } to { box-shadow: inset 0 0 0 1.5px var(--brand), 0 0 0 14px rgb(242 140 40 / 0); } }
.lui-buoc b { font-weight: 700; }
.lui-ds { display: grid; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; counter-reset: b; font-size: 15px; }
.lui-ds li { display: flex; gap: 10px; align-items: baseline; counter-increment: b; }
.lui-ds li::before { content: counter(b); flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; translate: 0 -1px; }
.lui-nhan { margin-top: 16px; color: var(--slate); font-size: 13px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }
.lui-tin { margin-top: 6px; padding: 12px 14px; border-radius: 14px; background: var(--mist); color: var(--ink); font-size: 14px; line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; -webkit-user-select: all; user-select: all; } /* chạm giữ là chọn trọn đơn, phòng khi trình duyệt không cho chép */
.lui .btn-zalo { display: flex; justify-content: center; align-items: center; gap: 10px; width: 100%; min-height: 56px; margin-top: 16px; background: #0068ff; color: #fff; font-size: 18px; font-weight: 600; box-shadow: 0 10px 24px -12px rgb(0 104 255 / .8); }
.lui .btn-zalo:hover { background: #0057d9; }
.btn-zalo svg { flex: none; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.lui-ghi { margin-top: 10px; color: var(--slate); font-size: 13px; text-align: center; }
.co-don .hd { position: static; } /* đang hiện khối Zalo (thanh-toan.js gắn lớp co-don): thôi dính cột phải để khách cuộn tới được nút */

@media (min-width: 900px) {
  .dat-form { grid-template-columns: minmax(0, 1fr) minmax(0, 420px); column-gap: 56px; align-items: start; max-width: none; }
  .hd { position: sticky; top: calc(var(--nav-h) + 20px); padding: 32px 28px; }
  .mau-ds { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) { .mau { transition: none; } .lui.ve .tich :is(circle, path), .lui.ve .lui-buoc { animation: none; } .mau-chon svg { transition: none; } }
