/* Vong quay may man - VinFast The Gioi Xe */
.ltw, .ltw-launcher, .ltw-popup, .ltw-store-page {
  --ltw-green: #153c3b;
  --ltw-green-2: #224d49;
  --ltw-gold: #b8913f;
  --ltw-gold-light: #e3c68b;
  --ltw-gold-soft: #f9e4b3;
  --ltw-cream: #f7f1e3;
  --ltw-white: #ffffff;
  --ltw-text: #1d2b2a;
  --ltw-muted: #56625f;
  --ltw-line: #d6ddd9;
  --ltw-danger: #b42318;
  --ltw-radius: 16px;
  --ltw-radius-sm: 10px;
  --ltw-shadow-card: 0 4px 16px rgba(21, 60, 59, .08);
  --ltw-shadow-pop: 0 24px 64px rgba(0, 0, 0, .35);
  font-family: "Roboto", "Helvetica Neue", Arial, sans-serif;
}
.ltw *, .ltw *::before, .ltw *::after { box-sizing: border-box; }
html.ltw-lock { overflow: hidden; }

/* ---------- Nut noi goc phai ---------- */
.ltw-launcher {
  /* Dat ben trai cot nut Goi/Zalo/Messenger (float-icon-hotline) de khong de len nhau */
  position: fixed; right: 72px; bottom: 18px; z-index: 9990;
  display: inline-flex; align-items: center;
  min-height: 48px; padding: 0 20px;
  border: 1px solid var(--ltw-gold-light); border-radius: 999px;
  background: var(--ltw-green); color: var(--ltw-gold-soft);
  font-size: 15px; font-weight: 500; line-height: 1.2;
  box-shadow: var(--ltw-shadow-card);
  cursor: pointer;
  /* Chi nhun 2 lan khi vao trang roi dung yen */
  animation: ltw-pulse 1.6s ease-in-out 1s 2;
}
.ltw-launcher:hover { background: var(--ltw-green-2); }
.ltw-launcher:focus-visible { outline: 3px solid var(--ltw-gold); outline-offset: 3px; }
@keyframes ltw-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

