/* The two fonts from the main ISAC site (isac.org).
   These are the exact same lines the site itself uses. */
@import 'https://fonts.googleapis.com/css2?family=Roboto:wght@400;600;700&display=swap';
@import 'https://fonts.googleapis.com/css2?family=M+PLUS+Rounded+1c:wght@500;800;900&display=swap';

/* ============================================================
   PORTAL BAR — portal-bar.css
   This styles the bar: the menu button, the tabs, and the
   little round account button on the right.
   It goes with portal-bar.component.html.

   NOTE: I commented out every hover style because I want
   the devs to choose how hovers should look.
   ============================================================ */

/* These are the colors and sizes the whole thing uses.
   Change a color here and it changes everywhere. */
.isac-menu {
  /* Colors measured straight from the Figma frame. */
  --accent: #007250; /* 6c8957 (updated for accessibilty contrast) the one olive green used everywhere */
  --accent-deep: #5d7749; /* a bit darker, for buttons if needed */
  --accent-bright: #6c8957; /* the green underline under the tab */
  --accent-soft: #f0f3ec; /* very light green */
  --accent-border: #d6ddcb; /* light green border */

  --ink: #1b2026; /* almost-black text */
  --muted: #66707a; /* gray text */
  --muted-2: #8a939c; /* lighter gray text */
  --line: #e5e5e5; /* light gray lines (measured) */
  --line-soft: #e5e5e5; /* same — the design uses one gray line */
  --bg: #ffffff; /* white */
  --gray-fill: #e4e6e8; /* gray circle behind the initials */

  /* Fonts, taken from the main ISAC site's own theme tokens. */
  --font-display: 'M PLUS Rounded 1c', sans-serif; /* the rounded one.
        The main site only uses it for headings (h1 to h5). */
  --font-body: 'Roboto', sans-serif; /* all regular text */

  --pad: 42px; /* measured: first text sits 42px from the edge */
  --maxw: 1512px; /* the Figma frame is 1512 wide */
  --shadow: 0 18px 40px -16px rgba(22, 36, 58, 0.28), 0 2px 8px -2px rgba(22, 36, 58, 0.1); /* soft shadow */
}

/* ------------------------------------------------------------
   The bar itself. It sticks to the top when you scroll.
   ------------------------------------------------------------ */
.barwrap {
  position: sticky; /* this makes it stick */
  top: 0;
  z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.2s;
}
/* When the bar is stuck to the top, it gets a shadow.
   A tiny bit of JavaScript adds the "stuck" class. */
.barwrap.stuck {
  box-shadow: 0 10px 24px -18px rgba(22, 36, 58, 0.35);
}
/* This inner box keeps everything lined up with the page.
   IMPORTANT: it has position:relative. The big menu hangs
   off of this box. Do not remove that. */
.bar-in {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
}
/* One row. Button on the left, tabs in the middle,
   account on the right. */
.portalbar {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  font-family: var(--font-body); /* Roboto for the bar */
}

/* ------------------------------------------------------------
   The "Programs & Resources" button. It opens the big menu.
   ------------------------------------------------------------ */
.trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1.5px solid var(--ink); /* dark border, like the design */
  background: var(--bg);
  font-family: var(
    --font-body
  ); /* Roboto — the main site only uses
                                     the rounded font for headings */
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
}
.trigger:hover {
  background: #f4f6f4;
}
/* When the menu is open, the button looks "on". */
.trigger[aria-expanded='true'] {
  background: var(--accent-soft);
  border-color: var(--accent-deep);
}
/* The little 4-square icon inside the button. */
.grid-ico {
  display: grid;
  grid-template-columns: repeat(2, 5px);
  grid-template-rows: repeat(2, 5px);
  gap: 2px;
}
.grid-ico i {
  background: var(--ink); /* dark squares */
  border-radius: 1px;
}
/* The small triangle on the button. */
.trigger .chev {
  font-size: 9px;
  color: var(--ink);
  transition: transform 0.2s;
}
/* The triangle flips upside down when the menu is open. */
.trigger[aria-expanded='true'] .chev {
  transform: rotate(180deg);
}

/* ------------------------------------------------------------
   The tabs. "Application Portal" is always there.
   When a tool opens, it shows up here as a new tab with an X.
   ------------------------------------------------------------ */
.slot-tabs {
  display: flex;
  align-self: stretch;
  min-width: 0;
  flex: 1;
}
/* If there are too many tabs, this row scrolls sideways.
   The right edge fades out so you know there is more. */
