/* Scholarship form styles — based on events CPR form but scoped for scholarship page */

.scholarship-page {
  --sch-border: rgba(3, 22, 51, 0.14);
  --sch-panel-shadow: 0 6px 24px rgba(0,0,0,0.08);
}

.section-scholarship .panel {
  margin-top: 1rem;
  padding: 1.75rem 1.75rem 2rem;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--sch-border);
  box-shadow: var(--sch-panel-shadow);
}

.section-scholarship .page-intro {
  margin-bottom: 1rem;
  color: #222;
}

/* Wider header/process wrapper (outside the form panel) */
.section-scholarship .scholarship-wide {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 22px;
}

.scholarship-application .section-scholarship .scholarship-wide {
  max-width: 1250px;
}

.app-id-banner {
  border: 1px solid var(--sch-border);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  margin: 0 0 1rem;
  background: #fff;
  color: #031633;
}

.app-id-sub {
  color: #333;
  font-weight: 400;
}

/* Application process instructions */
.process-box {
  border: 1px solid var(--sch-border);
  border-radius: 12px;
  padding: 1rem;
  margin: 0 0 1.25rem;
  background: #fff;
}

.process-title {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: #031633;
}

.process-steps {
  margin: 0 0 0.75rem 1.25rem;
  color: #222;
}

.process-steps li {
  margin: 0.35rem 0;
}

.process-image {
  display: block;
  width: 100%;
  max-width: 1200px;
  height: auto;
  border-radius: 12px;
  border: 0;
  margin: 0.5rem auto 0;
}

.change-request-box {
  border: 1px solid var(--sch-border);
  border-radius: 12px;
  padding: 1rem;
  margin: 0 0 1rem;
  background: #fff;
}

.change-request-title {
  font-weight: 800;
  color: #031633;
  margin: 0 0 0.35rem;
}

.change-request-body {
  color: #222;
}

.scholarship-form fieldset {
  border: 1px solid #a9c4f6;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  background: #dbe9ff;
}

.scholarship-form legend {
  display: inline-flex;
  align-items: center;
  font-weight: 800;
  font-size: 1.05rem;
  color: #031633;
  line-height: 1.1;
  padding: 0.2rem 0.7rem;
  margin-left: 0.5rem;
  background: #dbe9ff;
  border: 1px solid #a9c4f6;
  border-bottom: 0;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.scholarship-form label {
  display: block;
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
  color: #222;
}

.scholarship-form label.has-error {
  margin-bottom: 0.15rem;
}

.scholarship-form .help-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 0.1rem;
  border-radius: 999px;
  border: 1px solid rgba(3, 22, 51, 0.35);
  color: rgba(3, 22, 51, 0.8);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  cursor: help;
  user-select: none;
  position: relative;
  vertical-align: middle;
  background: rgba(255, 255, 255, 0.9);
}

.scholarship-form .help-tip::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  width: min(340px, 80vw);
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: #031633;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
  box-shadow: 0 10px 30px rgba(0,0,0,0.22);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 140ms ease, visibility 140ms ease, transform 140ms ease;
  z-index: 50;
}

.scholarship-form .help-tip:hover::after,
.scholarship-form .help-tip:focus::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-2px);
}

.scholarship-form .help-tip:focus {
  outline: 2px solid rgba(255, 193, 7, 0.85);
  outline-offset: 2px;
}

.scholarship-form .req {
  color: #b00020;
  font-weight: 700;
  margin-left: 0.25rem;
  margin-right: 0.25rem;
}

.scholarship-form input,
.scholarship-form select,
.scholarship-form textarea {
  width: 100%;
  padding: 10px;
  height: 42px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 1rem;
  color: #000;
  background: #fff;
  box-sizing: border-box;
}

.scholarship-form input.field-invalid,
.scholarship-form select.field-invalid,
.scholarship-form textarea.field-invalid {
  background: #f8d7da;
  border-color: #b00020;
}

