/* ==============================================================================
   Roopb / Kito Super App - Full Screen Checkout Styles
   Matches iOS StoreCheckoutView, StoreCheckoutDeliveryCard, StoreCheckoutItemsCard
   ============================================================================== */

.co-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--surface, #FAF9F6);
  color: var(--text, #1E2022);
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

[data-theme="dark"] .co-overlay {
  background: #0D0F12;
  color: #F1F5F9;
}

/* Header Bar */
.co-nav-bar {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1010;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .co-nav-bar {
  background: rgba(13, 15, 18, 0.88);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.co-nav-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.co-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 600;
  color: inherit;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.co-back-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}
[data-theme="dark"] .co-back-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Main Layout: Desktop 2-column or Mobile single-column */
.co-container {
  max-width: 980px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 20px 140px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 860px) {
  .co-container {
    grid-template-columns: 1.35fr 1fr;
    gap: 40px;
    padding-top: 36px;
  }
}

/* Section Card Header */
.co-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}

.co-section-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
}

[data-theme="dark"] .co-section-title {
  color: #94a3b8;
}

.co-action-link {
  font-size: 13px;
  font-weight: 600;
  color: #2563eb;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.co-action-link:hover {
  text-decoration: underline;
}

/* Card Wrappers */
.co-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 18px 20px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 18px -4px rgba(0, 0, 0, 0.03);
  margin-bottom: 24px;
}

[data-theme="dark"] .co-card {
  background: #15181E;
  border-color: rgba(255, 255, 255, 0.07);
  box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.25);
}

/* Delivery Address Row */
.co-address-content {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  cursor: pointer;
}

.co-address-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.co-address-text {
  flex: 1;
}

.co-recipient {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.co-recipient-name {
  font-size: 14px;
  font-weight: 700;
}

.co-recipient-phone {
  font-size: 13px;
  color: #64748b;
}

.co-address-line {
  font-size: 13px;
  line-height: 1.45;
  color: #334155;
}
[data-theme="dark"] .co-address-line {
  color: #cbd5e1;
}

/* Shipping Method Selection */
.co-shipping-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 12px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 10px;
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .co-shipping-option {
  background: rgba(255, 255, 255, 0.03);
}

.co-shipping-option:last-child {
  margin-bottom: 0;
}

.co-shipping-option.selected {
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.05);
}

[data-theme="dark"] .co-shipping-option.selected {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.12);
}

.co-radio-circle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.co-shipping-option.selected .co-radio-circle {
  border-color: #2563eb;
  background: #2563eb;
}

.co-radio-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
}

.co-shipping-info {
  flex: 1;
}

.co-shipping-title {
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 2px;
}

.co-shipping-sub {
  font-size: 12px;
  color: #64748b;
}

.co-shipping-fee {
  font-size: 13.5px;
  font-weight: 700;
  color: inherit;
}

/* Items List */
.co-item-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .co-item-row {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.co-item-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.co-item-thumb {
  width: 60px;
  height: 68px;
  border-radius: 8px;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.04);
  flex-shrink: 0;
}

.co-item-details {
  flex: 1;
}

.co-item-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
  line-height: 1.3;
}

.co-item-sub {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 4px;
}

.co-item-price {
  font-size: 13.5px;
  font-weight: 700;
}

/* Stepper */
.co-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  overflow: hidden;
}

[data-theme="dark"] .co-stepper {
  border-color: rgba(255, 255, 255, 0.15);
}

.co-stepper button {
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: inherit;
  font-size: 13px;
}

.co-stepper button:hover {
  background: rgba(0, 0, 0, 0.05);
}

.co-stepper span {
  font-size: 12.5px;
  font-weight: 700;
  min-width: 24px;
  text-align: center;
}

/* Payment Selector Card */
.co-payment-selector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 10px 0;
}

.co-payment-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.co-payment-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-theme="dark"] .co-payment-icon {
  background: rgba(255, 255, 255, 0.08);
}

/* Promo Voucher Row */
.co-promo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  margin-bottom: 14px;
}

/* Summary breakdown */
.co-summary-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13.5px;
  margin-bottom: 8px;
  color: #64748b;
}

[data-theme="dark"] .co-summary-line {
  color: #94a3b8;
}

