/* ================================================================
   AI MBMS Jobline — Application Form Styles
   Colors: #056CF2, #0B0940, #F27405
   Fonts: DM Serif Text (titles), Work Sans (body)
================================================================ */

.jbp-appform-wrap {
  max-width: 820px;
  margin: 0 auto;
  font-family: 'Work Sans', sans-serif;
}

/* ── Success screen ── */
.jbp-appform-success {
  text-align: center;
  padding: 60px 40px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(11,9,64,.10);
}
.jbp-appform-success-icon {
  width: 72px; height: 72px; border-radius: 50%;
  background: #d1fae5; color: #065f46;
  font-size: 36px; line-height: 72px;
  margin: 0 auto 20px; text-align: center;
}
.jbp-appform-success h3 {
  font-family: 'DM Serif Text', serif;
  font-size: 28px; color: #0B0940; margin: 0 0 10px;
}
.jbp-appform-success p { font-size: 16px; color: #64748B; margin: 0; }

/* ================================================================
   SECTION CARD
================================================================ */
.jbp-appform-section {
  background: #fff;
  border: 1.5px solid #E2E8F0;
  border-radius: 14px;
  margin-bottom: 24px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}

/* ── Section header: navy bar with number + title side by side ── */
.jbp-appform-section-header {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 16px;
  padding: 22px 28px;
  background: #0B0940;
}
.jbp-appform-section-num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #056CF2;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  font-family: 'Work Sans', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 3px;
}
.jbp-appform-section-text {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.jbp-appform-section-title {
  font-family: 'DM Serif Text', serif !important;
  font-size: 20px !important;
  font-weight: 400 !important;
  color: #ffffff !important;
  margin: 0 !important;
  line-height: 1.2 !important;
}
.jbp-appform-section-desc {
  font-family: 'Work Sans', sans-serif;
  font-size: 14px;
  color: rgba(255,255,255,.80);
  margin: 0;
  line-height: 1.5;
}

/* ── Section body ── */
.jbp-appform-body {
  padding: 28px;
}

/* ================================================================
   GRID ROWS
================================================================ */
.jbp-appform-row {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}
.jbp-appform-col-2 { grid-template-columns: 1fr 1fr; }
.jbp-appform-col-3 { grid-template-columns: 1fr 1fr 1fr; }
.jbp-appform-row:last-child { margin-bottom: 0; }

/* ================================================================
   FORM FIELDS
================================================================ */
.jbp-appform-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.jbp-appform-field:last-child { margin-bottom: 0; }

.jbp-appform-field label {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  font-family: 'Work Sans', sans-serif;
}
.jbp-appform-field input,
.jbp-appform-field select,
.jbp-appform-field textarea {
  padding: 12px 14px;
  border: 1.5px solid #E2E8F0;
  border-radius: 8px;
  font-size: 15px;
  color: #020203;
  background: #fff;
  font-family: 'Work Sans', sans-serif;
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
  box-sizing: border-box;
}
.jbp-appform-field input:focus,
.jbp-appform-field select:focus,
.jbp-appform-field textarea:focus {
  outline: none;
  border-color: #056CF2;
  box-shadow: 0 0 0 3px rgba(5,108,242,.12);
}
.jbp-appform-field input::placeholder,
.jbp-appform-field textarea::placeholder { color: #94A3B8; }
.jbp-req { color: #ef4444; }

.jbp-field-hint {
  font-size: 12px;
  color: #94A3B8;
  font-family: 'Work Sans', sans-serif;
}
.jbp-field-error {
  font-size: 12px;
  color: #ef4444;
  font-family: 'Work Sans', sans-serif;
}
.jbp-field-invalid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239,68,68,.12) !important;
}

/* ================================================================
   INLINE RADIO FIELDS (label + options on same line)
================================================================ */
.jbp-appform-field-inline {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.jbp-appform-field-inline > label {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  font-family: 'Work Sans', sans-serif;
  white-space: nowrap;
  min-width: 260px;
  flex-shrink: 0;
  margin-bottom: 0;
}
.jbp-appform-field-inline .jbp-radio-group {
  margin-top: 0;
  flex: 1;
}

/* ================================================================
   RADIO BUTTONS — pill style
================================================================ */
.jbp-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.jbp-radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #334155;
  font-family: 'Work Sans', sans-serif;
  font-weight: 500;
  padding: 9px 18px;
  border: 1.5px solid #E2E8F0;
  border-radius: 999px;
  background: #fff;
  transition: border-color .2s, background .2s, color .2s;
  user-select: none;
  position: relative;
}
.jbp-radio-label:hover {
  border-color: #056CF2;
  background: #EFF6FF;
  color: #056CF2;
}
.jbp-radio-label input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.jbp-radio-custom {
  width: 16px;
  height: 16px;
  border: 2px solid #CBD5E1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color .15s, background .15s;
  background: #fff;
}
.jbp-radio-custom::after {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #056CF2;
  opacity: 0;
  transition: opacity .15s;
}
.jbp-radio-label input[type="radio"]:checked ~ .jbp-radio-custom {
  border-color: #056CF2;
}
.jbp-radio-label input[type="radio"]:checked ~ .jbp-radio-custom::after {
  opacity: 1;
}
.jbp-radio-label:has(input[type="radio"]:checked) {
  border-color: #056CF2;
  background: #EFF6FF;
  color: #056CF2;
  font-weight: 600;
}

/* ================================================================
   ENTRY BLOCKS (school / job)
================================================================ */
.jbp-entry-block {
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  margin-bottom: 16px;
  overflow: hidden;
}
.jbp-entry-block:last-child { margin-bottom: 0; }

.jbp-entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: #F1F5F9;
  border-bottom: 1.5px solid #E2E8F0;
}
.jbp-entry-label {
  font-size: 14px;
  font-weight: 700;
  color: #0B0940;
  font-family: 'Work Sans', sans-serif;
}
.jbp-remove-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  color: #ef4444;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  transition: background .15s;
  font-family: 'Work Sans', sans-serif;
}
.jbp-remove-btn:hover { background: #fee2e2; }

.jbp-entry-block .jbp-appform-row {
  padding: 18px 18px 0;
  margin-bottom: 0;
}
.jbp-entry-block .jbp-appform-row:last-of-type {
  padding-bottom: 18px;
}

/* ── Summary of responsibilities textarea ── */
.jbp-entry-summary {
  padding: 0 18px 18px;
}
.jbp-entry-summary label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  font-family: 'Work Sans', sans-serif;
  margin-bottom: 6px;
}
.jbp-entry-summary textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #E2E8F0;
  border-radius: 8px;
  font-size: 15px;
  font-family: 'Work Sans', sans-serif;
  color: #020203;
  background: #fff;
  resize: vertical;
  box-sizing: border-box;
  transition: border-color .2s, box-shadow .2s;
}
.jbp-entry-summary textarea:focus {
  outline: none;
  border-color: #056CF2;
  box-shadow: 0 0 0 3px rgba(5,108,242,.12);
}
.jbp-entry-summary textarea::placeholder { color: #94A3B8; }

/* ================================================================
   ADD BUTTON
================================================================ */
.jbp-appform-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 10px 20px;
  background: #EFF6FF;
  color: #056CF2;
  border: 1.5px dashed #056CF2;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Work Sans', sans-serif;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.jbp-appform-add-btn:hover { background: #056CF2; color: #fff; }
.jbp-add-icon {
  width: 22px; height: 22px; border-radius: 50%;
  background: #056CF2; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px; line-height: 1;
  transition: background .2s, color .2s;
}
.jbp-appform-add-btn:hover .jbp-add-icon { background: #fff; color: #056CF2; }

/* ================================================================
   RESUME UPLOAD
================================================================ */
.jbp-resume-upload-box {
  border: 2px dashed #CBD5E1;
  border-radius: 12px;
  background: #F8FAFC;
  transition: border-color .2s, background .2s;
  cursor: pointer;
  overflow: hidden;
}
.jbp-resume-upload-box:hover,
.jbp-resume-upload-box.jbp-drag-over {
  border-color: #056CF2;
  background: #EFF6FF;
}
.jbp-resume-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  gap: 10px;
}
.jbp-resume-icon { opacity: .85; }
.jbp-resume-text {
  font-size: 15px;
  color: #475569;
  margin: 0;
  font-family: 'Work Sans', sans-serif;
}
.jbp-resume-browse {
  color: #056CF2;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}
.jbp-resume-hint {
  font-size: 12px;
  color: #94A3B8;
  margin: 0;
  font-family: 'Work Sans', sans-serif;
}
.jbp-resume-selected {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: #EFF6FF;
}
.jbp-resume-filename {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: #0B0940;
  font-family: 'Work Sans', sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.jbp-resume-remove {
  background: none; border: none; cursor: pointer;
  color: #94A3B8; font-size: 22px; line-height: 1;
  padding: 0 4px; transition: color .15s;
}
.jbp-resume-remove:hover { color: #ef4444; }

/* ================================================================
   SIGNATURE
================================================================ */
.jbp-signature-input {
  font-style: italic !important;
  font-size: 18px !important;
  border-bottom: 2px solid #0B0940 !important;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  border-radius: 0 !important;
  padding-left: 0 !important;
  background: transparent !important;
}
.jbp-signature-input:focus {
  box-shadow: none !important;
  border-bottom-color: #056CF2 !important;
}

/* ================================================================
   LEGAL TEXT
================================================================ */
.jbp-appform-legal {
  font-size: 13px;
  color: #64748B;
  line-height: 1.7;
  background: #F8FAFC;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 20px;
  border-left: 3px solid #056CF2;
}

/* ================================================================
   SUBMIT AREA
================================================================ */
.jbp-appform-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Work Sans', sans-serif;
}
.jbp-appform-submit-wrap {
  text-align: center;
  padding-top: 12px;
}
.jbp-appform-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 48px;
  background: #056CF2;
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  font-family: 'Work Sans', sans-serif;
  cursor: pointer;
  transition: background .2s, transform .1s;
  min-width: 220px;
}
.jbp-appform-submit:hover { background: #1A64E9; }
.jbp-appform-submit:active { transform: scale(.97); }
.jbp-appform-submit:disabled { opacity: .7; cursor: not-allowed; }
.jbp-submit-note {
  font-size: 13px;
  color: #94A3B8;
  margin: 14px 0 0;
  font-family: 'Work Sans', sans-serif;
}

/* ================================================================
   RESPONSIVE
================================================================ */
@media (max-width: 640px) {
  .jbp-appform-col-2,
  .jbp-appform-col-3 { grid-template-columns: 1fr; }
  .jbp-appform-section-header { padding: 16px 20px; }
  .jbp-appform-body { padding: 20px; }
  .jbp-appform-field-inline { flex-direction: column; align-items: flex-start; }
  .jbp-appform-field-inline > label { min-width: unset; }
}
