/* ===========================
   MOMAI 2026 Registration Form
   =========================== */

:root {
  --primary: #0d9488;
  --primary-dark: #0f766e;
  --primary-light: #ccfbf1;
  --primary-bg: #f0fdfa;
  --success: #16a34a;
  --success-light: #dcfce7;
  --danger: #dc2626;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --text: #1e293b;
  --text-secondary: #64748b;
  --text-light: #94a3b8;
  --border: #e2e8f0;
  --border-focus: #0d9488;
  --bg: #f8fafc;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ===========================
   Header
   =========================== */
.header {
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  color: white;
  padding: 16px 0;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  font-size: 32px;
}

.logo-text strong {
  font-size: 20px;
  display: block;
  letter-spacing: 1px;
}

.logo-text small {
  font-size: 11px;
  opacity: 0.85;
  font-weight: 300;
  line-height: 1.3;
  display: block;
  max-width: 500px;
}

/* ===========================
   Main & Container
   =========================== */
.main {
  padding: 32px 0 64px;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===========================
   Step Indicator
   =========================== */
.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 40px;
  padding: 24px;
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: default;
  flex-shrink: 0;
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  transition: all 0.3s ease;
}

.step-item.active .step-number,
.step-item.completed .step-number {
  background: var(--primary);
  color: white;
}

.step-item.completed .step-number::after {
  content: '✓';
  font-size: 16px;
}

.step-item.completed .step-number {
  font-size: 0;
}

.step-label {
  font-size: 13px;
  color: var(--text-light);
  font-weight: 500;
  text-align: center;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.step-item.active .step-label,
.step-item.completed .step-label {
  color: var(--primary-dark);
  font-weight: 600;
}

.step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 16px;
  margin-bottom: 28px;
  min-width: 40px;
  transition: background 0.3s ease;
}

.step-line.active {
  background: var(--primary);
}

/* ===========================
   Step Content
   =========================== */
.step-content {
  display: none;
  animation: fadeIn 0.4s ease;
}

.step-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.section-subtitle {
  font-size: 14px;
  color: var(--warning);
  background: var(--warning-light);
  padding: 10px 16px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  font-weight: 500;
}

/* ===========================
   Form Elements
   =========================== */
.form-group {
  margin-bottom: 28px;
}

.form-label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.form-hint {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: var(--white);
  color: var(--text);
}

.form-input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

.form-input:disabled {
  background: #f1f5f9;
  color: var(--text-light);
  cursor: not-allowed;
}

.form-input.error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 24px;
}

@media (max-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.required {
  color: var(--danger);
}

/* ===========================
   Radio Card
   =========================== */
.radio-card-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.radio-card-group.ticket-group {
  grid-template-columns: 1fr 1fr 1fr;
}

.radio-card-group.participation-group {
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 640px) {
  .radio-card-group {
    grid-template-columns: 1fr;
  }
  .radio-card-group.ticket-group {
    grid-template-columns: 1fr;
  }
}

.radio-card {
  cursor: pointer;
  display: block;
}

.radio-card input[type="radio"] {
  display: none;
}

.radio-card-inner {
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  transition: all 0.2s ease;
  background: var(--white);
  position: relative;
}

.radio-card-inner:hover {
  border-color: var(--primary);
  background: var(--primary-bg);
}

.radio-card input[type="radio"]:checked + .radio-card-inner {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 1px var(--primary);
}

.radio-card-title {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
  color: var(--text);
}

.radio-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

.radio-card-badge {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 10px;
  background: var(--primary);
  color: white;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

/* ===========================
   Checkbox
   =========================== */
.checkbox-highlight {
  background: var(--warning-light);
  border: 1.5px solid var(--warning);
  border-radius: var(--radius);
  padding: 14px 18px;
  animation: fadeIn 0.3s ease;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* ===========================
   Radio Inline
   =========================== */
.radio-inline-group {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.radio-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 15px;
}

.radio-inline input[type="radio"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* ===========================
   Number Input
   =========================== */
.number-input-group {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}

.number-btn {
  width: 44px;
  height: 44px;
  border: none;
  background: var(--bg);
  font-size: 20px;
  cursor: pointer;
  color: var(--text);
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.number-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.number-input {
  width: 60px;
  height: 44px;
  border: none;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  background: var(--white);
  color: var(--text);
  -moz-appearance: textfield;
}

.number-input::-webkit-inner-spin-button,
.number-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
}

/* ===========================
   Companion Fields
   =========================== */
.companion-fields {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.companion-row {
  display: flex;
  align-items: center;
  gap: 12px;
  animation: fadeIn 0.3s ease;
}

.companion-row label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  min-width: 100px;
}

.companion-row input {
  flex: 1;
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s;
}

.companion-row input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

/* ===========================
   Itinerary Table
   =========================== */
.itinerary-table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border);
  background: var(--white);
}

.itinerary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.itinerary-table thead {
  background: var(--primary);
  color: white;
}

.itinerary-table th {
  padding: 12px 16px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.itinerary-table td {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  vertical-align: middle;
}

.itinerary-table tbody tr:hover {
  background: var(--primary-bg);
}

.itinerary-person {
  font-weight: 600;
  white-space: nowrap;
}

.itinerary-person .person-icon {
  margin-right: 4px;
}

.itinerary-radio-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.itinerary-radio {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  font-size: 13px;
  white-space: nowrap;
}

.itinerary-radio input[type="radio"] {
  accent-color: var(--primary);
  cursor: pointer;
}

.itinerary-radio .price-tag {
  font-size: 11px;
  color: var(--primary-dark);
  font-weight: 600;
}

/* ===========================
   Fee Summary
   =========================== */
.fee-summary {
  background: var(--white);
  border: 2px solid var(--primary);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-top: 8px;
}

.fee-title {
  background: var(--primary);
  color: white;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 700;
}

.fee-body {
  padding: 20px;
}

.fee-placeholder {
  color: var(--text-light);
  text-align: center;
  padding: 20px;
  font-size: 14px;
}

.fee-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 14px;
}

.fee-line .fee-label {
  color: var(--text-secondary);
}

.fee-line .fee-amount {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.fee-line.sub-item {
  padding-left: 16px;
  font-size: 13px;
}

.fee-line.sub-item .fee-label {
  color: var(--text-light);
}

.fee-divider {
  border: none;
  border-top: 2px dashed var(--border);
  margin: 12px 0;
}

.fee-line.total {
  font-size: 18px;
  font-weight: 700;
  padding-top: 8px;
}

.fee-line.total .fee-amount {
  color: var(--primary-dark);
  font-size: 22px;
}

/* ===========================
   Buttons
   =========================== */
.step-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.btn {
  padding: 12px 32px;
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--white);
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg);
  border-color: var(--text-light);
}

.btn-success {
  background: var(--success);
  color: white;
  padding: 14px 40px;
  font-size: 16px;
}

.btn-success:hover {
  background: #15803d;
  box-shadow: var(--shadow-md);
}

/* ===========================
   File Upload
   =========================== */
.file-upload {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--bg);
}