.tabs-scroll {
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  scrollbar-width: none;
  min-width: 0;
  mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 22px), transparent);
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 22px), transparent);
}
.tabs-scroll::-webkit-scrollbar {
  display: none;
}

.tab {
  border: 0;
  background: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-family: var(--font-body); /* Roboto, for easy reading */
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
  height: 64px;
  padding: 0 6px;
  margin-right: 18px;
  border-bottom: 4px solid transparent; /* room for the green line */
}
/* I commented out the hover because I want the devs to choose.
.tab:hover{
  color:var(--ink);
}
*/
/* The tab you are on gets dark text and a green line under it. */
.tab.active {
  color: var(--ink);
  border-bottom-color: var(--accent-bright);
}
/* The little X on a tool tab. Click it to close that tab. */
.tab .x {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 5px;
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1;
}
/* I commented out the hover because I want the devs to choose.
.tab .x:hover{
  background:rgba(0,0,0,.08);
  color:var(--ink);
}
*/

/* ------------------------------------------------------------
   The account area: a gray circle with your initials
   and a small triangle. Click it and a little menu drops down.
   ------------------------------------------------------------ */
.slot-account {
  margin-left: auto; /* pushes it all the way to the right */
  flex: 0 0 auto;
}
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gray-fill); /* plain gray circle */
  color: var(--ink);
  display: grid;
  place-items: center;
  font-size: 12.5px;
  font-weight: 700;
}
.acct {
  position: relative;
}
.acct-btn {
  border: 0;
  background: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 6px;
  border-radius: 9px;
}
/* I commented out the hover because I want the devs to choose.
.acct-btn:hover{
  background:#f4f6f4;
}
*/
.acct-btn .chev {
  font-size: 9px;
  color: var(--ink);
}
/* The little menu that drops down under the circle. */
.acct-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 224px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 11px;
  box-shadow: var(--shadow);
  padding: 6px;
  opacity: 0; /* hidden to start */
  transform: translateY(-6px);
  pointer-events: none;
  transition: 0.16s;
  z-index: 50;
}
/* JavaScript adds "open" to show it. */
.acct.open .acct-menu {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
/* The top part with the name and email. */
.acct-menu .hd {
  padding: 9px 11px 8px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 5px;
}
.acct-menu .hd .n {
  font-size: 13.5px;
  font-weight: 650;
}
.acct-menu .hd .e {
  font-size: 11.5px;
  color: var(--muted-2);
}
/* The links in the little menu. */
.acct-menu a {
  display: block;
  padding: 8px 11px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 550;
}
.acct-menu a:hover {
  background: #f4f6f4;
}
/* Sign out is red so it stands out. */
.acct-menu a.out {
  color: #a33;
}

/* ------------------------------------------------------------
   Helpers.
   ------------------------------------------------------------ */
/* Hides text from the screen but screen readers still say it. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
/* The blue ring you see when you press Tab on the keyboard.
   This is NOT a hover — please keep it. People who cannot
   use a mouse need it to see where they are. */
.barwrap a:focus-visible,
.barwrap button:focus-visible {
  outline: 3px solid rgba(47, 127, 193, 0.55);
  outline-offset: 2px;
  border-radius: 8px;
}
/* If someone turned off animations on their computer,
   we turn ours off too. */
@media (prefers-reduced-motion: reduce) {
  .barwrap *,
  .barwrap {
    transition: none !important;
  }
}

/* ============================================================
   PHONES AND SMALL SCREENS (900px wide or less)
   The bar gets shorter. The big button shrinks to just the
   icon and the little triangle — no words. The tabs and the
   circle get a bit smaller too.
   ============================================================ */
@media (max-width: 900px) {
  .bar-in {
    padding: 0 12px;
  }
  .portalbar {
    min-height: 52px;
    gap: 8px;
  }
  /* icon-only button, drawn in the ISAC green like the design */
  .trigger {
    height: 38px;
    padding: 0 10px;
    gap: 5px;
    border-color: var(--accent);
    color: var(--accent);
  }
  .trigger .lbl {
    display: none; /* hide the words on phones */
  }
  .trigger .grid-ico i {
    background: var(--accent);
  }
  .trigger .chev {
    font-size: 8px;
    color: var(--accent);
  }
  .tab {
    height: 52px;
    font-size: 12.5px;
    padding: 0 8px;
    margin-right: 8px;
    border-bottom-width: 2px;
  }
  .avatar {
    width: 32px;
    height: 32px;
    font-size: 11px;
  }
  .acct-menu {
    width: 250px;
  }
}

.menu {
  font-family: var(--font-body); /* Roboto for the menu text */
  position: absolute;
  top: 100%; /* right below the bar */
  left: var(--pad);
  right: var(--pad);
  z-index: 46;
  background: var(--bg);
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 13px 13px; /* round corners on the bottom only */
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  /* The Figma prototype says: Dissolve, 300ms, Ease out. */
  transition: opacity 0.3s ease-out;
}
.menu.open {
  opacity: 1;
  pointer-events: auto;
}
/* Add class "full" to the menu if you want it to touch
   both edges of the screen. */
.menu.full {
  left: 0;
  right: 0;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
}
/* When the menu is full width, the stuff inside still lines
   up with the button and tabs in the bar above it. */
.menu.full .lay-cols {
  max-width: 1512px; /* the Figma frame is 1512 wide */
  margin: 0 auto;
}
/* The see-through dark layer behind the open menu.
   The Figma prototype says the background dims 6%. */
.menu-scrim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.06);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-out;
  z-index: 44; /* under the menu, over the page */
}
.menu-scrim.show {
  opacity: 1;
}

