﻿/* Scholarship Matrix (smx-) — Ingeniux-safe */
/* Dark card, white text, black labels/details, #041e42 outline, extra padding, responsive title with divider */

/* Container */
.smx-widget {
  max-width: 920px;
  margin: 2rem auto;
  padding: 2rem;
  box-sizing: border-box;
  text-align: center;
  border: 2px solid #041e42;
  border-radius: 12px;
  background-color: #ffffff;
}

/* Title (flexible element – can be <p>, <h3>, etc.) */
.smx-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #041e42;
  margin: 0 0 1.75rem;
  line-height: 1.4;
  text-align: center;
  position: relative;
}

/* Decorative divider under title */
.smx-title::after {
  content: "";
  display: block;
  width: 60%;
  max-width: 320px;
  height: 1px;
  background-color: #d9d9d9;
  margin: 1rem auto 0;
}

/* Controls */
.smx-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0 -6px 1rem;
}
.smx-field {
  flex: 1 1 240px;
  min-width: 220px;
  padding: 0 6px;
  margin-bottom: 12px;
  box-sizing: border-box;
  text-align: left;
}
.smx-field label {
  display: block;
  font-weight: 600;
  margin: 0 0 6px;
  color: #000000;
}

/* Selects — fixed arrow */
.smx-field select.smx-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #041e42;
  background-color: #041e42;
  color: #ffffff;
  box-sizing: border-box;

  background-image: url("data:image/svg+xml;utf8,\
  <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6' aria-hidden='true'>\
    <path fill='%23ffffff' d='M0 0l5 6 5-6z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 10px 6px;
}
.smx-field select.smx-select::-ms-expand {
  display: none;
}
.smx-field select.smx-select:focus {
  outline: 2px solid rgba(4,30,66,.35);
  outline-offset: 2px;
}
.smx-field select.smx-select:hover {
  background-color: #ffffff;
  color: #041e42;
  border-color: #041e42;
  background-image: url("data:image/svg+xml;utf8,\
  <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6' aria-hidden='true'>\
    <path fill='%23041e42' d='M0 0l5 6 5-6z'/></svg>");
}

/* Instruction text */
.smx-subtext {
  text-align: center;
  font-size: 1rem;
  color: #000000;
  margin: 10px auto 24px;
  line-height: 1.5;
  max-width: 640px;
}

/* Card */
.smx-card {
  background: #041e42;
  border-radius: 16px;
  padding: 20px;
  border: 1px solid #ffffff;
  box-shadow: 0 6px 18px rgba(0,0,0,.15);
  box-sizing: border-box;
  text-align: center;
  color: #ffffff;
  margin-top: 1.5rem;
}
.smx-award-label {
  font-size: 1.375rem;
  font-weight: 700;
  color: #ffffff;
  margin: 6px 0;
}
.smx-amount {
  font-size: 2.25rem;
  font-weight: 800;
  color: #ffffff;
  margin: 4px 0 8px;
}
.smx-sub {
  color: #f1f1f1;
  margin: 4px 0 12px;
  font-size: 1rem;
  line-height: 1.4;
}

/* See details button */
.smx-details-btn {
  background: none;
  border: 1px solid transparent;
  color: #ffffff;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  padding: 6px 10px;
  text-decoration: none;
  border-radius: 6px;
  transition: all .2s ease-in-out;
}
.smx-details-btn:hover,
.smx-details-btn:focus {
  background-color: #ffffff;
  color: #041e42;
  border-color: #041e42;
  text-decoration: none;
}
.smx-details-btn .smx-caret {
  display: inline-block;
  transition: transform .2s ease;
}
.smx-details-btn[aria-expanded="true"] .smx-caret {
  transform: rotate(180deg);
}

/* Details */
.smx-details {
  margin-top: 12px;
  border-top: 1px dashed #041e42;
  padding-top: 12px;
  text-align: left;
  color: #000000;
}
.smx-details h4 {
  margin: 0 0 6px;
  color: #000000;
}
.smx-details ul {
  margin: 0;
  padding-left: 18px;
}
.smx-details li {
  margin: 4px 0;
  color: #000000;
}

/* Footer note */
.smx-note {
  margin-top: 10px;
  font-size: .95rem;
  color: #000000;
}

/* A11y helper */
.smx-visually-hidden {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* Responsive Title Scaling */
@media (max-width: 640px) {
  .smx-title {
    font-size: 1.15rem;
    margin-bottom: 1.25rem;
  }
  .smx-title::after {
    width: 75%;
  }
  .smx-widget {
    padding: 1.5rem;
  }
}

/* High-contrast mode: drop decorative arrow */
@media (forced-colors: active) {
  .smx-field select.smx-select {
    background-image: none;
  }
}