.file-upload:hover {
  border-color: var(--primary);
  background: var(--primary-bg);
}

.file-upload-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.file-upload-icon {
  font-size: 32px;
}

.file-upload-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.file-upload-hint {
  font-size: 12px;
  color: var(--text-light);
}

.file-preview {
  margin-top: 10px;
}

.file-preview-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--success-light);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--success);
  font-weight: 500;
}

/* ===========================
   Summary Card (Step 3)
   =========================== */
.summary-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 28px;
}

.summary-section-title {
  background: var(--bg);
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}

.summary-block {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.summary-block:last-child {
  border-bottom: none;
}

.summary-block h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
}

@media (max-width: 640px) {
  .summary-grid {
    grid-template-columns: 1fr;
  }
}

.summary-item {
  display: flex;
  gap: 8px;
  font-size: 14px;
  padding: 4px 0;
}

.summary-item .s-label {
  color: var(--text-light);
  white-space: nowrap;
  min-width: 80px;
}

.summary-item .s-value {
  color: var(--text);
  font-weight: 500;
}

.summary-itinerary-row {
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 14px;
}

.summary-itinerary-row:last-child {
  border-bottom: none;
}

.summary-itinerary-name {
  font-weight: 600;
  margin-bottom: 4px;
}

.summary-itinerary-details {
  color: var(--text-secondary);
  font-size: 13px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ===========================
   Bank Info Card
   =========================== */
.bank-info-card {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1.5px solid #f59e0b;
  border-radius: var(--radius-xl);
  padding: 24px;
  margin-bottom: 28px;
}

.bank-info-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.bank-info-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.bank-info-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bank-info-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bank-info-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  min-width: 70px;
  flex-shrink: 0;
}

.bank-info-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

/* ===========================
   Modal
   =========================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.3s ease;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  text-align: center;
  max-width: 440px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}

.modal-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.modal h2 {
  font-size: 24px;
  margin-bottom: 12px;
  color: var(--text);
}

.modal p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.7;
}

/* Validation Modal */
.validation-modal {
  max-width: 480px;
}

.validation-modal h2 {
  color: var(--danger);
}

.validation-popup-list {
  text-align: left;
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
  max-height: 280px;
  overflow-y: auto;
}

.validation-popup-list li {
  padding: 8px 14px;
  font-size: 14px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.validation-popup-list li::before {
  content: '❌';
  font-size: 12px;
  flex-shrink: 0;
}

.validation-popup-list li:last-child {
  border-bottom: none;
}

/* ===========================
   Conditional Field Animation
   =========================== */
.conditional-field {
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from { opacity: 0; max-height: 0; }
  to { opacity: 1; max-height: 200px; }
}

/* ===========================
   Validation Error
   =========================== */
.validation-error {
  color: var(--danger);
  font-size: 12px;
  margin-top: 4px;
  font-weight: 500;
}

/* ===========================
   Footer
   =========================== */
.footer {
  background: var(--text);
  color: var(--text-light);
  text-align: center;
  padding: 24px;
  font-size: 12px;
  line-height: 1.8;
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 768px) {
  .step-indicator {
    padding: 16px 12px;
  }

  .step-label {
    font-size: 11px;
  }

  .step-line {
    min-width: 20px;
    margin: 0 8px;
  }

  .section-title {
    font-size: 20px;
  }

  .itinerary-table {
    font-size: 13px;
  }

  .itinerary-table th,
  .itinerary-table td {
    padding: 10px 8px;
  }

  .btn {
    padding: 10px 20px;
    font-size: 14px;
  }

  .btn-success {
    padding: 12px 24px;
    font-size: 15px;
  }

  .fee-line.total .fee-amount {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .step-indicator {
    flex-direction: column;
    gap: 8px;
  }

  .step-line {
    width: 2px;
    height: 20px;
    min-width: unset;
    margin: 0;
  }

  .step-item {
    flex-direction: row;
    gap: 12px;
  }

  .logo-text small {
    display: none;
  }
}

