/*
 * AirPilot Premium Aviation Academy Admissions Stylesheet
 * Scoped strictly to .apply-page to isolate it from external styling.
 */

.apply-page {
  --apply-navy: #002147;
  --apply-blue: #004b93;
  --apply-blue-hover: #00366b;
  --apply-light-blue: #f4f8fc;
  --apply-slate: #475569;
  --apply-muted: #64748b;
  --apply-bg: #fafbfc;
  --apply-border: #e2e8f0;
  --apply-focus: rgba(0, 75, 147, 0.08);
  --apply-radius: 12px;
  --apply-shadow: 0 4px 20px rgba(0, 33, 71, 0.03);
  --apply-shadow-hover: 0 10px 30px rgba(0, 33, 71, 0.06);
  --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);

  background: var(--apply-bg);
  padding: 0 0 6rem 0;
  font-family: 'Inter', sans-serif;
  color: var(--apply-slate);
}

/* === Form Section Layout === */
.apply-page .programme-section {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

/* === Large White Rounded Container === */
.apply-page .apply-form-wrapper {
  max-width: 1000px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 24px;
  padding: 3.5rem 4rem;
  box-shadow: var(--apply-shadow);
  border: 1px solid var(--apply-border);
  transition: var(--transition-smooth);
}

@media (max-width: 768px) {
  .apply-page .apply-form-wrapper {
    padding: 2rem 1.5rem;
    border-radius: 16px;
  }
}

/* === Section Dividers === */
.apply-page .apply-divider {
  height: 1px;
  background-color: var(--apply-border);
  border: none;
  margin: 3rem 0;
  width: 100%;
}

/* === Headers === */
.apply-page .apply-section-header {
  margin-bottom: 2.5rem;
}

.apply-page .apply-section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--apply-navy);
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  text-transform: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.apply-page .apply-section-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1.5rem;
  background: var(--apply-blue);
  border-radius: 2px;
}

.apply-page .apply-section-subtitle {
  font-size: 0.9375rem;
  color: var(--apply-muted);
  font-weight: 500;
  margin-bottom: 0;
}

/* === Fields Styling === */
.apply-page .apply-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.75rem;
}

.apply-page .apply-field-group {
  margin-bottom: 1.75rem;
}

/* === Bold Navy Labels === */
.apply-page .apply-main-label,
.apply-page .apply-field label {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--apply-navy);
  margin-bottom: 0.625rem;
  display: block;
}

.apply-page .required {
  color: #ef4444;
  margin-left: 0.125rem;
}

/* === Premium Inputs, Selects, and Textareas === */
.apply-page input[type="text"],
.apply-page input[type="email"],
.apply-page input[type="tel"],
.apply-page input[type="date"],
.apply-page select,
.apply-page textarea {
  width: 100%;
  height: 48px;
  border: 1px solid #cbd5e1;
  border-radius: var(--apply-radius);
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  color: var(--apply-navy);
  background-color: #ffffff;
  transition: var(--transition-smooth);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.01);
  box-sizing: border-box;
}

.apply-page textarea {
  height: auto;
  min-height: 120px;
  resize: vertical;
}

.apply-page input::placeholder,
.apply-page textarea::placeholder {
  color: #94a3b8;
  font-size: 14px;
}

/* Focus state */
.apply-page input:focus,
.apply-page select:focus,
.apply-page textarea:focus {
  border-color: var(--apply-blue);
  box-shadow: 0 0 0 4px var(--apply-focus);
  outline: none;
  background-color: #ffffff;
}

/* Custom styling for date inputs to fit nicely */
.apply-page input[type="date"] {
  position: relative;
  appearance: none;
  -webkit-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='%23475569' stroke-width='2'%3E%3Crect width='18' height='18' x='3' y='4' rx='2' ry='2'%3E%3C/rect%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 18px 18px;
}

.apply-page input[type="date"]::-webkit-calendar-picker-indicator {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: auto;
  height: auto;
  color: transparent;
  background: transparent;
  cursor: pointer;
}

/* === Dropdowns / Selects === */
.apply-page select {
  appearance: none;
  -webkit-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='%23475569' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 14px 14px;
  padding-right: 40px;
  cursor: pointer;
}

