/* ==========================================================================
   Internal Scholarship Application Modal Styles
   ========================================================================== */

.ak-app-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 25, 40, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.ak-app-overlay.is-open {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  z-index: 999999 !important;
}

.ak-app-dialog {
  background: #ffffff;
  border-radius: 24px;
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 60px -15px rgba(6, 70, 118, 0.35), 0 0 0 1px rgba(6, 70, 118, 0.08);
  transform: translateY(24px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 2.2rem 2.4rem;
  box-sizing: border-box;
}

.ak-app-overlay.is-open .ak-app-dialog {
  transform: translateY(0) scale(1);
}

.ak-app-close {
  position: absolute;
  top: 1.2rem;
  right: 1.4rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: #f1f5f9;
  color: #475467;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s, transform 0.2s;
  z-index: 10;
}

.ak-app-close:hover {
  background: #fee2e2;
  color: #b42318;
  transform: rotate(90deg);
}

/* Header */
.ak-app-header {
  margin-bottom: 1.6rem;
}

.ak-app-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}

.ak-app-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: rgba(6, 70, 118, 0.08);
  color: #064676;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 20px;
}

.ak-app-target-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: rgba(220, 168, 28, 0.15);
  color: #925a07;
  font-size: 0.72rem;
  font-weight: 750;
  border-radius: 20px;
}

.ak-app-title {
  font-size: clamp(1.4rem, 2.2vw, 1.85rem);
  font-weight: 800;
  color: #043254;
  margin: 0 0 0.35rem;
  font-family: 'Sora', sans-serif;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.ak-app-desc {
  font-size: 0.92rem;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

/* Sections */
.ak-app-section {
  background: #fafbfc;
  border: 1px solid #eef2f6;
  border-radius: 16px;
  padding: 1.2rem;
  margin-bottom: 1.2rem;
}

.ak-app-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.ak-app-section-title {
  font-size: 0.88rem;
  font-weight: 750;
  color: #064676;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.8rem;
}

.ak-app-section-head .ak-app-section-title {
  margin-bottom: 0;
}

.ak-app-count-pill {
  font-size: 0.72rem;
  background: #064676;
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 700;
}

.ak-app-toggle-all {
  background: none;
  border: none;
  color: #064676;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  padding: 2px 4px;
}

.ak-app-toggle-all:hover {
  color: #DCA81C;
}

/* Scholarship Checklist */
.ak-app-sch-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
}

.ak-app-sch-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.ak-app-sch-item:hover {
  border-color: #70a9d0;
  background: #f8fafc;
}

.ak-app-sch-item.selected {
  border-color: #064676;
  background: #f0f7ff;
}

.ak-app-sch-checkbox {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: #064676;
  cursor: pointer;
  flex-shrink: 0;
}

.ak-app-sch-info {
  flex: 1;
  min-width: 0;
}

.ak-app-sch-name {
  font-weight: 750;
  font-size: 0.92rem;
  color: #1e293b;
  line-height: 1.3;
}

.ak-app-sch-sub {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 3px;
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.ak-app-sch-tag {
  background: rgba(220, 168, 28, 0.16);
  color: #8c5305;
  font-weight: 700;
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: 4px;
}

.ak-app-sch-loading {
  padding: 1.5rem;
  text-align: center;
  color: #64748b;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.ak-app-spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(6, 70, 118, 0.2);
  border-top-color: #064676;
  border-radius: 50%;
  animation: akAppSpin 0.7s linear infinite;
}

@keyframes akAppSpin {
  to { transform: rotate(360deg); }
}

/* Grids & Inputs */
.ak-app-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.ak-app-grid2:last-child {
  margin-bottom: 0;
}

.ak-app-group {
  display: flex;
  flex-direction: column;
}

.ak-app-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 5px;
}

.ak-app-label .req {
  color: #dc2626;
  font-weight: 700;
}

.ak-app-input,
.ak-app-select,
.ak-app-textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid #d0d5dd;
  border-radius: 10px;
  font-size: 0.9rem;
  color: #1e293b;
  background: #ffffff;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ak-app-input:focus,
.ak-app-select:focus,
.ak-app-textarea:focus {
  border-color: #064676;
  outline: none;
  box-shadow: 0 0 0 3.5px rgba(6, 70, 118, 0.1);
}

.ak-app-field-hint {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 6px;
}

/* Alert */
.ak-app-alert {
  padding: 10px 14px;
  border-radius: 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.2rem;
}

/* Actions */
.ak-app-actions {
  margin-top: 1.4rem;
  text-align: center;
}

.ak-app-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 1rem 1.8rem;
  background: linear-gradient(135deg, #064676 0%, #032b49 100%);
  color: #ffffff;
  border: none;
  border-radius: 14px;
  font-size: 1.02rem;
  font-weight: 800;
  font-family: 'Sora', sans-serif;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(6, 70, 118, 0.28);
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.ak-app-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(6, 70, 118, 0.36);
}

.ak-app-submit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.ak-app-secure-note {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* Success View */
.ak-app-success {
  padding: 2.5rem 1rem;
  text-align: center;
}

.ak-app-success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #ecfdf3;
  color: #067647;
  font-size: 2.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
}

.ak-app-success-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #064676;
  margin: 0 0 0.5rem;
  font-family: 'Sora', sans-serif;
}

.ak-app-success-ref {
  display: none !important;
}

.ak-app-success-text {
  font-size: 0.94rem;
  color: #475467;
  line-height: 1.6;
  max-width: 520px;
  margin: 0 auto 1.8rem;
}

.ak-app-done-btn {
  background: #064676;
  color: #ffffff;
  padding: 0.8rem 2rem;
  border-radius: 12px;
  border: none;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.92rem;
  transition: background 0.2s;
}

.ak-app-done-btn:hover {
  background: #043254;
}

@media (max-width: 640px) {
  .ak-app-dialog {
    padding: 1.5rem 1.2rem;
  }
  .ak-app-grid2 {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}
