/* ============================================================
   checkout.css — Premium Form Styling
   iOS-style · Neon Glow · Glassmorphism · Dark Modern
   ============================================================ */

/* ── Base form override ─────────────────────────────────── */
.form-group {
  margin-bottom: 22px;
  position: relative;
}

.form-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #9B97B8;
  margin-bottom: 8px;
  transition: color 0.2s;
}

/* ── Premium Input / Select / Textarea ─────────────────── */
.form-control {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 14px 18px;
  color: #F0EDFF;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  outline: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  -webkit-appearance: none;
  appearance: none;
}

.form-control::placeholder {
  color: rgba(155, 151, 184, 0.45);
  font-weight: 400;
}

/* Focus: neon glow effect */
.form-control:focus {
  border-color: rgba(124, 58, 237, 0.7);
  background: rgba(124, 58, 237, 0.06);
  box-shadow:
    0 0 0 3px rgba(124, 58, 237, 0.15),
    0 0 20px rgba(124, 58, 237, 0.08),
    0 4px 16px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(124, 58, 237, 0.1);
  color: #F0EDFF;
}

.form-group:focus-within .form-label {
  color: #A78BFA;
}

/* Hover state */
.form-control:hover:not(:focus) {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
}

/* ── Select dropdown styling ────────────────────────────── */
select.form-control {
  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='%239B97B8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 44px;
  cursor: pointer;
}

select.form-control:focus {
  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='%23A78BFA' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

select.form-control option {
  background: #17142A;
  color: #F0EDFF;
  padding: 10px;
}

/* ── Textarea ────────────────────────────────────────────── */
textarea.form-control {
  resize: vertical;
  min-height: 110px;
  line-height: 1.65;
}

/* ── Input with icon prefix ─────────────────────────────── */
.input-wrap {
  position: relative;
}

.input-wrap .input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #4A4670;
  font-size: 1rem;
  pointer-events: none;
  transition: color 0.2s;
}

.input-wrap .form-control {
  padding-left: 44px;
}

.input-wrap:focus-within .input-icon {
  color: #A78BFA;
}

/* ── Input suffix (copy button etc) ─────────────────────── */
.input-suffix-wrap {
  position: relative;
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.input-suffix-wrap .form-control {
  flex: 1;
}

/* ── Input validation states ────────────────────────────── */
.form-control.is-valid {
  border-color: rgba(16, 185, 129, 0.5);
  background: rgba(16, 185, 129, 0.04);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-control.is-invalid {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.04);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
  animation: shake-input 0.3s ease;
}

@keyframes shake-input {
  0%, 100% { transform: translateX(0); }
  25%       { transform: translateX(-6px); }
  75%       { transform: translateX(6px); }
}

.field-hint {
  font-size: 0.74rem;
  color: #4A4670;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
  line-height: 1.5;
}

.field-error {
  font-size: 0.74rem;
  color: #F87171;
  margin-top: 6px;
  display: none;
}

.field-error.show { display: block; }

/* ── Glassmorphism panel ─────────────────────────────────── */
.co-panel {
  background: rgba(23, 20, 42, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  padding: 32px;
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

/* Subtle top gradient shine */
.co-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124, 58, 237, 0.4), rgba(236, 72, 153, 0.3), transparent);
  pointer-events: none;
}

/* ── iOS-style floating label (optional enhancement) ─────── */
.form-group.floating {
  position: relative;
  margin-bottom: 22px;
}

.form-group.floating .form-control {
  padding-top: 22px;
  padding-bottom: 10px;
}

.form-group.floating .form-label {
  position: absolute;
  top: 14px;
  left: 18px;
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: #4A4670;
  pointer-events: none;
  transition: all 0.2s ease;
}

.form-group.floating .form-control:focus ~ .form-label,
.form-group.floating .form-control:not(:placeholder-shown) ~ .form-label {
  top: 7px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #A78BFA;
}

/* ── Payment method cards ────────────────────────────────── */
.pay-methods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.pm-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  padding: 16px 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.pm-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), transparent);
  opacity: 0;
  transition: opacity 0.25s;
}

