﻿/* ==========================================================================
   In-State Freshman Scholarship Matrix & Accordion Stylesheet
   ========================================================================== */

.smx-root .sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.smx-root {
  max-width: 1040px;
  margin: 0 auto 2rem;
  font-family: inherit;
}

/* 7-Column Legend Filter Button Grid */
.smx-legend-container {
  margin: 1rem auto 0.75rem;
}
.smx-legend-instruction {
  font-size: 0.88rem;
  font-weight: 700;
  color: #041e42;
  margin-bottom: 0.5rem;
}
.smx-legend-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  max-width: 980px;
  margin: 0 auto;
}
.smx-legend-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 4px;
  border-radius: 4px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease;
  min-height: 56px;
  text-align: center;
}
.smx-legend-btn:hover,
.smx-legend-btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  outline: none;
}
.smx-legend-btn[aria-pressed="true"] {
  border-color: #041e42 !important;
  box-shadow: 0 0 0 2px #041e42, 0 4px 10px rgba(0,0,0,0.25);
  transform: translateY(-2px);
}

/* In-State Tier Button Colors & AA Contrast */
.smx-btn-presidential     { background-color: #041e42; color: #ffffff; }
.smx-btn-provost          { background-color: #8ed3c7; color: #041e42; }
.smx-btn-nevadascholars   { background-color: #ffffff; color: #041e42; border: 1px solid #c2c9d0; }
.smx-btn-packpride        { background-color: #a6b2b9; color: #041e42; }
.smx-btn-alphie           { background-color: #27629b; color: #ffffff; }
.smx-btn-luna             { background-color: #b7ce63; color: #041e42; }

/* 7th Reset Button */
.smx-btn-reset {
  background-color: #f8fafc;
  color: #041e42;
  border: 2px dashed #94a3b8;
}
.smx-btn-reset:hover,
.smx-btn-reset:focus-visible {
  background-color: #041e42;
  color: #ffffff;
  border-style: solid;
  border-color: #041e42;
}

.smx-leg-title { font-size: 0.58rem; font-weight: 800; letter-spacing: 0.03em; line-height: 1.1; }
.smx-leg-amt   { font-size: 0.95rem; font-weight: 900; line-height: 1.1; margin: 2px 0 1px; }
.smx-leg-sub   { font-size: 0.55rem; line-height: 1; opacity: 0.9; }

/* Active Banner & Reset Action */
.smx-active-banner {
  min-height: 44px;
  background-color: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  margin: 0.75rem auto 1rem;
  max-width: 980px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 6px 16px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #041e42;
}
.smx-banner-hint { color: #041e42; font-weight: 700; }
.smx-clear-btn {
  background: #041e42;
  color: #ffffff;
  border: none;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.smx-clear-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Desktop Matrix View */
.smx-desktop-view {
  display: block;
  max-width: 980px;
  margin: 0 auto;
}
.smx-axis-title {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #334155;
  margin-bottom: 0.4rem;
}

/* Flex Container for External Vertical Axis Label + Table */
.smx-matrix-outer-flex {
  display: flex;
  align-items: stretch;
  gap: 6px;
  max-width: 980px;
  margin: 0 auto;
}
.smx-side-axis-label {
  width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.smx-side-axis-label span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #041e42;
  text-transform: uppercase;
  white-space: nowrap;
}

.smx-table-wrap {
  flex: 1;
  border: 1px solid #041e42;
  border-radius: 2px;
  background-color: #ffffff;
}
.smx-matrix-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin: 0;
  font-size: 0.75rem;
}

/* Corner Header & Column Headers */
.smx-corner-hdr {
  width: 52px;
  background-color: #f8fafc !important;
  color: #041e42 !important;
  border: 1px solid #cbd5e1 !important;
  padding: 3px 2px !important;
  font-size: 0.78rem !important;
  font-weight: 900 !important;
  text-align: center !important;
  vertical-align: middle;
  line-height: 1.2;
}
.smx-hdr-act th:not(.smx-corner-hdr) {
  font-size: 0.85rem;
  font-weight: 800;
  background-color: #f8fafc;
  border: 1px solid #cbd5e1;
  text-align: center;
  padding: 4px 0;
  color: #041e42;
  cursor: pointer;
}
.smx-hdr-sat th:not(.smx-corner-hdr) {
  font-size: 0.78rem;
  font-weight: 700;
  background-color: #f1f5f9;
  border: 1px solid #cbd5e1;
  text-align: center;
  padding: 3px 0;
  color: #041e42;
  cursor: pointer;
}

/* GPA Row Header */
.smx-gpa-btn {
  width: 52px;
  background-color: #f8fafc;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  border: 1px solid #cbd5e1;
  text-align: center;
}
.smx-gpa-btn:hover,
.smx-gpa-btn:focus-visible,
.smx-matrix-table tr.active-row .smx-gpa-btn {
  background-color: #041e42 !important;
  color: #ffffff !important;
  outline: none;
}

/* Matrix Cells */
.smx-matrix-table td {
  border: 1px dashed rgba(0, 0, 0, 0.2);
  height: 23px;
  padding: 0;
  cursor: pointer;
  transition: opacity 0.2s ease, filter 0.2s ease;
}

/* Official In-State Matrix Cell Color Classes */
.cell-presidential   { background-color: #041e42; }
.cell-provost        { background-color: #8ed3c7; }
.cell-nevadascholars { background-color: #ffffff; }
.cell-packpride      { background-color: #a6b2b9; }
.cell-alphie         { background-color: #27629b; }
.cell-luna           { background-color: #b7ce63; }

/* Active Crosshairs & Hover */
.smx-matrix-table tr.active-row td {
  box-shadow: inset 0 2px 0 #041e42, inset 0 -2px 0 #041e42;
}
.smx-matrix-table th.active-col {
  background-color: #041e42 !important;
  color: #ffffff !important;
}
.smx-matrix-table td:hover,
.smx-matrix-table td:focus,
.smx-matrix-table td:focus-visible {
  outline: 3px solid #041e42 !important;
  outline-offset: -2px !important;
  z-index: 10;
  position: relative;
}

/* Dimming Architecture */
.smx-dimmed td:not(.is-matched) {
  opacity: 0.15 !important;
  filter: grayscale(80%) !important;
}
.smx-dimmed td.is-matched {
  opacity: 1 !important;
  box-shadow: inset 0 0 0 1.5px #041e42 !important;
  position: relative;
  z-index: 2;
}

/* Dedicated Tier Detail Drawer */
.smx-tier-drawer {
  max-width: 980px;
  margin: 1.25rem auto 0;
  background-color: #ffffff;
  border: 2px solid #041e42;
  border-radius: 6px;
  padding: 1rem 1.25rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  text-align: left;
}
.smx-tier-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
}
.smx-drawer-title { font-size: 1.2rem; font-weight: 800; color: #041e42; margin: 0; }
.smx-drawer-subtitle { font-size: 0.9rem; color: #27629b; font-weight: 700; margin: 0; }
.smx-drawer-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  color: #64748b;
}
.smx-drawer-close:hover { color: #041e42; }
.smx-tier-drawer table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.smx-tier-drawer th, .smx-tier-drawer td {
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
}
.smx-tier-drawer th { background-color: #f8fafc; font-weight: 700; color: #041e42; }

/* Desktop Accordions & Mobile Accordions */
.smx-accordion-view, .smx-award-mobile-view {
  max-width: 980px;
  margin: 1.75rem auto 0;
}
.smx-m-list, .smx-award-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.smx-m-item, .smx-award-item {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  overflow: hidden;
}
.smx-m-btn, .smx-award-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #ffffff;
  border: none;
  cursor: pointer;
}
.smx-m-btn:hover, .smx-award-btn:hover,
.smx-m-btn:focus-visible, .smx-award-btn:focus-visible {
  background-color: #f8fafc;
  outline: 2px solid #041e42;
}
.smx-m-gpa, .smx-award-name { font-size: 1.05rem; font-weight: 800; color: #041e42; }
.smx-m-meta, .smx-award-toggle-lbl { font-size: 0.85rem; color: #475569; }
.smx-award-amt { font-size: 0.85rem; font-weight: 700; color: #27629b; }

.smx-m-chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid #64748b;
  border-bottom: 2px solid #64748b;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  display: inline-block;
}
.smx-m-btn[aria-expanded="true"] .smx-m-chevron,
.smx-award-btn[aria-expanded="true"] .smx-m-chevron {
  transform: rotate(-135deg);
}

.smx-m-breakdown, .smx-award-breakdown { list-style: none; margin: 0; padding: 0; }
.smx-m-breakdown li, .smx-award-breakdown li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.smx-m-breakdown li strong, .smx-award-breakdown li strong { font-weight: 800; color: #041e42; }
.smx-m-breakdown li span, .smx-award-breakdown li span { font-weight: 700; color: #000000; }

/* Left Accent Borders for Tiers */
.smx-card-presidential, .m-row-presidential     { border-left: 6px solid #041e42; }
.smx-card-provost, .m-row-provost               { border-left: 6px solid #8ed3c7; }
.smx-card-nevadascholars, .m-row-nevadascholars { border-left: 6px solid #041e42; }
.smx-card-packpride, .m-row-packpride           { border-left: 6px solid #a6b2b9; }
.smx-card-alphie, .m-row-alphie                 { border-left: 6px solid #27629b; }
.smx-card-luna, .m-row-luna                     { border-left: 6px solid #b7ce63; }

/* Display Toggles */
@media (min-width: 768px) {
  .smx-award-mobile-view { display: none !important; }
  .smx-desktop-accordion-view { display: block !important; }
}
@media (max-width: 767px) {
  .smx-desktop-view { display: none !important; }
  .smx-tier-drawer { display: none !important; }
  .smx-active-banner { display: none !important; }
  .smx-matrix-outer-flex { display: block; }
  .smx-side-axis-label { display: none; }
  .smx-desktop-accordion-view { display: none !important; }
  .smx-award-mobile-view { display: block !important; }
  .smx-legend-grid { grid-template-columns: repeat(3, 1fr); }
  .smx-btn-reset { grid-column: span 3; }
}