/* Vouchers (1.7.0): Shopee-style "Voucher" row, nudge and "Pilih Voucher" sheet, shared by cart and checkout. */
.duera-vc {
  --vc-ink: var(--dark, #311b14);
  --vc-muted: #311b14a6;
  --vc-line: #311b1424;
  --vc-brand: var(--duera-burgundy, #4f0a09);
  --vc-ship: #1f6f5f;
  --vc-soft: #f7f3ef;
  --vc-alert: #8a1c13;
  display: grid;
  gap: 8px;
  min-width: 0;
  color: var(--vc-ink);
}

/* Reset at class specificity (1.9.1): beats global element rules, later class rules keep their margins. */
.duera-vc :where(h2, h3, h4, p, ul) {
  margin: 0;
}

/* Row */
.duera-vc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 10px 12px 10px 14px;
  border: 1px solid var(--vc-line);
  border-radius: 12px;
  color: inherit;
  background: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.duera-vc-row:hover {
  border-color: #311b1447;
}

.duera-vc-row-icon {
  display: grid;
  flex: none;
  color: var(--vc-brand);
}

.duera-vc-row-icon svg {
  width: 22px;
  height: 22px;
}

.duera-vc-row-label {
  flex: none;
  font-size: 15px;
  font-weight: 600;
}

.duera-vc-chips {
  display: flex;
  flex: 1 1 auto;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}

.duera-vc-chip {
  flex: none;
  padding: 2px 8px;
  border: 1px solid currentColor;
  border-radius: 4px;
  color: var(--vc-brand);
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
  white-space: nowrap;
}

.duera-vc-chip.is-shipping {
  color: var(--vc-ship);
}

.duera-vc-hint {
  overflow: hidden;
  color: var(--vc-muted);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.duera-vc-hint.is-strong {
  color: var(--vc-brand);
  font-weight: 600;
}

.duera-vc-row-chevron {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--vc-muted);
}

.duera-vc-nudge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  color: var(--vc-alert);
  background: #fbeceb;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}

.duera-vc-nudge svg {
  flex: none;
  width: 16px;
  height: 16px;
}

.duera-vc-feedback {
  color: #1b6b3a;
  font-size: 13px;
  line-height: 1.45;
}

.duera-vc-feedback[data-state="error"] {
  color: var(--vc-alert);
}

/* Sheet: centred on desktop, bottom sheet on phones */
.duera-vc-sheet {
  width: min(480px, calc(100vw - 32px));
  max-width: none;
  height: min(720px, calc(100dvh - 48px));
  max-height: none;
  padding: 0;
  border: 0;
  border-radius: 16px;
  color: var(--vc-ink);
  background: #fff;
  box-shadow: 0 24px 60px #1d0e0a33;
}

.duera-vc-sheet[open] {
  display: flex;
  flex-direction: column;
}

.duera-vc-sheet::backdrop {
  background: #1d0e0a80;
}

html.duera-vc-locked {
  overflow: hidden;
}

.duera-vc-head {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  align-items: center;
  padding: 8px;
  border-bottom: 1px solid var(--vc-line);
}

.duera-vc-head h2 {
  grid-column: 2;
  font-size: 17px;
  font-weight: 600;
  text-align: center;
}

.duera-vc-head > :first-child {
  grid-column: 1;
}

.duera-vc-head > :last-child {
  grid-column: 3;
}

.duera-vc-icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.duera-vc-icon-btn:hover {
  background: var(--vc-soft);
}

.duera-vc-icon-btn[hidden] {
  display: none;
}

.duera-vc-icon-btn svg {
  width: 22px;
  height: 22px;
}

.duera-vc-code {
  display: flex;
  gap: 8px;
  padding: 14px 16px;
}

.duera-vc-code[hidden] {
  display: none;
}

.duera-vc-code-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--vc-line);
  border-radius: 8px;
  color: inherit;
  background: #fff;
  font: inherit;
  font-size: 15px;
  text-transform: uppercase;
}

.duera-vc-code-input::placeholder {
  color: #311b1480;
  text-transform: none;
}

.duera-vc-code-input:focus {
  border-color: var(--vc-brand);
  outline: 0;
  box-shadow: 0 0 0 3px #4f0a091f;
}

.duera-vc-code-btn,
.duera-vc-ok {
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--vc-brand);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.duera-vc-code-btn {
  flex: none;
  height: 44px;
  padding: 0 18px;
  font-size: 15px;
}

.duera-vc-code-btn:disabled,
.duera-vc-ok:disabled {
  background: #d6ccc5;
  cursor: default;
}

.duera-vc-code-feedback {
  padding: 0 16px 10px;
  color: var(--vc-alert);
  font-size: 13px;
  line-height: 1.45;
}

.duera-vc-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 2px 16px 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--vc-soft);
}

.duera-vc-group h3 {
  margin: 14px 0 10px;
  font-size: 15px;
  font-weight: 600;
}

.duera-vc-empty {
  padding: 32px 12px;
  color: var(--vc-muted);
  font-size: 14px;
  text-align: center;
}