.scholarship-form input.field-invalid:focus,
.scholarship-form select.field-invalid:focus,
.scholarship-form textarea.field-invalid:focus {
  outline: 2px solid rgba(176, 0, 32, 0.35);
  outline-offset: 2px;
}

.scholarship-form input[type="checkbox"].field-invalid,
.scholarship-form input[type="radio"].field-invalid {
  outline: 2px solid rgba(176, 0, 32, 0.35);
  outline-offset: 2px;
}

.scholarship-form .field-error {
  color: #b00020;
  font-size: 0.85rem;
  line-height: 1.2;
  margin: 0.15rem 0 0.5rem;
}

.scholarship-form textarea { min-height: 120px; height: auto; }

.scholarship-form button[type="submit"],
.scholarship-form .admin-btn {
  width: auto;
  margin-top: 1rem;
  padding: 12px;
  background: #ffc107;
  color: #031633;
  border: none;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
}

/* Don't apply full-width/height input styling to checkboxes/radios */
.scholarship-form input[type="checkbox"],
.scholarship-form input[type="radio"] {
  width: auto;
  height: auto;
  padding: 0;
}

/* Attestation checkbox (muted red background) */
.scholarship-form .attestation-box {
  background: #f8d7da;
  border: 1px solid #f5c2c7;
  border-radius: 10px;
  padding: 0.9rem 1rem;
  margin: 0.75rem 0 1rem;
}

.scholarship-form .attestation-box.field-invalid {
  border-color: #b00020;
}

.scholarship-form .checkbox-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin: 0;
}

.scholarship-form .checkbox-row input[type="checkbox"] {
  margin-top: 0.2rem;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.scholarship-form .checkbox-row span {
  flex: 1 1 auto;
  line-height: 1.45;
}

/* Bottom action buttons: normal size, inline */
.scholarship-form .form-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-top: 0.75rem;
}

.scholarship-form .form-actions .admin-btn,
.scholarship-form .form-actions button[type="submit"] {
  margin-top: 0;
  min-width: 180px;
}

@media (max-width: 650px) {
  .scholarship-form .form-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .scholarship-form .form-actions .admin-btn,
  .scholarship-form .form-actions button[type="submit"] {
    width: 100%;
    min-width: 0;
  }
}

/* Discard button: blue with white text */
.scholarship-form .admin-btn-secondary,
.scholarship-form .admin-btn.admin-btn-secondary {
  background: #031633;
  color: #ffffff;
  border: 1px solid #031633;
}

.scholarship-form .admin-btn-secondary:hover,
.scholarship-form .admin-btn.admin-btn-secondary:hover {
  background: #021227;
  border-color: #021227;
}

/* helper layout classes similar to events.css */
.form-row { display:flex; gap:1rem; flex-wrap:wrap; }
.form-row .form-group { flex:1; min-width:180px; }

.small-input { max-width:220px; }
.repeatable-input-row { display:flex; gap:0.5rem; align-items:center; flex-wrap:wrap; }
.repeatable-items { margin-top: 0.5rem; display:flex; flex-direction:column; gap:0.5rem; }
.repeatable-row { display:flex; gap:0.5rem; align-items:center; flex-wrap:wrap; }
.repeatable-row .form-group { flex:2; }
.repeatable-row .form-group.small { flex:1; }
.repeatable-actions { margin-top:0.5rem; }

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(3, 22, 51, 0.18);
  background: #ffc107;
  color: #031633;
  font-weight: 900;
  font-size: 1.2rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 0 0 42px;
}

.icon-btn:hover {
  background: #ffcd39;
}

.icon-btn.icon-btn-secondary {
  background: #fff;
  border-color: rgba(3, 22, 51, 0.22);
}

.icon-btn.icon-btn-secondary:hover {
  background: #f3f4f6;
}

