/* ── Apply Modal Overlay ──────────────────── */
.apply-modal-backdrop {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(11, 30, 20, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px 16px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
.apply-modal-backdrop.open {
  opacity: 1; pointer-events: all;
}

.apply-modal {
  background: var(--beige-50, #faf7f2);
  border-radius: 20px;
  width: 100%; max-width: 1060px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 32px 80px rgba(0,0,0,0.28);
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  transform: translateY(24px) scale(0.98);
  transition: transform 0.35s cubic-bezier(0.34,1.3,0.64,1), opacity 0.3s ease;
  opacity: 0;
}
.apply-modal-backdrop.open .apply-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.apply-modal::-webkit-scrollbar { width: 6px; }
.apply-modal::-webkit-scrollbar-track { background: transparent; }
.apply-modal::-webkit-scrollbar-thumb { background: var(--beige-300, #d4c5ad); border-radius: 3px; }

/* Close button */
.apply-modal-close {
  position: sticky; top: 16px; float: right; margin: 16px 16px -16px auto;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--white, #fff); border: 1px solid var(--beige-200, #e8ddd0);
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--charcoal, #1a1a1a);
  z-index: 10; transition: background 0.2s, transform 0.2s;
  grid-column: 1 / -1;
  justify-self: end;
}
.apply-modal-close:hover { background: var(--beige-100, #f0e8da); transform: rotate(90deg); }

/* Left info panel */
.apply-modal-info {
  padding: 40px 36px 48px;
  border-right: 1px solid var(--beige-200, #e8ddd0);
  background: var(--beige-50, #faf7f2);
  border-radius: 20px 0 0 20px;
}

/* Right form panel */
.apply-modal-form {
  padding: 40px 40px 48px;
  background: var(--white, #fff);
  border-radius: 0 20px 20px 0;
}
.apply-modal-form h3 {
  font-size: 1.7rem; margin-bottom: 8px; color: var(--charcoal, #1a1a1a);
}
.apply-modal-form .apply-form-sub {
  font-size: 0.95rem; color: var(--grey, #6b7280); line-height: 1.7; margin-bottom: 28px;
}

/* ── Mobile: slide up from bottom, form only ── */
@media (max-width: 820px) {
  .apply-modal-backdrop {
    padding: 0;
    align-items: flex-end;
  }
  .apply-modal {
    grid-template-columns: 1fr;
    max-width: 100%;
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
    transform: translateY(60px);
  }
  .apply-modal-backdrop.open .apply-modal {
    transform: translateY(0) scale(1);
  }

  /* Hide info panel on mobile — form only */
  .apply-modal-info { display: none; }

  .apply-modal-form {
    border-radius: 20px 20px 0 0;
    padding: 24px 20px 32px;
  }
  .apply-modal-form h3 { font-size: 1.35rem; margin-bottom: 6px; }
  .apply-modal-form .apply-form-sub { font-size: 0.87rem; margin-bottom: 18px; }

  .apply-modal-close {
    top: 10px; margin: 10px 10px -10px auto;
    width: 32px; height: 32px;
  }

  .apply-modal-form .form-field { margin-bottom: 13px; }
  .apply-modal-form .form-field label { font-size: 10px; margin-bottom: 5px; }
  .apply-modal-form .form-field input,
  .apply-modal-form .form-field select,
  .apply-modal-form .form-field textarea {
    font-size: 14px; padding: 10px 12px;
  }
  .apply-modal-form .form-field textarea { min-height: 75px; }
  .apply-modal-form .cv-upload-zone { padding: 14px 12px; }
  .apply-modal-form .cv-upload-icon { font-size: 20px; margin-bottom: 3px; }
  .apply-modal-form .cv-upload-text { font-size: 12px; }
  .apply-modal-form .apply-form-note { font-size: 11px; margin-bottom: 14px; }
  .apply-modal-form .apply-submit-btn { font-size: 15px; padding: 13px 18px; }
}

@media (max-width: 480px) {
  .apply-modal { max-height: 95vh; border-radius: 16px 16px 0 0; }
  .apply-modal-form { padding: 20px 16px 28px; border-radius: 16px 16px 0 0; }
  .apply-modal-form h3 { font-size: 1.2rem; }
  .apply-modal-form .form-two-col { grid-template-columns: 1fr; gap: 0; }
}

body.modal-open { overflow: hidden; }
