/* Surrogate Application Custom Styling */
.app-page-wrapper {
  padding: 3rem 0 5rem;
  background-color: var(--color-warm-bg);
  min-height: calc(100vh - 80px);
}

.app-header-box {
  margin-bottom: 2.5rem;
}

.app-main-title {
  font-family: var(--font-heading);
  font-size: 3.2rem;
  color: var(--color-text-dark);
  line-height: 1.1;
}

.app-sub-title {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  margin-top: 0.4rem;
}

/* Stepper Bar */
.stepper-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 650px;
  margin: 2rem auto 0;
}

.step-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  z-index: 2;
}

.step-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-white);
  border: 2px solid var(--color-border-subtle);
  color: var(--color-text-muted);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.step-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.step-indicator.active .step-circle {
  background: var(--color-terracotta);
  color: var(--color-white);
  border-color: var(--color-terracotta);
  box-shadow: 0 4px 12px rgba(216, 125, 86, 0.3);
}

.step-indicator.active .step-label {
  color: var(--color-terracotta);
}

.step-indicator.completed .step-circle {
  background: var(--color-sage);
  color: var(--color-white);
  border-color: var(--color-sage);
}

.step-line {
  flex: 1;
  height: 2px;
  background: var(--color-border-subtle);
  margin: 0 1rem -1.2rem;
  transition: all 0.3s ease;
}

.step-line.active {
  background: var(--color-terracotta);
}

/* Form Panel Card */
.form-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 3rem;
  border: 1px solid var(--color-border-subtle);
  box-shadow: var(--shadow-md);
  max-width: 1040px;
  margin: 0 auto;
}

.form-step-panel {
  display: none;
}

.form-step-panel.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Pre-qualification Box */
.qualification-box {
  background: #FFFBF6;
  border: 1.5px solid #F3DFC9;
  border-radius: var(--radius-sm);
  padding: 1.75rem;
  margin-bottom: 2rem;
}

.qual-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: #8C4724;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.qual-intro {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.qual-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.qual-list li {
  position: relative;
  padding-left: 1.6rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--color-text-dark);
}

.qual-list li::before {
  content: '•';
  position: absolute;
  left: 0.5rem;
  top: 0;
  color: var(--color-terracotta);
  font-size: 1.4rem;
  line-height: 1;
}

/* Form Fields & Grid */
.form-section-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: var(--color-text-dark);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border-subtle);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.mt-8 { margin-top: 2rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }

.form-grid {
  display: grid;
  gap: 1.25rem 1.5rem;
}

.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.full-width { grid-column: 1 / -1; }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text-dark);
}

.req { color: #D87D56; }

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.92rem;
  background: var(--color-warm-bg);
  color: var(--color-text-dark);
  transition: all 0.25s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-terracotta);
  background: var(--color-white);
  box-shadow: 0 0 0 3px rgba(216, 125, 86, 0.15);
}

.readonly-input {
  background: #EFE8E1 !important;
  font-weight: 700;
  color: var(--color-terracotta) !important;
}

.dual-input {
  display: flex;
  gap: 0.5rem;
}

/* Pregnancy Card Item */
.pregnancy-card-box {
  background: var(--color-warm-bg);
  border: 1px dashed var(--color-border-subtle);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.preg-header {
  font-weight: 700;
  color: var(--color-terracotta);
  margin-bottom: 0.75rem;
  font-size: 1.05rem;
}

/* Step Actions */
.step-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border-subtle);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--color-border-subtle);
  color: var(--color-text-dark);
}

.btn-outline:hover {
  background: var(--color-warm-bg);
  border-color: var(--color-text-muted);
}

.btn-submit {
  background: #2E7D32;
  color: var(--color-white);
}

.btn-submit:hover {
  background: #1B5E20;
  box-shadow: 0 4px 14px rgba(46, 125, 50, 0.3);
}

/* Photo Dropzone */
.photo-instructions {
  text-align: center;
  margin-bottom: 1.5rem;
}

.photo-instructions h4 {
  font-size: 1.2rem;
  color: var(--color-text-dark);
}

.photo-instructions p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.upload-dropzone {
  border: 2px dashed var(--color-terracotta);
  border-radius: var(--radius-md);
  padding: 3rem 2rem;
  text-align: center;
  background: #FFFBF8;
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
}

.upload-dropzone:hover {
  background: var(--color-terracotta-light);
}

.upload-dropzone input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.dropzone-content i {
  color: var(--color-terracotta);
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.dropzone-content span {
  color: var(--color-terracotta);
  font-weight: 700;
  text-decoration: underline;
}

.photo-counter-text {
  text-align: center;
  font-weight: 700;
  color: var(--color-terracotta);
  margin: 1rem 0;
}

.photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.preview-item {
  position: relative;
  height: 140px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.remove-photo-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
}

/* PDF STYLING MATCHING REFERENCE PDF SAMPLE EXACTLY */
.pdf-document {
  width: 790px;
  padding: 20px 30px;
  margin: 0;
  background: white;
  font-family: 'Times New Roman', Georgia, serif;
  color: #111;
  font-size: 13.5px;
  line-height: 1.35;
  position: relative;
  overflow: hidden;
}

.pdf-document::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 550px;
  height: 550px;
  background: url('logo.png') no-repeat center center;
  background-size: contain;
  opacity: 0.06;
  pointer-events: none;
  z-index: 0;
}

.pdf-header,
.pdf-two-column-layout,
.pdf-section-title,
.pdf-photos-grid {
  position: relative;
  z-index: 1;
}

.pdf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid #333;
  padding-bottom: 8px;
  margin-bottom: 15px;
}

.pdf-logo {
  height: 95px !important;
  max-height: 95px !important;
  width: auto !important;
  max-width: 340px !important;
  object-fit: contain !important;
  display: block !important;
}

.pdf-header h2 {
  font-size: 21px;
  font-weight: bold;
  margin: 0;
  text-align: right;
}

.pdf-two-column-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.pdf-col p {
  margin-bottom: 7px;
}

.pdf-col strong {
  font-weight: bold;
  font-family: Arial, sans-serif;
}

.italic-val {
  font-style: italic;
}

.pdf-section-title {
  font-weight: bold;
  font-size: 15px;
  border-bottom: 1px solid #666;
  padding-bottom: 3px;
  margin-top: 15px;
  margin-bottom: 10px;
  font-family: Arial, sans-serif;
}

/* APPLICANT PHOTOS CONTAINER & PROPORTIONAL CARDS */
.pdf-photos-grid {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 20px !important;
  justify-content: flex-start !important;
  align-items: flex-start !important;
  margin-top: 10px !important;
}

.pdf-photo-item {
  flex: 0 0 calc(50% - 10px) !important;
  max-width: calc(50% - 10px) !important;
  background: #fafafa !important;
  border: 1px solid #ddd !important;
  border-radius: 6px !important;
  padding: 8px !important;
  box-sizing: border-box !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
}

.pdf-photo-item img {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 380px !important;
  object-fit: contain !important;
  border-radius: 4px !important;
  display: block !important;
  margin: 0 auto !important;
}

/* Modal Overlay */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: white;
  padding: 3rem;
  border-radius: var(--radius-md);
  max-width: 540px;
  width: 90%;
  box-shadow: var(--shadow-lg);
}

.modal-icon {
  font-size: 3.5rem;
  color: #2E7D32;
  margin-bottom: 1rem;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .form-card { padding: 1.5rem; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .photo-preview-grid { grid-template-columns: repeat(2, 1fr); }
  .pdf-two-column-layout { grid-template-columns: 1fr; }
}