/* === Helper Sublabels underneath inputs === */
.apply-page .apply-subfield {
  position: relative;
  display: flex;
  flex-direction: column;
}

.apply-page .apply-sublabel {
  font-size: 11px;
  color: var(--apply-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 6px;
  display: block;
}

.apply-page .apply-margin-bottom {
  margin-bottom: 1.25rem;
}

/* === Phone Row === */
.apply-page .apply-phone-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 1rem;
}

@media (max-width: 480px) {
  .apply-page .apply-phone-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

/* === Grid Layouts === */
.apply-page .apply-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.apply-page .apply-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

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

/* === Upload Zones === */
.apply-page .apply-uploads-stack {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.apply-page .apply-upload-card-full {
  display: flex;
  flex-direction: column;
}

.apply-page .apply-upload-label {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--apply-navy);
  margin-bottom: 0.75rem;
}

.apply-page .apply-drag-drop-box {
  border: 2px dashed #cbd5e1;
  background-color: var(--apply-bg);
  border-radius: 16px;
  padding: 2.25rem 2rem;
  position: relative;
  text-align: center;
  transition: var(--transition-smooth);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 110px;
  box-sizing: border-box;
}

.apply-page .apply-drag-drop-box:hover,
.apply-page .apply-drag-drop-box.is-dragover {
  background-color: var(--apply-light-blue);
  border-color: var(--apply-blue);
}

.apply-page .apply-upload-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  pointer-events: none;
  width: 100%;
}

.apply-page .apply-upload-icon-wrapper {
  color: var(--apply-muted);
  transition: var(--transition-smooth);
}

.apply-page .apply-drag-drop-box:hover .apply-upload-icon-wrapper {
  color: var(--apply-blue);
  transform: translateY(-2px);
}

.apply-page .apply-upload-text-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.apply-page .apply-browse-btn {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  background-color: var(--apply-navy);
  padding: 6px 16px;
  border-radius: 20px;
  transition: var(--transition-smooth);
}

.apply-page .apply-drag-drop-box:hover .apply-browse-btn {
  background-color: var(--apply-blue);
}

.apply-page .apply-drag-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--apply-muted);
}

.apply-page .apply-file-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 5;
}

/* Selected File Display */
.apply-page .apply-file-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background-color: #ffffff;
  border: 1px solid var(--apply-border);
  padding: 8px 18px;
  border-radius: 30px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.02);
  pointer-events: auto;
}

.apply-page .file-name-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--apply-navy);
}

.apply-page .remove-file-btn {
  background: #f1f5f9;
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--apply-muted);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  transition: var(--transition-smooth);
}

.apply-page .remove-file-btn:hover {
  background: #ef4444;
  color: #ffffff;
}

.apply-page .apply-drag-drop-box.has-file {
  border-style: solid;
  border-color: #10b981;
  background-color: #f0fdf4;
}

/* === Declaration Section === */
.apply-page .apply-declaration-box {
  background: var(--apply-light-blue);
  border: 1px solid var(--apply-border);
  border-radius: 16px;
  padding: 2.25rem;
  margin-bottom: 2rem;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.01);
}

.apply-page .apply-declaration-text {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--apply-navy);
  font-weight: 500;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--apply-border);
  padding-bottom: 1.25rem;
}

.apply-page .apply-declaration-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.apply-page .apply-declaration-consent input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  margin-top: 0.125rem;
  cursor: pointer;
  accent-color: var(--apply-blue);
}

.apply-page .apply-declaration-consent label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--apply-navy);
  line-height: 1.4;
  cursor: pointer;
  user-select: none;
}

/* === Submit Button === */
.apply-page .apply-submit-btn {
  background-color: var(--apply-navy);
  color: #ffffff;
  border: none;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 33, 71, 0.15);
  transition: var(--transition-smooth);
}

.apply-page .apply-submit-btn:hover {
  background-color: var(--apply-blue);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 75, 147, 0.25);
}

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

/* === Alerts === */
.apply-page .apply-alert {
  padding: 1.25rem 1.75rem;
  border-radius: 14px;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.5;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.apply-page .apply-alert--success {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.apply-page .apply-alert--error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}