.pm-card:hover {
  border-color: rgba(124, 58, 237, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.pm-card:hover::before { opacity: 1; }

.pm-card.sel {
  border-color: rgba(124, 58, 237, 0.65);
  background: rgba(124, 58, 237, 0.1);
  box-shadow:
    0 0 0 1px rgba(124, 58, 237, 0.2),
    0 8px 24px rgba(124, 58, 237, 0.15);
}

.pm-card.sel::before { opacity: 1; }

/* Checkmark on selected */
.pm-card.sel::after {
  content: '✓';
  position: absolute;
  top: 7px;
  right: 9px;
  width: 16px;
  height: 16px;
  background: #7C3AED;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 16px;
}

.pm-icon {
  font-size: 1.9rem;
  display: block;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
}

.pm-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: #9B97B8;
  position: relative;
  z-index: 1;
  transition: color 0.2s;
}

.pm-card.sel .pm-name { color: #A78BFA; }

/* ── Upload zone ─────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  background: rgba(255, 255, 255, 0.02);
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: rgba(124, 58, 237, 0.5);
  background: rgba(124, 58, 237, 0.05);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.08);
}

.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.upload-icon-wrap {
  width: 52px;
  height: 52px;
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 12px;
  transition: all 0.2s;
}

.upload-zone:hover .upload-icon-wrap {
  background: rgba(124, 58, 237, 0.2);
  transform: scale(1.05);
}

.upload-text-main {
  font-size: 0.9rem;
  font-weight: 600;
  color: #F0EDFF;
  margin-bottom: 4px;
}

.upload-text-sub {
  font-size: 0.74rem;
  color: #4A4670;
}

/* Uploaded preview */
.upload-preview {
  display: none;
  margin-top: 14px;
}

.upload-preview img {
  max-width: 100%;
  max-height: 170px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.upload-success-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  color: #10B981;
  margin-top: 8px;
  font-weight: 500;
}

/* ── Account detail / copy box ───────────────────────────── */
.acct-box {
  background: rgba(124, 58, 237, 0.06);
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0;
  position: relative;
  overflow: hidden;
}

.acct-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.05), transparent);
  pointer-events: none;
}

.acct-num {
  font-family: 'Space Grotesk', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: #A78BFA;
  letter-spacing: 2px;
}

.copy-btn {
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(124, 58, 237, 0.3);
  color: #A78BFA;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  position: relative;
  z-index: 1;
}

.copy-btn:hover {
  background: #7C3AED;
  color: #fff;
  border-color: #7C3AED;
  transform: scale(1.04);
}

/* ── Order summary box ────────────────────────────────────── */
.summary-box {
  background: rgba(23, 20, 42, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  padding: 26px;
  position: sticky;
  top: 90px;
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ── Steps bar ────────────────────────────────────────────── */
.steps {
  display: flex;
  align-items: center;
  margin-bottom: 32px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  backdrop-filter: blur(10px);
}

.s-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: #4A4670;
  flex-shrink: 0;
  transition: all 0.3s;
}

.s-num.active {
  background: linear-gradient(135deg, #7C3AED, #6D28D9);
  border-color: #7C3AED;
  color: #fff;
  box-shadow: 0 0 16px rgba(124, 58, 237, 0.4);
}

.s-num.done {
  background: linear-gradient(135deg, #10B981, #059669);
  border-color: #10B981;
  color: #fff;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
}

.s-lbl {
  font-size: 0.82rem;
  font-weight: 600;
  color: #4A4670;
  transition: color 0.3s;
}

.s-lbl.active { color: #F0EDFF; }
.s-lbl.done   { color: #10B981; }

.s-line {
  flex: 1;
  height: 2px;
  background: rgba(255, 255, 255, 0.06);
  margin: 0 10px;
  border-radius: 2px;
  transition: background 0.4s;
  position: relative;
  overflow: hidden;
}

.s-line.done {
  background: linear-gradient(90deg, #10B981, #059669);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
}

/* ── Pay instruction box ─────────────────────────────────── */
.pay-inst {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 20px;
  transition: border-color 0.2s;
}

.pay-inst:hover {
  border-color: rgba(124, 58, 237, 0.2);
}

.pay-inst h4 {
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pay-steps-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.psl-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  color: #9B97B8;
  line-height: 1.6;
}

.psl-num {
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, #7C3AED, #6D28D9);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.67rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 500px) {
  .pay-methods { grid-template-columns: 1fr; }
  .co-panel    { padding: 22px 18px; }
  .summary-box { padding: 20px; }
  .steps       { padding: 12px 14px; }
}
