/* Kiểu dùng chung cho các khối giao diện dựng từ <template> trong View (bản MVC). */

/* Nút đang xử lý: P6.busy(btn, true) — chữ của nút giữ nguyên trong View, vòng xoay do CSS vẽ */
.btn.is-busy,
.face-start.is-busy {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}
.btn.is-busy > *,
.face-start.is-busy > * {
  visibility: hidden;
}
.btn.is-busy::after,
.face-start.is-busy::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-top-color: #fff;
  animation: p6-spin 0.7s linear infinite;
}
.btn.btn-line.is-busy::after,
.btn.btn-white.is-busy::after {
  border-color: rgba(0, 0, 0, 0.18);
  border-top-color: var(--red, #e30613);
}
@keyframes p6-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Khung chỉ để gom các dòng dựng từ <template>, không tham gia bố cục */
.p6-contents,
.qr-img .qr-svg {
  display: contents;
}

/* Hộp thoại sửa thông tin liên hệ (cùng kiểu với hộp xác nhận lại) */
#contact-dlg {
  border: 0;
  border-radius: 18px;
  padding: 0;
  width: min(440px, 94vw);
  box-shadow: 0 24px 70px rgba(13, 29, 51, 0.3);
}
#contact-dlg::backdrop {
  background: rgba(13, 29, 51, 0.5);
}

/* Trả thưởng (PRZ): khối ở Chi tiết vé, lịch sử ở Vé của tôi */
.prz-card {
  padding: 18px 20px;
}
.prz-card h3 {
  margin: 0 0 4px;
  font-size: 17px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.prz-b {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 800;
  background: #fff4d6;
  color: #8a5a00;
}
.prz-b.ok {
  background: #e7f8ee;
  color: #0f7a43;
}
.prz-b.no {
  background: #fde8e8;
  color: #b42318;
}
.prz-help {
  margin: 6px 0 12px;
  font-size: 13.5px;
  color: var(--muted, #6b7280);
  line-height: 1.5;
}
.prz-rows {
  display: grid;
  gap: 0;
  border: 1px solid #f0ece8;
  border-radius: 14px;
  overflow: hidden;
}
.prz-rows div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 14px;
  border-bottom: 1px solid #f0ece8;
  font-size: 14px;
}
.prz-rows div:last-child {
  border: 0;
}
.prz-rows span {
  color: var(--muted, #6b7280);
}
.prz-rows b {
  text-align: right;
}
.prz-act {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}
.prz-act select {
  min-height: 42px;
  border: 1px solid #ddd6cf;
  border-radius: 12px;
  padding: 0 12px;
  font: inherit;
  max-width: 100%;
}
.prz-demo {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed #ddd6cf;
  font-size: 12.5px;
  color: var(--muted, #6b7280);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.prz-demo button {
  border: 1px solid #ddd6cf;
  background: #fff;
  border-radius: 999px;
  padding: 4px 12px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.prz-err {
  color: #b42318;
  font-size: 13px;
  margin-top: 8px;
}
.prz-hist {
  margin: 22px 0;
}
.prz-hist h2 {
  font-size: 18px;
  margin: 0 0 10px;
}
.prz-hrow {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  padding: 12px 14px;
  border: 1px solid #ebe7e3;
  border-radius: 14px;
  background: #fff;
  margin-bottom: 8px;
  color: inherit;
  text-decoration: none;
}
.prz-hrow small {
  color: var(--muted, #6b7280);
  font-size: 12.5px;
}
.prz-hrow em {
  font-style: normal;
  grid-column: 1/-1;
  font-size: 12.5px;
}

/* ---- Giới hạn theo nơi truy cập (GeoGuard): người ở ngoài Việt Nam không mua được vé, chỉ xem kết quả ---- */
/* dải thông báo ngay dưới thanh menu (Views/Shared/_Header.cshtml) */
.geo-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 14px;
  padding: 9px 16px;
  background: #fff4d6;
  border-bottom: 1px solid #f0d58a;
  color: #5c4300;
  font-size: 13.5px;
  line-height: 1.45;
  text-align: center;
}
.geo-bar a {
  color: #b3261e;
  font-weight: 700;
  white-space: nowrap;
}

/* thẻ <html> mang lớp geo-out (Views/Shared/_Layout.cshtml): ẩn lối vào mua vé trên thanh menu và ngăn kéo menu */
html.geo-out .site-header .nav-i[data-nav~='games'],
html.geo-out .drawer a[href^='san-pham'],
html.geo-out .drawer a[href^='max-3d'],
html.geo-out .drawer #drawerGames {
  display: none !important;
}

/* hộp thông báo giữa màn hình #geo-dlg (Views/Shared/_AppUi.cshtml) */
#geo-dlg,
#geo-ask-dlg,
#balance-dlg {
  /* style.css đặt margin: 0 cho mọi phần tử nên phải khai lại để hộp nằm chính giữa màn hình */
  position: fixed;
  inset: 0;
  margin: auto;
  height: fit-content;
  max-height: 92vh;
  overflow: auto;
  border: 0;
  border-radius: 18px;
  padding: 0;
  width: min(460px, 92vw);
  box-shadow: 0 24px 70px rgba(13, 29, 51, 0.3);
  color: #1f2a37;
}
#geo-dlg::backdrop,
#geo-ask-dlg::backdrop,
#balance-dlg::backdrop {
  background: rgba(13, 29, 51, 0.55);
}
/* hộp số dư ví không đủ (Views/Cart/_BalanceDialog.cshtml): bảng số dư / cần thanh toán / còn thiếu */
.balance-dlg-rows {
  display: grid;
  gap: 6px;
  margin: 4px 0 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f6f7f9;
  text-align: left;
  font-size: 14.5px;
}
.balance-dlg-rows div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.balance-dlg-rows .balance-dlg-miss b {
  color: #c0271d;
}
.geo-dlg-body {
  padding: 28px 26px 24px;
  text-align: center;
}
.geo-dlg-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #fde8e8;
  color: #c0271d;
}
.geo-dlg-icon svg {
  width: 30px;
  height: 30px;
}
.geo-dlg-body h2 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.3;
}
.geo-dlg-body p {
  margin: 0 0 10px;
  font-size: 14.5px;
  line-height: 1.55;
  color: #4b5563;
}
.geo-dlg-body .geo-dlg-note {
  font-size: 12.5px;
  color: #6b7280;
}
.geo-dlg-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}
.geo-dlg-cta .btn {
  min-width: 140px;
}

