/* ============================================================
   FLYIN' FARMER PITSTOP — Employment Application Stylesheet
   ============================================================ */


/* ==========================================================
   APPLICATION HERO
   ========================================================== */
.apply-hero {
  padding: calc(var(--nav-height) + var(--space-3xl)) var(--gutter) var(--space-3xl);
  background: var(--clr-black);
  text-align: center;
  border-bottom: 1px solid var(--clr-charcoal-light);
}

.apply-hero__inner {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.apply-hero .section-label {
  margin-bottom: var(--space-sm);
  text-align: center;
}

.apply-hero .section-title {
  margin-bottom: var(--space-md);
  text-align: center;
  text-wrap: initial;
  width: 100%;
}

.apply-hero__subtitle {
  font-family: var(--ff-body);
  font-size: var(--fs-body);
  color: var(--clr-white-warm);
  letter-spacing: var(--ls-wide);
  margin-bottom: 0.25rem;
  text-align: center;
  text-wrap: initial;
}

.apply-hero__hours {
  font-family: var(--ff-body);
  font-size: var(--fs-small);
  color: var(--clr-steel-light);
  letter-spacing: var(--ls-wide);
  margin-bottom: var(--space-md);
  text-align: center;
  text-wrap: initial;
}

.apply-hero__note {
  font-family: var(--ff-body);
  font-size: var(--fs-small);
  color: var(--clr-steel);
  line-height: var(--lh-relaxed);
  max-width: 540px;
  margin: 0 auto var(--space-xl);
  text-align: center;
  text-wrap: initial;
}

.apply-hero__note strong {
  color: var(--clr-red);
  font-weight: var(--fw-semibold);
}

.apply-hero__print-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-lg);
  font-family: var(--ff-body);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--clr-steel-light);
  background: var(--clr-charcoal);
  border: 1px solid var(--clr-charcoal-light);
  border-radius: var(--border-radius);
  cursor: pointer;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  transition: all var(--duration-fast) var(--ease-out);
}

.apply-hero__print-btn:hover {
  background: var(--clr-charcoal-light);
  color: var(--clr-white-warm);
  border-color: var(--clr-steel);
}


/* ==========================================================
   FORM MAIN CONTAINER
   ========================================================== */
.apply-main {
  background: var(--clr-charcoal);
  padding: var(--space-xl) var(--gutter) var(--space-3xl);
  min-height: 60vh;
}

.apply-form {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}


/* ==========================================================
   FORM SECTIONS
   ========================================================== */
.form-section {
  background: var(--clr-charcoal-mid);
  border: 1px solid var(--clr-charcoal-light);
  border-radius: var(--border-radius-lg);
  padding: var(--space-2xl);
  padding-top: var(--space-xl);
  position: relative;
  transition: border-color var(--duration-base) var(--ease-out);
}

.form-section:focus-within {
  border-color: var(--clr-red);
  box-shadow: 0 0 0 1px rgba(196, 30, 42, 0.15);
}

.form-section__title {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--ff-heading);
  font-size: var(--fs-h3);
  font-weight: var(--fw-bold);
  color: var(--clr-white-warm);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--clr-red);
  /* Keep legend inside the fieldset */
  float: none;
  width: 100%;
  padding-left: 0;
  padding-right: 0;
}

.form-section__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(196, 30, 42, 0.1);
  border-radius: 50%;
  color: var(--clr-red);
  flex-shrink: 0;
}

.form-section__subtitle {
  font-family: var(--ff-body);
  font-size: var(--fs-small);
  color: var(--clr-steel);
  margin-bottom: var(--space-lg);
  margin-top: calc(var(--space-md) * -1);
}


/* ==========================================================
   FORM GRID & GROUPS
   ========================================================== */
.form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.form-group--full  { grid-column: 1 / -1; }
.form-group--half  { grid-column: span 3; }
.form-group--2of3  { grid-column: span 2; }
.form-group--1of3  { grid-column: span 1; }

@media (min-width: 640px) {
  .form-group--half  { grid-column: span 3; }
}

@media (min-width: 768px) {
  .form-group--half {
    grid-column: span 3;
  }
}

/* Two-column half at tablet+ */
@media (min-width: 640px) {
  .form-grid {
    grid-template-columns: repeat(6, 1fr);
  }
  .form-group--full  { grid-column: 1 / -1; }
  .form-group--half  { grid-column: span 3; }
  .form-group--2of3  { grid-column: span 4; }
  .form-group--1of3  { grid-column: span 2; }
}

label {
  font-family: var(--ff-body);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--clr-steel-light);
  letter-spacing: 0.02em;
}

.form-label--block {
  font-family: var(--ff-body);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--clr-steel-light);
  margin-bottom: var(--space-xs);
  display: block;
}

.required {
  color: var(--clr-red);
  font-weight: var(--fw-bold);
}

.form-hint {
  color: var(--clr-steel);
  font-weight: var(--fw-regular);
  font-style: italic;
  font-size: 0.8em;
}