/* If the list gets really tall, the inside scrolls. */
.menu-scroll {
  overflow-y: auto;
  max-height: min(66vh, 640px);
}

/* ------------------------------------------------------------
   Four columns side by side, with thin lines between them.
   Columns 1-3 hold the programs. Column 4 holds the resources.
   ------------------------------------------------------------ */
.lay-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  /* Option A (tight): less air so the whole menu fits on a
     laptop screen with no scrolling. */
  padding: 16px 12px 24px;
}
.col {
  padding: 0 26px;
  border-right: 1px solid var(--line-soft);
}
.col:last-child {
  border-right: 0;
}

/* The small gray heading. Only "Additional Resources" uses
   this now. The category headings are commented out in the
   HTML — take the comment marks off to bring them back. */
.mega-h {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin: 0 0 14px; /* Option A: tighter */
}

/* ------------------------------------------------------------
   One program. It has three parts:
   1. the short green name (like MAP)
   2. the small gray full name under it
   3. the links (Apply, Status, Print & sign, Submit)
   ------------------------------------------------------------ */
.prog {
  padding: 7px 0; /* Option A: 14px of air between programs */
  border-radius: 9px;
}
/* The first program in each column starts at the very top.
   This makes all the columns line up straight across. */
.col .prog:first-child {
  padding-top: 0;
}
/* I commented out the hover because I want the devs to choose.
.prog:hover{
  background:#f4f6f4;
}
*/
.prog .abbr {
  font-family: var(
    --font-display
  ); /* the rounded ISAC font.
       The main site uses it for headings only, and these short
       green names are the headings of this menu. */
  font-size: 15.5px; /* Option A: a step smaller */
  font-weight: 800; /* the rounded font's bold weight */
  color: var(--accent);
  line-height: 1.25;
  display: block;
}
.prog .full {
  font-size: 12px; /* Option A: a step smaller */
  color: var(--desc-ink); /* near-black in the design, not gray */
  line-height: 1.3;
  display: block;
  margin: 2px 0 5px;
}
/* The green links under each program. */
.alink {
  font-family: var(
    --font-body
  ); /* Roboto — links are regular text,
                                     and it is much easier to read */
  font-size: 13px; /* Option A */
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}

.alink.disabled {
  color: var(--muted-2);
  pointer-events: none;
  cursor: default;
  text-decoration: none;
}
/* No more dot between links. This puts a space between
   them instead. */
.alink + .alink {
  margin-left: 14px; /* Option A */
}
/* I commented out the hover because I want the devs to choose.
.alink:hover{
  text-decoration:underline;
}
*/

/* ------------------------------------------------------------
   The resources in column 4.
   ⊞ means: this opens as a new tab in the bar up top.
   ↗ means: this opens in a whole new browser tab.
   ------------------------------------------------------------ */
.res-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  border: 0;
  background: none;
  cursor: pointer;
  text-align: left;
  color: var(--ink);
  font-family: inherit;
  font-size: 13.5px; /* Option A */
  font-weight: 600;
  padding: 8px 0; /* Option A: tighter. No side padding — lines
                         up with the heading, and the little icon
                         sits at the column edge */
  border-radius: 9px;
}
/* I commented out the hover because I want the devs to choose.
.res-item:hover{
  background:#f4f6f4;
  color:var(--accent-deep);
}
.res-item:hover .ico{
  color:var(--accent-deep);
}
*/
.res-item .ico {
  color: var(--muted-2);
  font-size: 12px;
}

