/* ==========================================================
   WISAXIS RESUME MAKER — RESUME BUILDER MOBILE STYLES (2026 SaaS)
   Wizard stepper, accordion lists, template grid, bottom toolbar.
   ========================================================== */

/* 2-column grid collapse */
.grid-2-col {
  grid-template-columns: 1fr !important;
  gap: var(--space-3) !important;
}

/* Main Form Page Container */
.form-page {
  padding: calc(var(--mobile-navbar-height, 64px) + 0.75rem) var(--space-3) calc(96px + env(safe-area-inset-bottom, 16px)) !important;
  border-radius: 0 !important;
  max-width: 100% !important;
}

/* ===== WIZARD STICKY PROGRESS BAR ===== */
.wizard-sticky {
  position: sticky;
  top: var(--mobile-navbar-height, 64px);
  z-index: 100;
  padding: 0.75rem 0.5rem;
  margin: -0.75rem -0.75rem 1.5rem -0.75rem;
  background: rgba(7, 9, 14, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-default);
}

html[data-theme="light"] .wizard-sticky {
  background: rgba(255, 255, 255, 0.94);
  border-bottom-color: var(--border-default);
}

.wizard-track {
  gap: 4px;
  max-width: 100%;
  justify-content: space-between;
  padding: 0 4px;
}

.wizard-step {
  gap: 4px;
}

.step-num {
  width: 32px;
  height: 32px;
  font-size: 12px;
  font-weight: 800;
}

.step-label {
  font-size: 10px;
  letter-spacing: 0.04em;
  max-width: 68px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wizard-connector {
  margin: 0 2px 18px;
  height: 2px;
}

@media (max-width: 380px) {
  .wizard-step .step-label {
    display: none;
  }
  .wizard-step[aria-current="step"] .step-label {
    display: block;
    font-size: 10px;
  }
}

/* ===== FORM SECTIONS & CARDS ===== */
.form-section {
  padding: 1.25rem var(--space-3);
  margin-bottom: 1.25rem;
  border-radius: var(--radius-lg);
}

.form-section-title {
  font-size: 1.1rem;
}

/* ===== TOUCH ACCESSIBLE FORM CONTROLS (iOS Auto-zoom Prevention) ===== */
input,
textarea,
select {
  padding: 0.75rem 1rem !important;
  font-size: 16px !important; /* Strictly 16px to avoid iOS auto-zoom */
  border-radius: var(--radius-md) !important;
  min-height: var(--touch-target-min, 44px);
  touch-action: manipulation;
}

textarea {
  min-height: 100px !important;
}

/* ===== PHOTO UPLOAD WRAPPER ===== */
.photo-upload-wrap {
  flex-direction: row;
  align-items: center;
  gap: 14px;
}

.photo-preview {
  width: 64px;
  height: 64px;
  min-width: 64px;
  border-radius: 50%;
}

.btn-file-upload {
  min-height: 40px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ===== ACCORDION LISTS (Experience, Education) ===== */
.accordion-card {
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
}

.accordion-header {
  padding: 0.85rem 1rem;
  min-height: 52px;
  -webkit-tap-highlight-color: transparent;
}

.accordion-title {
  font-size: var(--text-sm);
}

.accordion-subtitle {
  font-size: var(--text-xs);
}

.accordion-body {
  padding: 1rem;
}

.accordion-badge {
  width: 24px;
  height: 24px;
  font-size: 11px;
}

/* ===== SKILLS CHIP TAG INPUT ===== */
.skills-input-container {
  border-radius: var(--radius-md);
}

.skills-chips-wrapper {
  padding: 8px;
  gap: 6px;
  min-height: 48px;
}

.skill-chip {
  padding: 6px 12px;
  font-size: 12px;
  min-height: 32px;
}

.skill-chip-remove {
  width: 22px;
  height: 22px;
  font-size: 16px;
  margin-left: 2px;
}

.skill-tag-input {
  font-size: 14px !important;
  min-height: 36px !important;
  padding: 4px 8px !important;
}

.skill-suggestion-pill {
  min-height: 32px;
  padding: 5px 12px;
  font-size: 11px;
}

/* ===== ATS SCORECARD ===== */
.ats-scorecard {
  padding: 1.25rem 1rem;
  margin-bottom: 1.5rem;
}

.ats-header {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.ats-insights-grid {
  grid-template-columns: 1fr !important;
  gap: 10px;
}

.ats-insight-box {
  padding: 12px;
}

/* ===== TEMPLATE VISUAL SELECTION GRID (Step 4) ===== */
.template-visual-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 12px !important;
}

.template-visual-card {
  border-radius: var(--radius-md) !important;
  padding: 8px !important;
  min-height: auto !important;
}

.tvc-thumb {
  height: 120px !important;
  border-radius: var(--radius-sm) !important;
  background-size: cover !important;
  background-position: top center !important;
}

.tvc-name {
  font-size: 12px !important;
  margin-top: 6px !important;
  font-weight: 700 !important;
}

/* ===== FIXED BOTTOM NAVIGATION TOOLBAR ===== */
.bottom-bar {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 1100 !important;
  margin: 0 !important;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 16px)) !important;
  border-radius: 0 !important;
  border-left: none !important;
  border-right: none !important;
  border-bottom: none !important;
  border-top: 1px solid var(--border-strong) !important;
  background: rgba(7, 9, 14, 0.94) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.45) !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 12px !important;
}