/* ==========================================================
   INPUTS & TEXTAREAS
   ========================================================== */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  font-family: var(--ff-body);
  font-size: var(--fs-body);
  color: var(--clr-white-warm);
  background: var(--clr-charcoal);
  border: 1px solid var(--clr-charcoal-light);
  border-radius: var(--border-radius);
  outline: none;
  transition: border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out),
              background var(--duration-fast) var(--ease-out);
  -webkit-appearance: none;
  appearance: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
textarea:focus {
  border-color: var(--clr-red);
  box-shadow: 0 0 0 3px rgba(196, 30, 42, 0.15);
  background: rgba(26, 26, 26, 0.8);
}

input::placeholder,
textarea::placeholder {
  color: var(--clr-steel);
  opacity: 0.6;
}

textarea {
  resize: vertical;
  min-height: 80px;
}

.input--signature {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 1.25rem;
  font-style: italic;
  letter-spacing: 0.02em;
  border-bottom-width: 2px;
}

/* Date input styling */
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.6);
  cursor: pointer;
}


/* ==========================================================
   CHECKBOXES & RADIOS
   ========================================================== */
.checkbox-row,
.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-lg);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--ff-body);
  font-size: var(--fs-small);
  color: var(--clr-steel-light);
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  border: 1px solid transparent;
  border-radius: var(--border-radius);
  transition: all var(--duration-fast) var(--ease-out);
  user-select: none;
}

.checkbox-label:hover {
  background: rgba(196, 30, 42, 0.05);
  border-color: var(--clr-charcoal-light);
}

input[type="checkbox"],
input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--clr-red);
  cursor: pointer;
  flex-shrink: 0;
}


/* ==========================================================
   CHECKLIST (Employment Questions)
   ========================================================== */
.checklist {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: var(--clr-charcoal);
  border: 1px solid var(--clr-charcoal-light);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  font-family: var(--ff-body);
  font-size: var(--fs-body);
  color: var(--clr-steel-light);
  user-select: none;
}

.checklist-item:hover {
  border-color: var(--clr-steel);
  background: rgba(42, 42, 42, 0.6);
}

.checklist-item:has(input:checked) {
  border-color: var(--clr-red);
  background: rgba(196, 30, 42, 0.06);
}

.checklist-item:has(input:checked) span {
  color: var(--clr-white-warm);
}

.checklist-item--agree {
  background: transparent;
  border-color: var(--clr-red);
  margin-top: var(--space-md);
}


/* ==========================================================
   EMPLOYER / REFERENCE CARDS
   ========================================================== */
.employer-card {
  background: var(--clr-charcoal);
  border: 1px solid var(--clr-charcoal-light);
  border-radius: var(--border-radius-lg);
  padding: var(--space-xl);
  margin-bottom: var(--space-lg);
  position: relative;
}

.employer-card:last-child {
  margin-bottom: 0;
}

.employer-card__badge {
  position: absolute;
  top: -10px;
  left: var(--space-lg);
  padding: 0.25rem 0.75rem;
  background: var(--clr-red);
  color: var(--clr-white-warm);
  font-family: var(--ff-heading);
  font-size: var(--fs-label);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  border-radius: var(--border-radius);
}


/* ==========================================================
   CERTIFICATION SECTION
   ========================================================== */
.certification-text {
  font-family: var(--ff-body);
  font-size: var(--fs-small);
  color: var(--clr-steel);
  line-height: var(--lh-relaxed);
  padding: var(--space-lg);
  background: var(--clr-charcoal);
  border-left: 3px solid var(--clr-red);
  border-radius: var(--border-radius);
  margin-bottom: var(--space-xl);
}


/* ==========================================================
   FORM ACTIONS (Submit & Print buttons)
   ========================================================== */
.form-actions {
  display: flex;
  gap: var(--space-lg);
  justify-content: center;
  flex-wrap: wrap;
  padding-top: var(--space-md);
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 1rem 2.5rem;
  font-family: var(--ff-heading);
  font-size: 1.125rem;
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  color: var(--clr-white-warm);
  background: var(--clr-red);
  border: 2px solid var(--clr-red);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-premium);
  text-decoration: none;
}

.btn-submit:hover {
  background: var(--clr-red-dark);
  border-color: var(--clr-red-dark);
  box-shadow: var(--shadow-glow-red);
  transform: translateY(-2px);
}

.btn-submit:active {
  transform: translateY(0);
}

.btn-print {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 1rem 2.5rem;
  font-family: var(--ff-heading);
  font-size: 1.125rem;
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  color: var(--clr-steel-light);
  background: transparent;
  border: 2px solid var(--clr-charcoal-light);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out);
}

.btn-print:hover {
  border-color: var(--clr-steel);
  color: var(--clr-white-warm);
  background: var(--clr-charcoal-mid);
}


/* ==========================================================
   SUCCESS MESSAGE
   ========================================================== */
