/* =============================================
   NIDI SLO – payment.css
   Styles khusus halaman checkout & QR
============================================= */

/* ── BODY ── */
.payment-body {
  background: #F5F5F0;
  min-height: 100vh;
}

/* ── NAVBAR OVERRIDE ── */
.nav-step-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-left: auto;
}

/* ── MAIN LAYOUT ── */
.pay-main {
  padding: 40px 20px 60px;
}

/* ── GRID: Form + Summary ── */
.pay-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 32px;
  align-items: start;
}

/* ── SUMMARY CARD ── */
.summary-card {
  background: #0A0A0A;
  color: #fff;
  border: 3px solid #0A0A0A;
  box-shadow: 6px 6px 0 #FFD600;
  padding: 24px 20px;
}
.summary-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #aaa;
  margin-bottom: 6px;
}
.summary-daya {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1;
  color: #FFD600;
  letter-spacing: -0.03em;
}
.summary-badge {
  display: inline-block;
  background: #FFD600;
  color: #0A0A0A;
  font-weight: 800;
  font-size: 0.75rem;
  text-transform: uppercase;
  padding: 3px 10px;
  margin-top: 6px;
  letter-spacing: 0.05em;
}
.summary-divider {
  height: 2px;
  background: #333;
  margin: 16px 0;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.92rem;
  padding: 5px 0;
  color: #ccc;
}
.summary-row span:last-child { font-weight: 700; color: #fff; }
.sum-uniq { color: #FFD600 !important; }
.total-row {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 2px solid #333;
  font-size: 1.05rem;
}
.total-row span { color: #fff !important; }
.total-row span:last-child { color: #FFD600 !important; font-size: 1.2rem; }

/* Info box */
.info-box {
  display: flex;
  gap: 10px;
  background: #fff8dc;
  border: 2px solid #0A0A0A;
  padding: 12px 14px;
  margin-top: 14px;
  font-size: 0.85rem;
  line-height: 1.5;
}
.info-box .info-icon { flex-shrink: 0; }

/* ── ORDER FORM ── */
.order-form {
  background: #fff;
  border: 3px solid #0A0A0A;
  box-shadow: 6px 6px 0 #0A0A0A;
  padding: 28px 24px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}
.form-group label {
  font-weight: 700;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.form-group input,
.form-group textarea {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  border: 3px solid #0A0A0A;
  padding: 12px 14px;
  outline: none;
  background: #F5F5F0;
  transition: box-shadow 0.15s;
  resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus {
  box-shadow: 4px 4px 0 #0A0A0A;
  background: #fff;
}
.form-group input.invalid,
.form-group textarea.invalid {
  border-color: #FF2020;
  box-shadow: 3px 3px 0 #FF2020;
}
.err-msg {
  font-size: 0.8rem;
  font-weight: 700;
  color: #FF2020;
  min-height: 16px;
}

/* ── HP ROW (input + cek WA button) ── */
.hp-row {
  display: flex;
  gap: 0;
}
.hp-row input {
  flex: 1;
  border-right: none !important;
}
.btn-cek-wa {
  flex-shrink: 0;
  background: #0A0A0A;
  color: #FFD600;
  border: 3px solid #0A0A0A;
  box-shadow: none;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.btn-cek-wa:hover:not(:disabled) {
  background: #FFD600;
  color: #0A0A0A;
}
.btn-cek-wa:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── WA STATUS badge ── */
.wa-status {
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px 12px;
  border: 2px solid;
  margin-top: 2px;
}
.wa-valid   { background: #e6f9ee; border-color: #00C853; color: #006622; }
.wa-invalid { background: #fff0f0; border-color: #FF2020; color: #990000; }
.wa-warn    { background: #fff8dc; border-color: #FF8C00; color: #7a4d00; }

/* ── BAYAR BUTTON ── */

.btn-pay {
  width: 100%;
  justify-content: center;
  background: #FFD600;
  color: #0A0A0A;
  font-size: 1.1rem;
  padding: 16px;
  margin-top: 4px;
  border: 3px solid #0A0A0A;
  box-shadow: 5px 5px 0 #0A0A0A;
  position: relative;
}
.btn-pay:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: 5px 5px 0 #0A0A0A !important;
}
.spinner {
  width: 20px;
  height: 20px;
  border: 3px solid #0a0a0a40;
  border-top-color: #0A0A0A;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── QR SECTION ── */
.qr-wrap { max-width: 900px; margin: 0 auto; }

.qr-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 28px;
  align-items: start;
}

/* QR Panel */
.qr-panel {
  background: #fff;
  border: 3px solid #0A0A0A;
  box-shadow: 8px 8px 0 #0A0A0A;
  padding: 24px 20px;
}
.qr-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.qr-title {
  font-weight: 800;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.timer-badge {
  background: #FF2020;
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 4px 12px;
  border: 2px solid #0A0A0A;
  box-shadow: 2px 2px 0 #0A0A0A;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.timer-badge.warning { background: #FF8C00; }
.timer-badge.expired { background: #555; }

.qr-img-wrap {
  border: 3px solid #0A0A0A;
  padding: 12px;
  background: #fff;
  margin-bottom: 12px;
  text-align: center;
}
.qr-img-wrap img {
  width: 100%;
  max-width: 260px;
  margin: 0 auto;
  display: block;
}
.qr-amount-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #888;
  letter-spacing: 0.06em;
  margin-bottom: 2px;
}
.qr-amount {
  font-size: 2rem;
  font-weight: 800;
  color: #0A0A0A;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.qr-order-id {
  font-size: 0.8rem;
  font-weight: 600;
  color: #888;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}
.qr-actions { display: flex; gap: 10px; }

/* Status Panel */
.status-panel {
  background: #0A0A0A;
  color: #fff;
  border: 3px solid #0A0A0A;
  box-shadow: 8px 8px 0 #FFD600;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.status-title {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #aaa;
}
.status-indicator {
  display: flex;
  align-items: center;
  gap: 12px;
}
.status-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #fff;
  flex-shrink: 0;
}
.status-dot.pending { background: #FF8C00; animation: blink 1.2s ease-in-out infinite; }
.status-dot.success { background: #00C853; animation: none; }
.status-dot.expired { background: #555; animation: none; }

@keyframes blink {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.3; }
}
.status-text {
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.status-info p { font-size: 0.88rem; color: #aaa; margin-bottom: 10px; }
.app-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.app-tag {
  background: #1a1a1a;
  color: #FFD600;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 4px 10px;
  border: 1px solid #333;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.status-hint { color: #888 !important; font-size: 0.82rem !important; }

.btn-check {
  background: #FFD600;
  color: #0A0A0A;
  border: 3px solid #FFD600;
  box-shadow: 3px 3px 0 #FFD600;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 18px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: transform 0.1s, box-shadow 0.1s;
}
.btn-check:hover {
  transform: translate(-2px,-2px);
  box-shadow: 5px 5px 0 #aaa;
}

.status-log {
  font-size: 0.8rem;
  color: #666;
  max-height: 60px;
  overflow: hidden;
  font-variant-numeric: tabular-nums;
}
.log-entry { color: #555; }
.log-entry.ok { color: #00C853; }
.log-entry.err { color: #FF2020; }

.fallback-wa {
  margin-top: 4px;
  border-top: 1px solid #222;
  padding-top: 14px;
}
.fallback-wa p { font-size: 0.85rem; color: #aaa; margin-bottom: 8px; }

/* ── SUCCESS / FAILED banner (for inline show) ── */
.status-banner {
  padding: 20px;
  border: 3px solid #0A0A0A;
  font-weight: 800;
  font-size: 1.2rem;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 16px;
}
.status-banner.success { background: #00C853; color: #fff; box-shadow: 5px 5px 0 #0A0A0A; }
.status-banner.expired { background: #555; color: #fff; box-shadow: 5px 5px 0 #0A0A0A; }

/* ── ERROR WRAP ── */
.error-wrap {
  max-width: 480px;
  margin: 40px auto;
  background: #fff;
  border: 3px solid #0A0A0A;
  box-shadow: 8px 8px 0 #0A0A0A;
  padding: 40px 32px;
  text-align: center;
}
.error-icon { font-size: 3rem; margin-bottom: 12px; }
.error-wrap h2 { font-size: 1.5rem; font-weight: 800; text-transform: uppercase; margin-bottom: 8px; }
.error-wrap p { font-size: 0.95rem; color: #555; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .pay-grid { grid-template-columns: 1fr; }
  .qr-grid  { grid-template-columns: 1fr; }
  .nav-step-label { display: none; }
}

@media (max-width: 480px) {
  .pay-main { padding: 24px 16px 40px; }
  .order-form { padding: 20px 16px; }
  .qr-panel, .status-panel { padding: 18px 14px; }
  .summary-card { padding: 18px 14px; }
  .qr-amount { font-size: 1.6rem; }
  .form-section-label { margin-left: -16px; margin-right: -16px; }
  .modal-box { padding: 20px 16px; }
  .modal-actions { flex-direction: column; }
}

/* ─────────────────────────────────────────────
   FORM ENHANCEMENTS (PLN SLO fields)
───────────────────────────────────────────── */
.form-section-label {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #fff;
  background: #0A0A0A;
  padding: 8px 14px;
  margin: 20px -24px 16px;
  border-top: 2px solid #0A0A0A;
  border-bottom: 2px solid #0A0A0A;
}

.form-group select {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  border: 3px solid #0A0A0A;
  padding: 12px 14px;
  outline: none;
  background: #F5F5F0;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230A0A0A' stroke-width='3'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
  transition: box-shadow 0.15s;
}
.form-group select:focus {
  box-shadow: 4px 4px 0 #0A0A0A;
  background-color: #fff;
}
.form-group select.invalid {
  border-color: #FF2020;
  box-shadow: 3px 3px 0 #FF2020;
}

.form-hint {
  font-size: 0.78rem;
  color: #888;
  font-weight: 500;
}

.form-notice {
  background: #fff8dc;
  border: 2px solid #0A0A0A;
  border-left: 5px solid #FF8C00;
  padding: 14px;
  font-size: 0.85rem;
  line-height: 1.55;
  margin: 12px 0 18px;
  color: #333;
}

.recaptcha-group {
  margin-bottom: 20px;
}

/* ─────────────────────────────────────────────
   REVIEW MODAL
───────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.modal-box {
  background: #fff;
  border: 3px solid #0A0A0A;
  box-shadow: 10px 10px 0 #FFD600;
  padding: 28px 24px;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform 0.2s;
}
.modal-overlay.open .modal-box {
  transform: translateY(0);
}
.modal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.modal-icon { font-size: 1.8rem; }
.modal-title {
  font-size: 1.4rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.modal-warning {
  background: #fff3cd;
  border: 2px solid #FF8C00;
  border-left: 5px solid #FF8C00;
  padding: 10px 14px;
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 16px;
  color: #333;
}
.modal-data {
  border: 2px solid #0A0A0A;
  margin-bottom: 16px;
  overflow: hidden;
}
.modal-row {
  display: flex;
  gap: 8px;
  padding: 9px 12px;
  border-bottom: 1px solid #eee;
  font-size: 0.88rem;
}
.modal-row:last-child { border-bottom: none; }
.modal-row:nth-child(even) { background: #F5F5F0; }
.modal-row-label {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: #888;
  min-width: 130px;
  flex-shrink: 0;
}
.modal-row-val {
  font-weight: 600;
  color: #0A0A0A;
  word-break: break-word;
}
.modal-confirm-txt {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 10px;
  text-align: center;
}
.modal-countdown {
  font-size: 3rem;
  font-weight: 800;
  text-align: center;
  color: #FF2020;
  line-height: 1;
  margin-bottom: 20px;
  font-variant-numeric: tabular-nums;
  transition: color 0.3s;
}
.modal-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.modal-proceed {
  flex: 1;
  justify-content: center;
  background: #00C853;
  color: #fff;
  border: 3px solid #0A0A0A;
  box-shadow: 4px 4px 0 #0A0A0A;
  font-size: 1rem;
}
.modal-proceed:disabled {
  background: #ddd;
  color: #999;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: 4px 4px 0 #ccc !important;
}
.modal-cancel {
  flex: 1;
  justify-content: center;
  background: #F5F5F0;
  color: #0A0A0A;
  border: 3px solid #0A0A0A;
  box-shadow: 4px 4px 0 #0A0A0A;
  font-size: 0.95rem;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  padding: 12px 18px;
  transition: transform 0.1s, box-shadow 0.1s;
}
.modal-cancel:hover {
  transform: translate(-2px,-2px);
  box-shadow: 6px 6px 0 #0A0A0A;
}

/* ─────────────────────────────────────────────
   CASCADING WILAYAH SELECTS
───────────────────────────────────────────── */
.select-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.select-wrap select {
  width: 100%;
  transition: opacity 0.2s, box-shadow 0.15s;
}
.select-wrap select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: #e8e8e2;
  color: #888;
}

/* Loading state: pulse border */
.select-wrap.loading select {
  border-color: #FFD600;
  animation: sel-pulse 0.8s ease-in-out infinite alternate;
}
@keyframes sel-pulse {
  from { box-shadow: 0 0 0 0 #FFD60080; }
  to   { box-shadow: 4px 4px 0 #FFD600; }
}

/* Small spinner inside select-wrap */
.sel-loader {
  position: absolute;
  right: 42px;
  width: 16px;
  height: 16px;
  border: 2.5px solid #0A0A0A30;
  border-top-color: #0A0A0A;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  pointer-events: none;
  flex-shrink: 0;
}