.co-summary-line.total {
  font-size: 16px;
  font-weight: 800;
  color: inherit;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding-top: 12px;
  margin-top: 12px;
}

[data-theme="dark"] .co-summary-line.total {
  border-top-color: rgba(255, 255, 255, 0.08);
}

/* Sticky Bottom Checkout Bar */
.co-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1010;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding: 14px 24px;
}

[data-theme="dark"] .co-bottom-bar {
  background: rgba(13, 15, 18, 0.92);
  border-top-color: rgba(255, 255, 255, 0.1);
}

.co-bottom-inner {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.co-total-wrap {
  display: flex;
  flex-direction: column;
}

.co-total-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #64748b;
}

.co-total-price {
  font-size: 20px;
  font-weight: 800;
}

.co-place-btn {
  background: #18181b;
  color: #ffffff;
  border: none;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 14px 28px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-theme="dark"] .co-place-btn {
  background: #2563eb;
  color: #ffffff;
}

.co-place-btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.co-place-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Modal Bottom Sheets (Payment selection, Promo) */
.co-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 1050;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

@media (min-width: 640px) {
  .co-sheet-overlay {
    align-items: center;
  }
}

.co-sheet-panel {
  background: #ffffff;
  width: 100%;
  max-width: 480px;
  border-radius: 24px 24px 0 0;
  padding: 24px 24px 32px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
}

[data-theme="dark"] .co-sheet-panel {
  background: #161920;
}

@media (min-width: 640px) {
  .co-sheet-panel {
    border-radius: 20px;
  }
}

/* ==============================================================================
   NATIVE LIQUID GLASS PAYOS VIETQR PAYMENT SHEET (StoreCheckoutQRPaymentSheet.swift)
   ============================================================================== */

.co-qr-sheet {
  max-width: 440px;
  border-radius: 28px 28px 0 0;
  padding: 20px 24px 36px;
}

@media (min-width: 640px) {
  .co-qr-sheet {
    border-radius: 28px;
  }
}

.co-qr-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .co-qr-header {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.co-qr-header-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.co-qr-cancel-btn {
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  padding: 4px 8px;
}

.co-qr-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 14px;
}

.co-qr-meta-top {
  text-align: center;
}

.co-qr-eyebrow {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 2px;
}

.co-qr-amount {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
}

.co-qr-ordernum {
  font-size: 11.5px;
  font-weight: 600;
  font-family: monospace;
  color: #64748b;
  margin-top: 2px;
}

/* Glass QR Box */
.co-qr-code-box {
  position: relative;
  width: 230px;
  height: 230px;
  margin: 0 auto;
  border-radius: 22px;
  background: #ffffff;
  padding: 12px;
  box-shadow: 0 8px 30px -4px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

[data-theme="dark"] .co-qr-code-box {
  background: #ffffff; /* keep QR background crisp white for camera scanner */
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

.co-qr-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

.co-qr-confirmed-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

/* Bank Account Info Card */
.co-qr-info-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.025);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .co-qr-info-card {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.06);
}

.co-qr-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.co-qr-info-label {
  color: #64748b;
  font-size: 12px;
}

.co-qr-info-val {
  font-weight: 700;
  color: var(--text);
}

.co-qr-info-val.mono {
  font-family: monospace;
  font-size: 13.5px;
  color: #2563eb;
}

.co-qr-copy-group {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.co-qr-copy-icon {
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 2px;
  display: flex;
}

.co-qr-copy-icon:hover {
  color: #2563eb;
}

.co-qr-status-indicator {
  padding: 10px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.02);
  text-align: center;
}

[data-theme="dark"] .co-qr-status-indicator {
  background: rgba(255, 255, 255, 0.03);
}

.co-qr-check-btn {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.co-qr-check-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.4);
}

.co-qr-check-btn:disabled {
  background: rgba(0, 0, 0, 0.1);
  color: #94a3b8;
  box-shadow: none;
  cursor: not-allowed;
}

[data-theme="dark"] .co-qr-check-btn:disabled {
  background: rgba(255, 255, 255, 0.08);
  color: #64748b;
}

[data-theme="dark"] .co-success-card {
  background: #161920;
}

.co-success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #22c55e;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}

