/* apply.css */

:root {
  --apply-bg: #f4f4f6; /* light grey background */
  --card-bg: #ffffff;
  --primary: #df1919;
  --primary-hover: #b81414;
  --text-dark: #1a1a2e;
  --text-muted: #6b7280;
  --border-color: rgba(0, 0, 0, 0.1);
  --input-bg: #faf9f7;
}

body.apply-body {
  background-color: var(--apply-bg);
  min-height: 100vh;
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text-dark);
}

/* Header */
.apply-header-nav {
  background: var(--card-bg);
  padding: 15px 0;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}
.apply-header-nav .wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.apply-header-nav .nav-inner { display: flex; justify-content: space-between; align-items: center; }
.apply-header-nav .nav-logo img { height: 45px; }
.apply-header-nav .btn-outline {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; border: 1px solid var(--border-color);
  border-radius: 6px; color: var(--text-dark); font-weight: 500;
  text-decoration: none; transition: all 0.2s ease;
  font-size: 0.95rem;
}
.apply-header-nav .btn-outline:hover {
  border-color: var(--primary); color: var(--primary); background: #fff5f5;
}

/* Background elements removed for cleaner look */
.apply-background-elements { display: none; }

/* Main Container */
.apply-main {
  padding: 50px 20px;
}

.apply-container {
  width: 100%; max-width: 800px;
  margin: 0 auto;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.05);
  padding: 40px 50px;
}

/* Form Header */
.apply-header { text-align: center; margin-bottom: 30px; }
.apply-header h2 {
  font-family: 'Playfair Display', serif; font-size: 2.2rem; color: var(--text-dark); margin-bottom: 8px;
}
.apply-header h2 span { color: var(--primary); }
.apply-header p { color: var(--text-muted); font-size: 1rem; margin-bottom: 0; }

