/* ==========================================================================
   FlagsExpo redesign V1 (Figma-adjacent, no frame supplied) — Checkout /
   Customer Information page. Adapts the existing real form/validation/AJAX
   logic to the v2 design system without changing any functionality.
   ========================================================================== */

.v2-ci, .v2-ci * { box-sizing: border-box; font-family: var(--v2-font); }

.v2-ci-title { font-family: var(--v2-font-display); font-weight: 500; font-size: 40px; color: #021433; margin: 0 0 12px; }
.v2-ci-required-note { font-size: 14px; color: rgba(2,20,51,0.6); font-style: italic; margin: 0 0 32px; }
.v2-ci-required-mark { color: #b90600; font-style: normal; }

.v2-ci-layout { display: flex; gap: 32px; align-items: flex-start; }
.v2-ci-main { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.v2-ci-side { flex: 0 0 348px; }

.v2-ci-section { background: #fff; border: 1px solid #efefef; }
.v2-ci-section-head {
  background: var(--v2-navy); color: #fff; display: flex; align-items: center; gap: 16px;
  padding: 16px 24px; font-family: var(--v2-font-display); font-weight: 500; font-size: 18px;
}
.v2-ci-section-num {
  width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,0.15); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-family: var(--v2-font); font-weight: 700; font-size: 15px;
}
.v2-ci-section-body { padding: 24px; }
.v2-ci-section-copy { font-size: 14px; color: rgba(2,20,51,0.7); margin: 0 0 20px; }
.v2-ci-section-note { font-size: 13px; color: rgba(2,20,51,0.7); margin: 0; }

/* Turn the legacy label/input <table> into a two-column layout without touching any control/markup. */
.v2-ci-form, .v2-ci-form tbody { display: block; width: 100%; }
.v2-ci-form tr { display: flex; align-items: flex-start; gap: 24px; margin-bottom: 16px; }
.v2-ci-form tr:last-child { margin-bottom: 0; }
.v2-ci-form th {
  flex: 0 0 220px; text-align: left; font-weight: 500; font-size: 14px; color: #021433; padding-top: 10px;
}
.v2-ci-form td { flex: 1 1 0; min-width: 0; }
.v2-ci-form .textbox,
.v2-ci-form select {
  width: 100% !important; max-width: 320px; background: #f5f6f8; border: 1px solid transparent; padding: 12px 16px;
  font-family: var(--v2-font); font-size: 14px; color: #1c1c1c;
}
.v2-ci-form .textbox:focus, .v2-ci-form select:focus { outline: none; border-color: var(--v2-navy); background: #fff; }
.v2-ci-form span[style*="color:Red"], .v2-ci-form span[style*="color: Red"] { color: #b90600 !important; }
.v2-ci-validator { color: #b90600 !important; font-weight: 700; margin-left: 8px; }

.v2-ci-checkbox-row { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; font-size: 14px; color: #021433; }
.v2-ci-checkbox-row label { cursor: pointer; }

.v2-ci-secure-note { font-size: 13px; color: rgba(2,20,51,0.7); margin: 0 0 20px; }
.v2-ci-paytype-row { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 20px; }
.v2-ci-paytype-row img { height: auto; max-width: 100%; }
.v2-ci-paytype-label { font-weight: 600; font-size: 14px; color: #021433; }

.v2-ci-cvc-link { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--v2-navy); text-decoration: none; margin-left: 12px; }
.v2-ci-cvc-link img { margin: 0 !important; }
.v2-ci-cvc-popover {
  position: absolute; z-index: 20; background: #fff; border: 1px solid #efefef; box-shadow: 0 8px 24px rgba(2,20,51,0.15);
  padding: 20px; max-width: 420px; margin-top: 12px;
}
.v2-ci-cvc-popover img { max-width: 100%; height: auto; }
.v2-ci-cvc-popover h2 { font-family: var(--v2-font-display); font-weight: 500; font-size: 18px; color: #021433; margin: 0 0 12px; }
.v2-ci-cvc-popover p { font-size: 13px; color: rgba(2,20,51,0.7); line-height: 1.5; }
.v2-ci-cvc-popover.cvcHide { display: none; }

.v2-ci-continue-btn {
  background: var(--v2-navy) !important; border: none !important; color: #fff !important; padding: 16px 40px !important;
  font-family: var(--v2-font) !important; font-weight: 600 !important; font-size: 16px !important; cursor: pointer;
}
.v2-ci-continue-btn:hover { background: var(--v2-navy-dark) !important; }
.v2-ci-actions { display: flex; justify-content: flex-end; }

/* ---------- Order summary sidebar (mirrors the shopping-cart summary card) ---------- */
.v2-ci-summary-head { background: var(--v2-navy); color: #fff; padding: 16px; font-family: var(--v2-font-display); font-weight: 700; font-size: 18px; border: 1px solid #efefef; display: flex; align-items: center; justify-content: space-between; }
.v2-ci-summary-head a { color: rgba(255,255,255,0.8); font-size: 13px; font-weight: 400; font-family: var(--v2-font); text-decoration: underline; }
.v2-ci-summary-head a:hover { color: #fff; }

.v2-ci-summary-items { background: #fff; border: 1px solid #efefef; border-top: none; padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.v2-ci-summary-item { display: flex; gap: 12px; align-items: center; }
.v2-ci-summary-item-media { width: 64px; height: 64px; background: #f9f9f9; flex-shrink: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.v2-ci-summary-item-media img { max-width: 80%; max-height: 80%; object-fit: contain; }
.v2-ci-summary-item-name { font-size: 14px; color: #021433; text-decoration: none; font-weight: 500; }
.v2-ci-summary-item-name:hover { text-decoration: underline; }
.v2-ci-summary-item-price { font-size: 13px; color: rgba(2,20,51,0.7); margin-top: 4px; }

.v2-ci-summary-row { background: #fff; border: 1px solid #efefef; border-top: none; display: flex; align-items: center; justify-content: space-between; padding: 16px; font-size: 14px; }
.v2-ci-summary-row td:first-child, .v2-ci-summary-row span:first-child { color: #888a8f; }
.v2-ci-summary-row.is-total { background: #f9f9f9; font-weight: 700; font-size: 16px; color: #021433; }

.v2-ci-support { margin-top: 24px; background: #fff; border: 1px solid #efefef; padding: 20px; }
.v2-ci-support-title { font-family: var(--v2-font-display); font-weight: 500; font-size: 18px; color: #021433; margin: 0 0 16px; }
.v2-ci-support ul { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.v2-ci-support li { display: flex; align-items: center; gap: 12px; }
.v2-ci-support a { color: var(--v2-navy); text-decoration: none; font-size: 14px; font-weight: 600; }
.v2-ci-support a:hover { text-decoration: underline; }
.v2-ci-support-icon { width: 20px; height: 20px; flex-shrink: 0; color: var(--v2-navy); }
.v2-ci-support-security { display: flex; align-items: flex-start; gap: 12px; font-size: 13px; color: rgba(2,20,51,0.7); margin: 0; }
.v2-ci-support-security .v2-ci-support-icon { margin-top: 2px; }

@media (max-width: 1023px) {
  .v2-ci-layout { flex-direction: column; }
  .v2-ci-side { flex: none; width: 100%; }
}

@media (max-width: 640px) {
  .v2-ci-title { font-size: 28px; }
  .v2-ci-section-body { padding: 16px; }
  .v2-ci-form tr { flex-direction: column; align-items: stretch; gap: 6px; }
  .v2-ci-form th { flex: none; padding-top: 0; }
}