/* Trang Tài khoản → Bảo mật & thiết bị: biểu mẫu đổi mật khẩu (Views/Account/_SecurityPanel.cshtml) */
.cp-form {
  display: grid;
  gap: 12px;
  margin: 4px 0 18px;
  padding: 16px;
  border: 1px solid #ece7e2;
  border-radius: 12px;
  background: #fffdfb;
}
.cp-form .field small {
  display: block;
  margin-top: 4px;
}
.cp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Hộp thoại sửa thông tin liên hệ: ô mã OTP cạnh nút gửi mã (Views/Account/_StatusUi.cshtml) */
.ct-otp {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ct-otp .input {
  flex: 1;
  min-width: 0;
}
.ct-otp .btn {
  white-space: nowrap;
}
#contact-dlg .field small {
  display: block;
  margin-top: 4px;
}

/* Trang Vé của tôi: khối Đơn hàng trên hệ thống Vietlott (Views/Ticket/_GatewayOrdersUi.cshtml) */
.gw-orders {
  margin-top: 28px;
}
.gw-orders-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.gw-orders-h h2 {
  margin: 0;
  font-size: 20px;
}
.gw-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.gw-orders .text-danger {
  display: block;
  color: var(--red);
  font-size: 13px;
  margin-top: 6px;
}
.gw-detail {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line, #e5e7eb);
}
.gw-unit + .gw-unit {
  margin-top: 10px;
}
.gw-unit-h {
  font-weight: 600;
  margin-bottom: 4px;
}
.gw-line {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.5px;
}
