/* Authorized Person interest form */
.ap-card-cta{
  position:relative;
  display:inline-flex;
  align-items:center;
  gap:6px;
  margin-top:14px;
  font-size:0.85rem;
  font-weight:600;
  color:#f70e88;
}
.ap-card-cta i{transition:transform 0.3s ease}
.ap-card:hover .ap-card-cta i{transform:translateX(4px)}
button.ap-card{width:100%;display:block;border:1px solid #eef1f4;cursor:pointer;font:inherit}

#apInterestModal .modal-content{border:none;border-radius:18px;overflow:hidden}
#apInterestModal .modal-header{
  background:linear-gradient(135deg,#f70e88 0%,#ff5fae 100%);
  border-bottom:none;
  padding:22px 26px;
}
#apInterestModal .modal-header .modal-title{color:#fff;font-weight:700}
#apInterestModal .modal-header .ap-modal-sub{color:rgba(255,255,255,0.85);font-size:0.85rem;margin:4px 0 0}
#apInterestModal .modal-header .btn-close{filter:invert(1) grayscale(100%) brightness(200%);opacity:0.9}
#apInterestModal .modal-body{padding:26px}

.ap-form label.form-label{font-size:0.85rem;font-weight:600;color:#2d343e;margin-bottom:5px}
.ap-form .form-control,
.ap-form .form-select{
  border:1px solid #e3e8ee;
  border-radius:10px;
  padding:10px 14px;
  font-size:0.92rem;
  transition:border-color 0.2s ease,box-shadow 0.2s ease;
}
.ap-form .form-control:focus,
.ap-form .form-select:focus{
  border-color:#f70e88;
  box-shadow:0 0 0 3px rgba(247,14,136,0.12);
}
.ap-form .form-check-input:checked{background-color:#f70e88;border-color:#f70e88}
.ap-form .form-check-input:focus{box-shadow:0 0 0 3px rgba(247,14,136,0.12);border-color:#f70e88}
.ap-form .form-check-label{font-size:0.86rem;color:#6a747b}
.ap-form .ap-required{color:#f70e88}

.ap-segments{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.ap-segments .form-check{
  margin:0;
  padding:0;
}
.ap-segments .form-check-input{position:absolute;opacity:0;pointer-events:none}
.ap-segments .form-check-label{
  display:inline-block;
  border:1px solid #e3e8ee;
  border-radius:999px;
  padding:7px 16px;
  font-size:0.85rem;
  color:#6a747b;
  cursor:pointer;
  transition:all 0.2s ease;
}
.ap-segments .form-check-input:checked + .form-check-label{
  background:rgba(247,14,136,0.08);
  border-color:#f70e88;
  color:#f70e88;
  font-weight:600;
}
.ap-segments .form-check-input:focus-visible + .form-check-label{box-shadow:0 0 0 3px rgba(247,14,136,0.12)}

/* Only flag problems: Bootstrap's green "valid" ticks add noise and the
   checkmark collides with the textarea placeholder. */
.ap-form.was-validated .form-control:valid,
.ap-form.was-validated .form-control:valid:focus{
  border-color:#e3e8ee;
  background-image:none;
}
.ap-form.was-validated .form-select:valid,
.ap-form.was-validated .form-select:valid:focus{
  border-color:#e3e8ee;
  background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-position:right 0.75rem center;
  background-size:16px 12px;
}
.ap-form.was-validated .form-control:valid:focus,
.ap-form.was-validated .form-select:valid:focus{
  border-color:#f70e88;
  box-shadow:0 0 0 3px rgba(247,14,136,0.12);
}
.ap-form.was-validated .form-check-input:valid{border-color:#dee2e6}
.ap-form.was-validated .form-check-input:valid:checked{background-color:#f70e88;border-color:#f70e88}
.ap-form.was-validated .form-check-input:valid ~ .form-check-label{color:#6a747b}
.ap-form.was-validated .ap-segments .form-check-input:valid:checked + .form-check-label{
  border-color:#f70e88;
  color:#f70e88;
}

.ap-form-note{
  background:#f8fafc;
  border-left:3px solid #f70e88;
  border-radius:6px;
  padding:10px 14px;
  font-size:0.8rem;
  color:#6a747b;
  margin-bottom:20px;
}
.ap-form-status{font-size:0.88rem;margin-top:14px}
.ap-form-status.is-error{color:#dc3545}
.ap-form-status.is-success{color:#198754}

.ap-form-done{text-align:center;padding:26px 10px}
.ap-form-done i{font-size:3rem;color:#198754;margin-bottom:14px}
.ap-form-done h3{font-size:1.15rem;font-weight:700;color:#2d343e;margin-bottom:8px}
.ap-form-done p{color:#6a747b;font-size:0.9rem;margin-bottom:0}

.ap-form-reference{
  margin-top:20px;
  padding:16px;
  border-radius:12px;
  background:linear-gradient(135deg,#fff5fa 0%,#ffffff 100%);
  border:1px dashed #ffb3d8;
}
.ap-form-reference span{display:block;font-size:0.78rem;color:#6a747b;margin-bottom:4px}
.ap-form-reference strong{display:block;font-size:1.15rem;font-weight:700;color:#f70e88;letter-spacing:0.04em}
.ap-form-reference small{display:block;font-size:0.76rem;color:#6a747b;margin-top:6px}

/* Eligibility */
#apEligibilityModal .modal-content{border:none;border-radius:18px;overflow:hidden}
#apEligibilityModal .modal-header{
  background:linear-gradient(135deg,#f70e88 0%,#ff5fae 100%);
  border-bottom:none;
  padding:22px 26px;
}
#apEligibilityModal .modal-header .modal-title{color:#fff;font-weight:700}
#apEligibilityModal .modal-header .ap-modal-sub{color:rgba(255,255,255,0.85);font-size:0.85rem;margin:4px 0 0}
#apEligibilityModal .modal-header .btn-close{filter:invert(1) grayscale(100%) brightness(200%);opacity:0.9}
#apEligibilityModal .modal-body{padding:26px}

.ap-section-title{
  font-size:0.78rem;
  font-weight:700;
  letter-spacing:0.1em;
  text-transform:uppercase;
  color:#f70e88;
  margin:0 0 14px;
}
.ap-section + .ap-section{margin-top:28px}

.ap-type-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}
.ap-type{
  display:flex;
  align-items:center;
  gap:12px;
  padding:14px 16px;
  border:1px solid #eef1f4;
  border-radius:12px;
  background:#fff;
  transition:border-color 0.2s ease,box-shadow 0.2s ease;
}
.ap-type:hover{border-color:#ffb3d8;box-shadow:0 6px 14px rgba(247,14,136,0.10)}
.ap-type i{
  width:38px;
  height:38px;
  flex:0 0 38px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(247,14,136,0.10);
  color:#f70e88;
  font-size:0.95rem;
}
.ap-type span{font-size:0.9rem;font-weight:600;color:#2d343e}

.ap-check-list{list-style:none;margin:0;padding:0}
.ap-check-list li{
  position:relative;
  padding-left:30px;
  margin-bottom:11px;
  font-size:0.9rem;
  color:#6a747b;
}
.ap-check-list li:last-child{margin-bottom:0}
.ap-check-list li::before{
  content:'\f00c';
  font-family:'Font Awesome 6 Free';
  font-weight:900;
  position:absolute;
  left:0;
  top:1px;
  font-size:0.72rem;
  width:19px;
  height:19px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(247,14,136,0.10);
  color:#f70e88;
}

/* Application status timeline */
#apStatusModal .modal-content{border:none;border-radius:18px;overflow:hidden}
#apStatusModal .modal-header{
  background:linear-gradient(135deg,#f70e88 0%,#ff5fae 100%);
  border-bottom:none;
  padding:22px 26px;
}
#apStatusModal .modal-header .modal-title{color:#fff;font-weight:700}
#apStatusModal .modal-header .ap-modal-sub{color:rgba(255,255,255,0.85);font-size:0.85rem;margin:4px 0 0}
#apStatusModal .modal-header .btn-close{filter:invert(1) grayscale(100%) brightness(200%);opacity:0.9}
#apStatusModal .modal-body{padding:26px}

.ap-timeline{list-style:none;margin:0;padding:0;position:relative}
.ap-timeline li{position:relative;padding-left:58px;padding-bottom:28px}
.ap-timeline li:last-child{padding-bottom:0}
.ap-timeline li::before{
  content:'';
  position:absolute;
  left:19px;
  top:40px;
  bottom:0;
  width:2px;
  background:linear-gradient(180deg,rgba(247,14,136,0.28) 0%,rgba(247,14,136,0.08) 100%);
}
.ap-timeline li:last-child::before{display:none}
.ap-timeline-step{
  position:absolute;
  left:0;
  top:0;
  width:40px;
  height:40px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:0.85rem;
  font-weight:700;
  color:#f70e88;
  background:rgba(247,14,136,0.10);
  border:2px solid rgba(247,14,136,0.20);
}
.ap-timeline li:last-child .ap-timeline-step{
  background:linear-gradient(135deg,#f70e88 0%,#ff5fae 100%);
  border-color:transparent;
  color:#fff;
}
.ap-timeline-title{font-size:0.98rem;font-weight:700;color:#2d343e;margin:8px 0 4px}
.ap-timeline-text{font-size:0.88rem;color:#6a747b;margin:0}

.ap-status-cta{
  margin-top:26px;
  padding:22px;
  border-radius:14px;
  text-align:center;
  background:linear-gradient(135deg,#fff5fa 0%,#ffffff 100%);
  border:1px solid #ffdaee;
}
.ap-status-cta h3{font-size:1rem;font-weight:700;color:#2d343e;margin-bottom:6px}
.ap-status-cta p{font-size:0.88rem;color:#6a747b;margin-bottom:16px}
.ap-status-actions{display:flex;flex-wrap:wrap;gap:10px;justify-content:center}
.ap-status-actions .btn{min-width:190px}

@media (max-width:575.98px){
  #apInterestModal .modal-body,
  #apStatusModal .modal-body,
  #apEligibilityModal .modal-body{padding:20px 18px}
  #apInterestModal .modal-header,
  #apStatusModal .modal-header,
  #apEligibilityModal .modal-header{padding:18px 20px}
  .ap-type-grid{grid-template-columns:1fr}
  .ap-timeline li{padding-left:50px;padding-bottom:24px}
  .ap-timeline-step{width:36px;height:36px;font-size:0.8rem}
  .ap-timeline li::before{left:17px;top:36px}
  .ap-status-actions .btn{min-width:100%}
}