/* ---------- Popup ---------- */
.ltw-popup {
  width: min(1080px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  margin: auto; padding: 0;
  border: 1px solid var(--ltw-gold-light); border-radius: var(--ltw-radius);
  background: var(--ltw-cream); color: var(--ltw-text);
  overflow: hidden;
  box-shadow: var(--ltw-shadow-pop);
}
.ltw-popup:not([open]) { display: none; }
.ltw-popup[open] { display: flex; flex-direction: column; position: fixed; inset: 0; z-index: 99999; }
.ltw-popup::backdrop { background: rgba(9, 28, 26, .65); }
.ltw-popup-body { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.ltw-popup-close {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  width: 44px; height: 44px; margin: 0; padding: 0;
  border: 1px solid var(--ltw-line); border-radius: 999px;
  background: var(--ltw-white); color: var(--ltw-text);
  font-size: 24px; line-height: 1; cursor: pointer;
}
.ltw-popup-close:hover { background: var(--ltw-cream); }
.ltw-popup-close:focus-visible { outline: 3px solid var(--ltw-gold); outline-offset: 2px; }
.ltw-popup.is-busy .ltw-popup-close { visibility: hidden; }

/* ---------- Khoi vong quay ---------- */
.ltw { padding: 24px 36px 36px; color: var(--ltw-text); }
.ltw-title {
  margin: 0 0 24px; padding: 0 52px; text-align: center;
  font-size: clamp(24px, 4vw, 40px); font-weight: 500; line-height: 1.2;
  color: var(--ltw-green);
}
.ltw-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; align-items: start; }

.ltw-wheel-col { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ltw-wheel-wrap { position: relative; width: 100%; max-width: 440px; aspect-ratio: 1 / 1; }
.ltw-wheel { display: block; width: 100%; height: 100%; border-radius: 50%; will-change: transform; }
.ltw-pointer {
  position: absolute; top: -6px; left: 50%; z-index: 2;
  width: 34px; height: 44px; transform: translateX(-50%);
  background: var(--ltw-gold);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.ltw-hub {
  position: absolute; top: 50%; left: 50%; z-index: 1;
  width: 25%; aspect-ratio: 1 / 1; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: 50%; border: 6px solid var(--ltw-gold-light);
  background: var(--ltw-green); color: var(--ltw-gold-soft);
}
.ltw-hub-logo { font-size: clamp(26px, 4.5vw, 44px); font-weight: 700; line-height: 1; }
.ltw-hub-text { margin-top: 4px; font-size: clamp(9px, 1vw, 11px); font-weight: 700; text-align: center; }
.ltw-note { margin: 6px 0 0; font-size: 14px; font-weight: 500; color: var(--ltw-green); text-align: center; }
.ltw-sound {
  min-height: 44px; padding: 0 16px;
  border: 1px solid var(--ltw-line); border-radius: 999px; background: var(--ltw-white);
  font: inherit; font-size: 14px; color: var(--ltw-muted); cursor: pointer;
}
.ltw-sound:focus-visible { outline: 3px solid var(--ltw-gold); outline-offset: 2px; }

.ltw-form-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ltw-card {
  background: var(--ltw-white); border: 1px solid var(--ltw-line); border-radius: var(--ltw-radius);
  padding: 24px; box-shadow: var(--ltw-shadow-card);
}
.ltw .ltw-form { margin: 0; }
.ltw-card-title { margin: 0 0 6px; font-size: 22px; font-weight: 700; color: var(--ltw-green); }
.ltw-card-sub { margin: 0 0 8px; font-size: 14px; color: var(--ltw-muted); }
.ltw .ltw-label { display: block; margin: 14px 0 6px; font-size: 14px; font-weight: 700; color: var(--ltw-text); }
.ltw-label small { font-size: 14px; font-weight: 400; color: var(--ltw-muted); }
.ltw .ltw-input {
  display: block; width: 100%; height: 48px; padding: 0 14px; margin: 0;
  border: 1px solid var(--ltw-line) !important; border-radius: var(--ltw-radius-sm); background: var(--ltw-white);
  font: inherit; font-size: 16px; color: var(--ltw-text);
  transition: border-color .15s, box-shadow .15s;
}
.ltw select.ltw-input { appearance: auto; }
.ltw .ltw-input:focus { outline: none; border-color: var(--ltw-green-2) !important; box-shadow: 0 0 0 3px rgba(34, 77, 73, .15); }
.ltw .ltw-input.ltw-invalid { border-color: var(--ltw-danger) !important; box-shadow: 0 0 0 3px rgba(180, 35, 24, .12); }
.ltw-hint { margin: 6px 0 0; font-size: 14px; color: var(--ltw-muted); }
.ltw-agree { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0 0; font-size: 14px; line-height: 1.5; color: var(--ltw-muted); cursor: pointer; }
.ltw-agree input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--ltw-green); }
.ltw-agree.ltw-invalid { color: var(--ltw-danger); }
.ltw-status { min-height: 20px; margin: 12px 0 0; font-size: 14px; font-weight: 500; color: var(--ltw-danger); }
.ltw-status:empty { min-height: 0; margin: 0; }
.ltw-alert { margin: 12px 0 0; padding: 10px 12px; border-radius: var(--ltw-radius-sm, 10px); background: #fdecea; color: var(--ltw-danger); font-size: 14px; font-weight: 500; }
.ltw-pin { margin-top: 12px; }
.ltw-pin[hidden] { display: none !important; }
.ltw .ltw-pin .ltw-input { max-width: 220px; letter-spacing: 4px; }
.ltw .ltw-submit {
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 52px; margin-top: 16px; padding: 0 20px;
  border: 0; border-radius: var(--ltw-radius-sm); cursor: pointer;
  background: var(--ltw-green); color: var(--ltw-white);
  font: inherit; font-size: 16px; font-weight: 700;
  transition: background-color .15s, opacity .15s;
}
.ltw .ltw-submit:hover:not(:disabled) { background: var(--ltw-green-2); }
.ltw .ltw-submit:focus-visible { outline: 3px solid var(--ltw-gold); outline-offset: 3px; }
.ltw .ltw-submit:disabled { cursor: not-allowed; opacity: .75; }

.ltw-terms-title { margin: 0 0 10px; font-size: 16px; font-weight: 700; color: var(--ltw-green); }
/* Noi dung soan bang TinyMCE trong admin */
.ltw-rich { font-size: 14px; line-height: 1.6; color: var(--ltw-muted); overflow-wrap: anywhere; }
.ltw-rich > :first-child { margin-top: 0; }
.ltw-rich > :last-child { margin-bottom: 0; }
.ltw-rich p { margin: 0 0 8px; }
.ltw .ltw-rich ul, .ltw .ltw-rich ol { margin: 0 0 8px; padding-left: 20px; }
.ltw .ltw-rich ul { list-style: disc; }
.ltw .ltw-rich ol { list-style: decimal; }
.ltw .ltw-rich li { display: list-item; }
.ltw-rich li + li { margin-top: 4px; }
.ltw-rich img, .ltw-rich iframe, .ltw-rich video { max-width: 100%; height: auto; }
.ltw-rich table { width: 100%; max-width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.ltw-rich td, .ltw-rich th { padding: 6px 8px; border: 1px solid var(--ltw-line); }
.ltw-rich a { color: var(--ltw-green); text-decoration: underline; }
.ltw-rules summary {
  display: flex; align-items: center; gap: 6px; min-height: 44px; margin: -8px 0;
  font-size: 16px; font-weight: 700; color: var(--ltw-green); cursor: pointer; list-style: none;
}
.ltw-rules summary::-webkit-details-marker { display: none; }
.ltw-rules summary::before { content: '+'; width: 16px; font-weight: 700; color: var(--ltw-gold); }
.ltw-rules[open] summary::before { content: '−'; }
.ltw-rules summary span { font-weight: 400; color: var(--ltw-muted); }
.ltw-rules[open] summary { margin-bottom: 10px; }

/* ---------- Ket qua ---------- */
.ltw-result {
  position: fixed; inset: 0; z-index: 100000;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(9, 28, 26, .65);
}
.ltw-result[hidden] { display: none; }
.ltw-result-box {
  width: min(440px, 100%); padding: 32px 28px 28px; text-align: center;
  border-radius: var(--ltw-radius); border: 1px solid var(--ltw-gold-light);
  background: var(--ltw-cream); box-shadow: var(--ltw-shadow-pop);
  animation: ltw-pop .3s ease-out;
}
@keyframes ltw-pop { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }
.ltw-result-title { margin: 0; font-size: 26px; font-weight: 700; color: var(--ltw-green); }
.ltw-result-sub { margin: 10px 0 2px; font-size: 16px; color: var(--ltw-muted); }
.ltw-result-prize { margin: 0 0 18px; font-size: 26px; font-weight: 700; color: var(--ltw-green); line-height: 1.25; }
.ltw-code-box { padding: 14px; border: 2px dashed var(--ltw-gold); border-radius: var(--ltw-radius-sm); background: var(--ltw-white); }
.ltw-code-label { display: block; font-size: 14px; font-weight: 500; color: var(--ltw-muted); }
.ltw-code { display: block; margin-top: 4px; font-size: 28px; font-weight: 700; letter-spacing: .12em; color: var(--ltw-green); user-select: all; }
.ltw-result-note { margin: 14px 0 0; font-size: 14px; color: var(--ltw-muted); }
.ltw-result-close {
  width: 100%; min-height: 50px; margin-top: 18px; border: 0; border-radius: var(--ltw-radius-sm); cursor: pointer;
  background: var(--ltw-green); color: var(--ltw-white); font: inherit; font-size: 16px; font-weight: 700;
}
.ltw-result-close:hover { background: var(--ltw-green-2); }
.ltw-result-close:focus-visible { outline: 3px solid var(--ltw-gold); outline-offset: 3px; }

/* ---------- Trang quay tai cua hang ---------- */
.ltw-store-page { margin: 0; min-height: 100vh; background: var(--ltw-green); }
.ltw-store-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 1280px; margin: 0 auto; padding: 16px 24px;
}
.ltw-store-logo {
  display: block; min-width: 0; max-width: 60%;
  padding: 8px 14px; border-radius: var(--ltw-radius-sm); background: transparent;
  color: var(--ltw-green); font-weight: 700; text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ltw-store-logo img { display: block; height: 40px; width: auto; }
.ltw-store-badge {
  flex: none; white-space: nowrap; padding: 8px 16px;
  border: 1px solid var(--ltw-gold-light); border-radius: 999px;
  color: var(--ltw-gold-soft); font-size: 14px; font-weight: 500;
}
.ltw-store-main { max-width: 1280px; margin: 0 auto; padding: 0 24px 32px; }
.ltw--store { border-radius: var(--ltw-radius); background: var(--ltw-cream); box-shadow: var(--ltw-shadow-pop); }
.ltw--store .ltw-body { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.ltw--store .ltw-wheel-wrap { max-width: 600px; }
.ltw.ltw--store .ltw-input { height: 56px; font-size: 18px; }
.ltw.ltw--store .ltw-submit { min-height: 60px; font-size: 18px; }
.ltw--store .ltw-title { padding: 0; }

/* ---------- Responsive ---------- */
@media (min-width: 861px) {
  .ltw-wheel-col { position: sticky; top: 24px; }
}
@media (max-width: 860px) {
  .ltw { padding: 20px 16px 24px; }
  .ltw-body, .ltw--store .ltw-body { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .ltw-wheel-wrap { max-width: 360px; }
  .ltw--store .ltw-wheel-wrap { max-width: 440px; }
  .ltw-title { margin-bottom: 16px; }
  .ltw-card { padding: 18px; }
  .ltw-popup { width: calc(100vw - 16px); max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); }
  /* Dai 64px tren cung khong cuon, danh rieng cho nut X */
  .ltw-popup[open] { padding-top: 64px; }
  .ltw-popup-close { top: 10px; }
  .ltw-popup .ltw { padding-top: 0; }
  .ltw-store-header, .ltw-store-main { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 480px) {
  .ltw-launcher { right: 70px; bottom: 16px; min-height: 44px; padding: 0 14px; font-size: 14px; }
  .ltw-title { font-size: 24px; }
  .ltw-popup .ltw-title { padding: 0; }
  .ltw-hub-text { display: none; }
  .ltw-store-logo img { height: 32px; }
  .ltw-store-badge { padding: 6px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .ltw-launcher, .ltw-result-box { animation: none; }
}
