/* ==========================================================
   WISAXIS — DASHBOARD & RESUME BUILDER (2026 SaaS Design System)
   Multi-step Wizard, Repeatable Sections, and Form Controls.
   ========================================================== */

.form-page {
  padding: calc(var(--desktop-navbar-height, 76px) + 1.5rem) var(--space-4) 4rem;
  max-width: 960px;
  margin: 0 auto;
  min-height: 100vh;
}

@media (max-width: 820px) {
  .form-page {
    padding: calc(var(--mobile-navbar-height, 72px) + 1rem) var(--space-3) 3rem;
  }
}

/* =======================
   Form Sections & Cards
======================= */
.form-section {
  background: var(--surface-1);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 2.25rem;
  margin-bottom: 2rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-section:hover {
  border-color: var(--surface-border-hover);
  box-shadow: var(--shadow-md);
}

html[data-theme="light"] .form-section {
  background: #ffffff;
  border-color: var(--border-default);
  box-shadow: var(--shadow-xs);
}

.form-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 12px;
}

.form-section h3 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 800;
  letter-spacing: var(--tracking-tight);
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
}

.form-section h3 svg {
  color: var(--primary);
}

/* =======================
   Responsive Grid System
======================= */
.grid-2-col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

@media (max-width: 768px) {
  .grid-2-col {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* =======================
   Inputs & Form Controls
====================== */
.input-group {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

label {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  transition: color 0.2s ease;
}

label.required::after {
  content: " *";
  color: var(--primary);
  font-weight: 900;
}

input,
textarea,
select {
  width: 100%;
  box-sizing: border-box;
  padding: 0.85rem 1.15rem;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
}

html[data-theme="light"] input,
html[data-theme="light"] textarea,
html[data-theme="light"] select {
  background: var(--input-bg);
  border-color: var(--input-border);
  color: var(--text-main);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  background: var(--surface-2);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

html[data-theme="light"] input:focus,
html[data-theme="light"] textarea:focus,
html[data-theme="light"] select:focus {
  background: #ffffff;
}

textarea {
  min-height: 110px;
  resize: vertical;
  line-height: var(--leading-normal);
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.25rem;
  padding-right: 2.75rem;
}

select option {
  background: var(--bg-secondary, #000000);
  color: var(--text-main);
}

html[data-theme="light"] select option {
  background: #ffffff;
  color: #0f172a;
}

/* =======================
   Repeater Items (Experiences, Education, etc.)
======================= */
.repeater-item {
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  position: relative;
  transition: all 0.2s ease;
}

.repeater-item:hover {
  border-color: var(--border-strong);
}

html[data-theme="light"] .repeater-item {
  background: #ffffff;
  border-color: var(--border-default);
  box-shadow: var(--shadow-xs);
}

.repeater-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.repeater-item-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-sm);
  letter-spacing: var(--tracking-snug);
  color: var(--text-main);
}

/* =======================
   Validation
======================= */
.error-msg {
  color: var(--danger);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  margin-top: 0.35rem;
  font-weight: 600;
}

.invalid {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 3px var(--danger-light) !important;
}

/* =======================
   Wizard Steps Animation
======================= */
.form-step {
  display: none;
}

.form-step.active {
  display: block;
  animation: slideInRight 0.38s var(--ease-out-smooth) both;
}

.form-step.slide-back {
  animation: slideInLeft 0.38s var(--ease-out-smooth) both;
}

/* =======================
   Responsive
======================= */
@media (max-width: 768px) {
  .form-section {
    padding: 1.5rem;
    border-radius: var(--radius-lg);
  }

  .form-section h3 {
    font-size: var(--text-lg);
  }
}