.apply-success {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: var(--space-3xl) var(--gutter);
  background: var(--clr-charcoal);
}

.apply-success__inner {
  text-align: center;
  max-width: 560px;
}

.apply-success__icon {
  margin-bottom: var(--space-xl);
  animation: successPulse 2s ease-in-out infinite;
}

.apply-success__inner p {
  color: var(--clr-steel-light);
  font-family: var(--ff-body);
  font-size: var(--fs-body);
  line-height: var(--lh-relaxed);
  margin-top: var(--space-md);
}

@keyframes successPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}


/* ==========================================================
   RESPONSIVE — MOBILE
   ========================================================== */
@media (max-width: 639px) {
  .form-section {
    padding: var(--space-xl) var(--space-lg);
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-group--full,
  .form-group--half,
  .form-group--2of3,
  .form-group--1of3 {
    grid-column: 1 / -1;
  }

  .form-section__title {
    font-size: 1.125rem;
  }

  .checkbox-row,
  .radio-row {
    flex-direction: column;
    gap: var(--space-xs);
  }

  .employer-card {
    padding: var(--space-lg);
  }

  .form-actions {
    flex-direction: column;
  }

  .btn-submit,
  .btn-print {
    width: 100%;
  }
}


/* ==========================================================
   PRINT STYLESHEET
   ========================================================== */
@media print {
  /* Reset for clean print */
  *,
  *::before,
  *::after {
    background: white !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
    border-color: #ccc !important;
  }

  body {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 11pt;
    line-height: 1.4;
    margin: 0;
    padding: 0;
  }

  /* Hide non-print elements */
  .nav,
  .footer,
  .apply-hero__print-btn,
  .form-actions,
  .apply-success,
  .form-section__icon {
    display: none !important;
  }

  /* Hero area */
  .apply-hero {
    padding: 0 !important;
    border: none !important;
    margin-bottom: 16pt;
    text-align: center;
  }

  .apply-hero .section-label {
    font-size: 9pt;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #666 !important;
  }

  .apply-hero .section-title {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 22pt;
    font-weight: bold;
    margin: 6pt 0;
  }

  .apply-hero__subtitle {
    font-size: 10pt;
    color: #333 !important;
    margin-bottom: 4pt;
  }

  .apply-hero__note {
    font-size: 9pt;
    color: #666 !important;
    font-style: italic;
  }

  /* Main form */
  .apply-main {
    padding: 0 !important;
  }

  .apply-form {
    gap: 14pt;
  }

  /* Sections */
  .form-section {
    padding: 10pt 0 !important;
    border: none !important;
    border-radius: 0 !important;
    page-break-inside: avoid;
  }

  .form-section__title {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 13pt;
    font-weight: bold;
    border-bottom: 2px solid black !important;
    padding-bottom: 4pt;
    margin-bottom: 10pt;
  }

  .form-section__subtitle {
    font-size: 9pt;
    font-style: italic;
    margin-bottom: 8pt;
  }

  /* Grid */
  .form-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8pt;
  }

  .form-group--full  { grid-column: 1 / -1; }
  .form-group--half  { grid-column: span 3; }
  .form-group--2of3  { grid-column: span 4; }
  .form-group--1of3  { grid-column: span 2; }

  /* Labels */
  label,
  .form-label--block {
    font-size: 9pt;
    font-weight: bold;
    color: #333 !important;
    margin-bottom: 2pt;
  }

  /* Inputs become underlines */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="date"],
  textarea {
    border: none !important;
    border-bottom: 1px solid #999 !important;
    border-radius: 0 !important;
    padding: 4pt 2pt !important;
    font-size: 10pt;
    min-height: 20pt;
    background: transparent !important;
  }

  textarea {
    border: 1px solid #999 !important;
    min-height: 60pt;
  }

  /* Checkboxes print cleanly */
  .checkbox-label,
  .checklist-item {
    padding: 2pt 0 !important;
    border: none !important;
    font-size: 10pt;
  }

  .checkbox-row,
  .radio-row {
    gap: 4pt 16pt;
  }

  /* Employer cards */
  .employer-card {
    border: 1px solid #ccc !important;
    border-radius: 0 !important;
    padding: 8pt !important;
    margin-bottom: 8pt;
    page-break-inside: avoid;
  }

  .employer-card__badge {
    position: static;
    display: inline-block;
    background: transparent !important;
    color: black !important;
    border: 1px solid black !important;
    font-size: 8pt;
    padding: 1pt 4pt;
    margin-bottom: 6pt;
  }

  /* Certification */
  .certification-text {
    font-size: 9pt;
    padding: 6pt 10pt !important;
    border-left: 2px solid black !important;
    font-style: italic;
  }

  /* Signature styling */
  .input--signature {
    border-bottom: 2px solid black !important;
    font-size: 12pt;
  }

  /* Page breaks */
  .form-section:nth-child(4) {
    page-break-before: always;
  }
}