/* Landing page two-column layout */
.scholarship-landing .landing-content { max-width:1100px; margin:0 auto; }
.scholarship-landing .boxes { display:flex; gap:2.25rem; align-items:stretch; }
.scholarship-landing .boxes .box { 
  flex:1; 
  border: 1px solid #e6e6e6;
  border-radius: 10px;
}
.scholarship-landing .note { color:#555; font-size:0.95rem; }

/* narrow panels and vertical separator */
.scholarship-landing .panel { padding:1rem; }
.scholarship-landing .panel .panel-title { margin-bottom:0.75rem; }
/* right column separator removed; separator will be centered between boxes */

/* ensure content never touches screen edge */
.scholarship-main .container { max-width:1100px; margin:0 auto; padding:0 22px; }

/* Scholarship landing page: add breathing room before footer */
.scholarship-page .scholarship-main { margin-top: -0.75rem; margin-bottom: 2rem; }

/* Scholarship landing page: align top spacing with other pages */
.scholarship-page .page-header { margin-top: 0; }

/* boxes side-by-side inside left column */
.scholarship-landing .boxes { display:flex; gap:1.5rem; }
.scholarship-landing .boxes .box { flex:1; }
.scholarship-landing .boxes { position:relative; }
.scholarship-landing .boxes::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  background: #ffc107;
  /* nudge the separator up further */
  top: 38px;
  bottom: 40px;
  border-radius: 2px;
}

.landing-instructions { margin-bottom:1rem; font-size:1rem; color:#333; }

.important-date {
  font-weight: 800;
  color: #b00020;
}

/* center the downloadable PDF button */
.scholarship-landing .download-actions {
  display: flex;
  justify-content: center;
  margin-top: 0.5rem;
}
.scholarship-landing .download-actions .btn { min-width: 180px; }

/* Local button styles for scholarship landing (fallback when style.css isn't loaded) */
.scholarship-landing .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.95rem;
  color: #031633;
  background: transparent;
}
.scholarship-landing .btn:hover { text-decoration: none; opacity: 0.95; }
.scholarship-landing .btn-primary {
  background-color: #ffc107;
  color: #031633;
  border-color: #ffc107;
}
.scholarship-landing .btn-primary:hover {
  background-color: #ffcd39;
  border-color: #ffcd39;
}

/* center primary action and place status link underneath */
.scholarship-landing .online-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}
.scholarship-landing .online-actions .status-link {
  font-size: 0.95rem;
  color: #031633;
  text-decoration: underline;
  background: transparent;
  border: none;
  padding: 0;
}

@media (min-width:900px) {
  .scholarship-landing .online-actions .btn { min-width: 220px; }
}

@media (max-width:900px) {
  .scholarship-landing .boxes { flex-direction:column; }
  .scholarship-landing .boxes::before { display:none; }
}

/* small screens: stack */
@media (max-width:767px) {
  .form-row { flex-direction:column; }
}

/* subtle header match */
.section-scholarship .section-title { font-size:1.75rem; }

/* notes area styling */
.scholarship-form .note { color:#666; font-size:0.95rem; }

/* Application page: tighten the gap between process box and form */
.scholarship-application .process-box {
  margin-bottom: 0.6rem;
}

.scholarship-application .section-scholarship .panel {
  margin-top: 0.5rem;
}

/* Keep these boxes left-aligned internally (but centered as blocks) */
.scholarship-application .app-id-banner {
  text-align: left;
}

.scholarship-application .process-box {
  text-align: left;
}

/* NAVBAR overrides scoped to scholarship page to ensure branding stays left and menu right */
.scholarship-page #navbar .navbar-container,
.scholarship-page .navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.scholarship-page .navbar-brand {
  flex: 0 0 auto;
  margin-left: 0 !important;
  margin-right: 1rem;
  justify-content: flex-start;
  align-items: center;
  display: flex;
}
.scholarship-page .navbar-menu {
  margin-left: auto !important;
  gap: 1rem;
  align-items: center;
}

/* Ensure brand text does not wrap awkwardly on this page */
.scholarship-page .brand-name-desktop { max-width: 520px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* (process-image border is handled above) */