/* ------------------------------------------------------------
   The bottom strip of the menu ("Signed in as...").
   It is commented out in the HTML right now. These styles
   stay here so it works the moment you bring it back.
   ------------------------------------------------------------ */
.mega-foot {
  border-top: 1px solid var(--line-soft);
  background: #fafbfa;
  border-radius: 0 0 13px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 26px;
}
.menu.full .mega-foot {
  border-radius: 0;
}
.mega-foot .signed {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  color: var(--muted);
}
.mega-foot .signed b {
  color: var(--ink);
}
.mega-foot .avatar {
  width: 24px;
  height: 24px;
  font-size: 10px;
}
.fa {
  display: flex;
  gap: 8px;
}
.flink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--accent-deep);
  padding: 7px 13px;
  border-radius: 8px;
  border: 1.5px solid var(--accent-border);
  background: #fff;
}
/* I commented out the hover because I want the devs to choose.
.flink:hover{
  background:var(--accent-soft);
}
*/
.flink.ghost {
  border-color: transparent;
  color: var(--muted);
}
/* I commented out the hover because I want the devs to choose.
.flink.ghost:hover{
  background:#f0f1f2;
  color:var(--ink);
}
*/

/* ------------------------------------------------------------
   Helpers.
   ------------------------------------------------------------ */
/* The blue ring for keyboard users. This is NOT a hover —
   please keep it. */
.menu a:focus-visible,
.menu button:focus-visible {
  outline: 3px solid rgba(47, 127, 193, 0.55);
  outline-offset: 2px;
  border-radius: 8px;
}
/* Turn off animations if the person's computer asks us to. */
@media (prefers-reduced-motion: reduce) {
  .menu,
  .menu * {
    transition: none !important;
  }
}

/* ============================================================
   PHONES AND SMALL SCREENS (900px wide or less)
   The big desktop menu goes away. In its place, a SHEET slides
   up from the bottom of the screen — that is the mobile design.
   The dark layer behind it gets darker on phones (35%) so the
   sheet stands out.
   ============================================================ */
@media (max-width: 900px) {
  .menu {
    display: none; /* no desktop menu on phones */
  }
  .menu-scrim {
    background: rgba(39, 40, 51, 0.35);
  }
}

/* ------------------------------------------------------------
   THE BOTTOM SHEET (phones only — hidden on big screens).
   It starts tucked below the screen. JavaScript adds "open"
   to slide it up. It opens half way (320px). Tap the little
   handle to make it tall (85% of the screen), tap again to
   shrink it back.
   ------------------------------------------------------------ */
.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -8px 24px rgba(39, 40, 51, 0.28);
  height: 320px; /* the half-open size */
  transform: translateY(102%); /* tucked away to start */
  transition: transform 0.25s ease, height 0.25s ease;
  font-family: var(--font-body);
}
.sheet.open {
  transform: none;
}
.sheet.is-full {
  height: 85vh;
  height: 85dvh; /* newer phones measure the screen better this way */
}
@media (min-width: 901px) {
  .sheet {
    display: none; /* never on big screens */
  }
}
/* the little gray grab bar at the top of the sheet */
.sheet-handle {
  border: 0;
  background: none;
  cursor: pointer;
  padding: 8px 0 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 100%;
}
.sheet-handle .bar {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: #cdced9;
}
.sheet-handle .hint {
  font-size: 10.5px;
  color: var(--muted);
}
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 18px 8px;
}
.sheet-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}
.sheet-close {
  border: 0;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: #f1f2f5;
  display: grid;
  place-items: center;
  font-size: 14px;
  color: var(--muted);
}
/* the two tabs inside the sheet: Programs | Resources */
.sheet-tabs {
  display: flex;
  gap: 4px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
}
.sheet-tab {
  border: 0;
  background: none;
  cursor: pointer;
  padding: 10px 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 2px solid transparent;
}
.sheet-tab.active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}
/* the scrolling part of the sheet */
.sheet-body {
  flex: 1;
  overflow: auto;
  min-height: 0;
}
/* one program row inside the sheet: a thin line under each one */
.sheet .prog {
  padding: 11px 18px;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}
.sheet .abbr {
  font-size: 14.5px;
}
.sheet .full {
  font-size: 12px;
  margin: 1px 0 4px;
}
.sheet .alink {
  font-size: 12.5px;
}
/* one resource row inside the sheet */
.sheet .res-item {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}
/* the little helper line at the bottom of the resources list */
.sheet-legend {
  padding: 10px 18px;
  font-size: 11px;
  color: var(--muted);
}