html[data-theme="light"] .bottom-bar {
  background: rgba(255, 255, 255, 0.96) !important;
  border-top-color: var(--border-default) !important;
  box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08) !important;
}

.btn-wizard {
  flex: 1 !important;
  min-height: 48px !important;
  font-size: var(--text-sm) !important;
  font-weight: 700 !important;
  border-radius: var(--radius-md) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  -webkit-tap-highlight-color: transparent !important;
}

.btn-wizard:active {
  transform: scale(0.97) !important;
}

.btn-wizard.btn-prev {
  max-width: 100px;
}

/* Mobile languages grid */
.languages-grid {
  grid-template-columns: 1fr !important;
  gap: 8px !important;
}

.language-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-item-delete {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid rgba(244, 63, 94, 0.25);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.btn-item-delete:active {
  transform: scale(0.92);
}

/* ===== AI ENHANCE & SUGGEST BUTTONS ===== */
.ai-pill-btn {
  min-height: 36px !important;
  padding: 6px 14px !important;
  font-size: 12px !important;
  border-radius: var(--radius-full) !important;
  -webkit-tap-highlight-color: transparent !important;
  white-space: nowrap !important;
}

.ai-pill-btn:active {
  transform: scale(0.95) !important;
}

.ai-inline-toolbar {
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 8px !important;
}

/* ===== PHOTO UPLOAD MOBILE POLISH ===== */
.photo-upload-actions {
  flex-wrap: wrap;
  gap: 8px;
}

.btn-file-upload span,
.btn-remove-photo {
  font-size: 12px !important;
}

.photo-upload-hint {
  font-size: 10px !important;
  display: block !important;
  width: 100% !important;
}

/* ===== FORM SECTION TITLE WITH BUTTON ROW ===== */
.form-section > div:first-child {
  flex-wrap: wrap !important;
  gap: 8px !important;
}

.add-btn {
  min-height: 36px !important;
  padding: 6px 14px !important;
  font-size: 12px !important;
  border-radius: var(--radius-md) !important;
  -webkit-tap-highlight-color: transparent !important;
}

.add-btn:active {
  transform: scale(0.95) !important;
}

/* ===== MOBILE SUBMIT CTA (Step 4) ===== */
.form-step .btn-wizard.btn-next[type="submit"] {
  min-height: 52px !important;
  font-size: 1rem !important;
  border-radius: var(--radius-md) !important;
  -webkit-tap-highlight-color: transparent !important;
}

/* ===== ULTRA-NARROW PHONE (≤380px) ===== */
@media (max-width: 380px) {
  .form-page {
    padding-left: var(--space-2) !important;
    padding-right: var(--space-2) !important;
  }

  .wizard-track {
    padding: 0 !important;
  }

  .step-num {
    width: 28px;
    height: 28px;
    font-size: 11px;
  }

  .wizard-connector {
    margin: 0 1px 14px;
  }

  .form-section {
    padding: 1rem var(--space-2);
  }

  .form-section-title {
    font-size: 1rem;
  }

  .accordion-header {
    padding: 0.75rem 0.85rem;
  }

  .accordion-body {
    padding: 0.85rem;
  }

  .template-visual-grid {
    gap: 8px !important;
  }

  .tvc-thumb {
    height: 100px !important;
  }

  .tvc-name {
    font-size: 11px !important;
  }

  .ats-scorecard {
    padding: 1rem 0.85rem;
  }

  .ats-score-badge {
    font-size: 12px !important;
  }
}

/* ===== ULTRA-NARROW (≤360px) ===== */
@media (max-width: 360px) {
  .step-num {
    width: 26px;
    height: 26px;
    font-size: 10px;
  }

  .step-label {
    font-size: 9px;
    max-width: 54px;
  }

  .template-visual-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px !important;
  }

  .tvc-thumb {
    height: 88px !important;
  }

  .btn-wizard {
    min-height: 44px !important;
    font-size: 13px !important;
  }
}