/* Ticket: coloured stub with a serrated edge, details, and a round tick */
.duera-vc-ticket {
  position: relative;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  align-items: stretch;
  margin-bottom: 10px;
  overflow: hidden;
  border: 1px solid #ebe3dd;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px #311b140d;
  font-weight: 400;
  cursor: pointer;
}

/* A chosen ticket keeps its normal outline; the round tick alone shows the choice (1.10.0, owner request). */

.duera-vc-stub {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 6px 12px 10px;
  color: #fff;
  background: var(--vc-brand);
  text-align: center;
}

.duera-vc-ticket.is-shipping .duera-vc-stub {
  background: var(--vc-ship);
}

.duera-vc-stub::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: radial-gradient(circle at 0 6px, var(--vc-soft) 3px, transparent 3.5px) 0 0 / 5px 12px repeat-y;
}

.duera-vc-stub svg,
.duera-vc-stub img {
  width: 26px;
  height: 26px;
}

.duera-vc-stub small {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
}

.duera-vc-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 10px 12px;
}

.duera-vc-info strong {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.duera-vc-min {
  color: var(--vc-ink);
  font-size: 13px;
  line-height: 1.4;
}

.duera-vc-badge {
  width: fit-content;
  margin-top: 3px;
  padding: 0 6px;
  border: 1px solid currentColor;
  border-radius: 3px;
  color: var(--vc-brand);
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
  line-height: 18px;
}

.duera-vc-reason {
  color: var(--vc-alert);
  font-size: 12px;
  line-height: 1.4;
}

.duera-vc-progress {
  display: block;
  height: 4px;
  margin: 2px 0;
  overflow: hidden;
  border-radius: 99px;
  background: #f0e4e2;
}

.duera-vc-progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--vc-alert);
}

.duera-vc-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin-top: 3px;
  color: var(--vc-muted);
  font-size: 12px;
  line-height: 1.4;
}

.duera-vc-terms {
  padding: 0;
  border: 0;
  color: #2a5db0;
  background: none;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.duera-vc-pick {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 24px;
  height: 24px;
  margin: -12px 0 0;
  opacity: 0;
  cursor: pointer;
}

.duera-vc-mark {
  display: grid;
  align-self: center;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-right: 12px;
  border: 1.5px solid #c9bdb5;
  border-radius: 50%;
  color: #fff;
  background: #fff;
}

.duera-vc-mark svg {
  width: 15px;
  height: 15px;
  opacity: 0;
}

.duera-vc-pick:checked + .duera-vc-mark {
  border-color: var(--vc-brand);
  background: var(--vc-brand);
}

.duera-vc-pick:checked + .duera-vc-mark svg {
  opacity: 1;
}

.duera-vc-pick:focus-visible + .duera-vc-mark {
  outline: 2px solid var(--vc-brand);
  outline-offset: 2px;
}

.duera-vc-ticket.is-locked {
  cursor: default;
}

.duera-vc-ticket.is-locked .duera-vc-stub {
  background: #b5a9a1;
}

.duera-vc-ticket.is-locked :is(.duera-vc-info strong, .duera-vc-min) {
  color: #311b148c;
}

.duera-vc-ticket.is-locked .duera-vc-mark {
  border-color: #e2d9d3;
  background: #f4efeb;
}

.duera-vc-login {
  align-self: center;
  margin-right: 12px;
  padding: 6px 12px;
  border: 1px solid var(--vc-brand);
  border-radius: 8px;
  color: var(--vc-brand);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

/* S&K panel */
.duera-vc-detail {
  display: grid;
  gap: 10px;
  padding: 16px 2px;
  font-size: 14px;
  line-height: 1.55;
}

.duera-vc-detail[hidden] {
  display: none;
}

.duera-vc-detail h3 {
  font-size: 20px;
  font-weight: 600;
}

.duera-vc-detail h4 {
  margin-top: 4px;
  font-size: 15px;
  font-weight: 600;
}

.duera-vc-detail ul {
  display: grid;
  gap: 4px;
  padding-left: 18px;
}

.duera-vc-detail-title {
  color: var(--vc-muted);
}

.duera-vc-foot {
  display: grid;
  gap: 10px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--vc-line);
  background: #fff;
}

.duera-vc-foot[hidden] {
  display: none;
}

.duera-vc-summary {
  display: grid;
  gap: 2px;
  font-size: 13px;
  line-height: 1.4;
}

.duera-vc-summary strong {
  font-weight: 600;
}

.duera-vc-summary span {
  color: var(--vc-ship);
  font-weight: 600;
}

.duera-vc-ok {
  height: 46px;
  font-size: 16px;
}

.duera-vc[aria-busy="true"] .duera-vc-sheet {
  cursor: progress;
}

@media (max-width: 767px) {
  .duera-vc-sheet {
    position: fixed;
    inset: auto 0 0;
    width: 100%;
    height: min(88dvh, 760px);
    margin: 0;
    border-radius: 16px 16px 0 0;
  }

  .duera-vc-code-input {
    font-size: 16px;
  }
}