/* Progress Bar */
.progress-container { margin-bottom: 40px; padding: 0 20px; }
.progress-track {
  height: 4px; background: #e5e7eb; border-radius: 4px; position: relative; margin-bottom: 20px;
}
.progress-fill {
  position: absolute; top: 0; left: 0; height: 100%; background: var(--primary);
  border-radius: 4px; width: 25%; transition: width 0.3s ease;
}
.step-indicators { display: flex; justify-content: space-between; position: relative; top: -14px; }
.step-dot {
  width: 28px; height: 28px; background: #e5e7eb; color: var(--text-muted);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 0.85rem; box-shadow: 0 0 0 6px var(--card-bg);
  transition: all 0.3s ease;
}
.step-dot.active { background: var(--primary); color: #fff; box-shadow: 0 0 0 6px var(--card-bg), 0 0 0 8px rgba(223, 25, 25, 0.1); }
.step-dot.completed { background: var(--primary); color: #fff; }

/* Form Steps */
.form-step { display: none; animation: fadeIn 0.3s ease forwards; }
.form-step.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.step-title {
  font-size: 1.4rem; color: var(--text-dark); font-weight: 600;
  margin-bottom: 25px; padding-bottom: 12px; border-bottom: 1px solid var(--border-color);
}

/* Inputs */
.form-row { display: flex; gap: 20px; }
.half { flex: 1; }

.input-group { margin-bottom: 20px; }
.input-group label {
  display: block; font-size: 0.9rem; font-weight: 500; color: var(--text-dark); margin-bottom: 8px;
}
.input-wrapper { position: relative; }
.input-wrapper .icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  font-size: 1.1rem; color: #9ca3af; pointer-events: none;
}
.input-wrapper input, .input-wrapper select, .input-wrapper textarea {
  width: 100%; padding: 12px 14px 12px 40px;
  background: var(--input-bg); border: 1px solid #d1d5db; border-radius: 6px;
  font-family: inherit; font-size: 0.95rem; color: var(--text-dark);
  transition: all 0.2s ease;
}
.input-wrapper textarea { padding-left: 14px; min-height: 100px; resize: vertical; }
.textarea-wrapper .icon { display: none; }

.input-wrapper input:focus, .input-wrapper select:focus, .input-wrapper textarea:focus {
  outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(223, 25, 25, 0.1);
}

/* Select */
.select-group select { appearance: none; cursor: pointer; }
.select-group::after {
  content: '\ebcc'; font-family: boxicons; position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  font-size: 1.2rem; color: #9ca3af; pointer-events: none;
}

/* Checkboxes & Radios */
.custom-group { margin-bottom: 25px; }
.group-label { display: block; font-weight: 500; color: var(--text-dark); margin-bottom: 6px; font-size: 0.95rem; }
.hint { font-weight: 400; font-size: 0.85rem; color: var(--text-muted); display: block; margin-bottom: 12px; }
.custom-checkbox-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.custom-radio-group { display: flex; gap: 20px; }

.custom-check, .custom-radio {
  display: flex; align-items: flex-start; padding: 12px 14px; border: 1px solid #d1d5db;
  border-radius: 6px; cursor: pointer; background: var(--input-bg); transition: 0.2s;
}
.custom-check:hover, .custom-radio:hover { border-color: #9ca3af; background: #fff; }
.custom-check input, .custom-radio input { display: none; }

.check-box, .radio-box {
  width: 18px; height: 18px; border: 1px solid #9ca3af; border-radius: 4px; margin-right: 12px;
  position: relative; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px;
  background: #fff;
}
.radio-box { border-radius: 50%; }

.custom-check input:checked ~ .check-box { background: var(--primary); border-color: var(--primary); }
.custom-check input:checked ~ .check-box::after { content: '\eb7a'; font-family: boxicons; color: #fff; font-size: 12px; }
.custom-radio input:checked ~ .radio-box { border-color: var(--primary); }
.custom-radio input:checked ~ .radio-box::after { content: ''; width: 8px; height: 8px; background: var(--primary); border-radius: 50%; }
.custom-check:has(input:checked), .custom-radio:has(input:checked) { border-color: var(--primary); background: #fff5f5; }

/* File Upload */
.file-upload-wrapper { margin-bottom: 20px; }
.upload-label {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 25px; border: 2px dashed #d1d5db; border-radius: 8px; background: var(--input-bg);
  cursor: pointer; transition: 0.2s;
}
.upload-label:hover { border-color: var(--primary); background: #fff5f5; color: var(--primary); }
.upload-label i { font-size: 2rem; color: #9ca3af; margin-bottom: 8px; }
.upload-label:hover i { color: var(--primary); }
.upload-label span { font-size: 0.95rem; font-weight: 500; color: var(--text-dark); }
.upload-label input { display: none; }
.file-name { margin-top: 8px; font-size: 0.85rem; color: var(--primary); font-weight: 500; text-align: center; }

/* Buttons */
.step-actions { display: flex; justify-content: flex-end; margin-top: 30px; border-top: 1px solid var(--border-color); padding-top: 25px; gap: 15px; }
.step-actions.split { justify-content: space-between; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: 6px; font-size: 0.95rem; font-weight: 600;
  cursor: pointer; transition: 0.2s; border: none; font-family: inherit;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(223, 25, 25, 0.2); }
.btn-outline-form { background: #fff; color: var(--text-dark); border: 1px solid #d1d5db; }
.btn-outline-form:hover { background: #f3f4f6; }

/* Responsive */
@media (max-width: 640px) {
  .apply-main { padding: 20px 15px; }
  .apply-container { padding: 30px 20px; }
  .form-row { flex-direction: column; gap: 0; }
  .step-actions { flex-direction: column-reverse; gap: 10px; }
}

/* Submission Modal */
.submit-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.submit-modal-overlay.active {
  display: flex;
  opacity: 1;
}
.submit-modal-content {
  background: #ffffff;
  padding: 40px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 400px;
  width: 90%;
}
.submit-modal-overlay.active .submit-modal-content {
  transform: scale(1);
}
.submit-modal-content h3 {
  margin: 20px 0 10px;
  color: var(--text-dark);
  font-size: 1.4rem;
  font-weight: 700;
}
.submit-modal-content p {
  color: var(--text-muted);
  margin: 0;
  font-size: 1rem;
}
.spinner-large {
  width: 60px;
  height: 60px;
  border: 4px solid #f3f4f6;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}
.success-icon-large {
  font-size: 5rem;
  color: #10b981;
  margin: 0 auto;
}
@keyframes spin { 
  to { transform: rotate(360deg); } 
}
