/* ==========================================================================
   1. FAU BRAND TOKENS & TYPOGRAPHY STACKS
   ========================================================================== */
:root {
  /* Brand Colors */
  --fau-blue: #003366;
  --fau-red: #CC0000;
  --fau-darkblue: #002142;
  --fau-bg: #FFFFFF;
  --fau-text-color: #212529;

  /* Font Stacks with Fallbacks */
  --fau-font-body: 'Inter', Arial, Helvetica, sans-serif;
  --fau-font-heading: 'Unbounded', Arial, Helvetica, sans-serif;

  /* Baseline Spacing & Size Tokens */
  --fau-font-size-base: 1rem;      /* 16px */
  --fau-font-size-lg: 1.25rem;    /* 20px */
  --fau-font-size-sm: 0.875rem;   /* 14px */
  --fau-font-size-xs: 0.75rem;    /* 12px */
  --fau-font-size-xxs: 0.625rem;  /* 10px */
}

/* ==========================================================================
   2. GLOBAL BASE & LAYOUT RESET
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: var(--fau-bg);
  font-family: var(--fau-font-body);
  font-size: var(--fau-font-size-base);
  line-height: 1.5;
  color: var(--fau-text-color);
  -webkit-font-smoothing: antialiased;
}

/* Main content wrapper: no longer stretches to fill the viewport,
   so the footer sits directly below the content (e.g. the frevvo iframe)
   instead of latching to the bottom of the screen. */
.fau-main-content {
  flex: 0 0 auto;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Center the frevvo application iframe.
   frevvo resizes the iframe to the form's natural width (resize=true),
   so center the fixed-width box within the (centered) main content. */
#frevvoApp {
  width: 100%;
}

#frevvoForm {
  display: block;
  margin: 0 auto;
}

/* Informational text block on the application client pages
   (e.g. "Thank you for your interest..." + "What you need to complete
   an application" list). Justifies the prose and constrains the line
   length so the text reads cleanly in the content area. */
.fau-info-block {
  max-width: 720px;
  margin: 0 auto 1.5rem;
  text-align: justify;
  text-justify: inter-word;
  line-height: 1.6;
  color: var(--fau-text-color);
}

.fau-info-block p {
  margin-bottom: 1rem;
}

.fau-info-block h4 {
  margin: 0 0 0.5rem;
  font-family: var(--fau-font-heading);
  font-weight: 700;
}

.fau-info-block ul {
  margin: 0 0 1rem 1.5rem;
  padding: 0;
}

.fau-info-block li {
  margin-bottom: 0.5rem;
}

/* Side-by-side login / first-time applicant columns */
.login-columns {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.login-columns .primary {
  flex: 1 1 60%;
}

.login-columns .secondary {
  flex: 1 1 40%;
}

@media (max-width: 768px) {
  .login-columns {
    flex-direction: column;
  }
}

/* Login action buttons (Log In / Lost Password) separation */
.login-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.login-buttons .button {
  margin: 0 !important;
  clear: none !important;
}

/* ==========================================================================
   3. HEADER & NAVIGATION STYLES
   ========================================================================== */
.fau-header {
  width: 100%;
  flex-shrink: 0;
}

.fau-red-stripe {
  height: 15px;
  background-color: var(--fau-red);
  width: 100%;
  border-bottom: 1px solid #FFFFFF;
}

.fau-header-bar {
  background-color: var(--fau-blue);
  padding: 1.25rem 3.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.fau-logo-link {
  display: inline-block;
  text-decoration: none;
}

.fau-logo-header {
  height: auto;
  max-height: 35px;
  width: auto;
  max-width: 100%;
  display: block;
}

.fau-header-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Ensure the header action buttons (PrimeFaces p:commandButton inside h:form)
   are spaced apart and never touch each other. */
.fau-header-nav form {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0;
}

.fau-header-nav .ui-button,
.fau-header-nav button.ui-button {
  margin-right: 0.75rem;
}

.fau-header-nav .ui-button:last-child,
.fau-header-nav button.ui-button:last-child {
  margin-right: 0;
}

/* Base Pill Buttons */
.fau-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.5rem;
  padding: 0 1.5rem;
  border-radius: 50px;
  font-family: var(--fau-font-body);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.fau-btn-light {
  background-color: #FFFFFF;
  color: #000000;
}
.fau-btn-light:hover, .fau-btn-light:focus-visible {
  background-color: #E2E8F0;
}

.fau-btn-red {
  background-color: var(--fau-red);
  color: #FFFFFF;
}
.fau-btn-red:hover, .fau-btn-red:focus-visible {
  background-color: #A30000;
}

.fau-btn-outline {
  background-color: transparent;
  color: #FFFFFF;
  border-color: #FFFFFF;
}
.fau-btn-outline:hover, .fau-btn-outline:focus-visible {
  background-color: rgba(255, 255, 255, 0.15);
}

/* ==========================================================================
   4. BASE TYPOGRAPHY & FLUID HEADINGS
   ========================================================================== */
/* Body Typography Utilities */
p, .body-md {
  font-size: var(--fau-font-size-base);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.lead, .body-lg {
  font-size: var(--fau-font-size-lg);
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.body-sm {
  font-size: var(--fau-font-size-sm);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.body-xs {
  font-size: var(--fau-font-size-xs);
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

/* Heading Base Configuration */
h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6 {
  font-family: var(--fau-font-heading);
  color: var(--fau-blue);
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1, .h1 { font-weight: 700; font-size: clamp(2.125rem, 4vw, 2.5rem); }  /* 34px - 40px */
h2, .h2 { font-weight: 600; font-size: clamp(1.75rem, 3.5vw, 2.25rem); } /* 28px - 36px */
h3, .h3 { font-weight: 500; font-size: clamp(1.5rem, 3vw, 1.875rem); }   /* 24px - 30px */
h4, .h4 { font-weight: 400; font-size: clamp(1.25rem, 2.5vw, 1.5rem); } /* 20px - 24px */
h5, .h5 { font-weight: 400; font-size: 1.25rem; }                       /* 20px */
h6, .h6 { font-weight: 400; font-size: 1.1rem; }                        /* 18px */

/* Font Family Helper Classes */
.font-inter { font-family: var(--fau-font-body); }
.font-unbounded { font-family: var(--fau-font-heading); }

/* Responsive Media Helper */
.img-responsive {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ==========================================================================
   5. FOOTER STYLES
   ========================================================================== */
.fau-footer {
  background-color: var(--fau-darkblue);
  padding: 1.25rem 1rem;
  flex-shrink: 0;
  width: 100%;
}

.fau-footer-container {
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.fau-footer-text {
  color: #FFFFFF;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0;
}
.fau-logo-footer {
  height: auto;
  max-height: 65px;
  width: auto;
  max-width: 100%;
  display: block;
}

/* ==========================================================================
   6. RESPONSIVE MOBILE ADJUSTMENTS
   ========================================================================== */
@media (max-width: 768px) {
  .fau-red-stripe {
    height: 8px;
  }

  .fau-header-bar {
    padding: 0.75rem 1rem;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
  }

  .fau-logo-header {
    max-height: 24px;
  }

  .fau-header-nav {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }

  .fau-btn {
    height: 2.125rem;
    padding: 0 0.65rem;
    font-size: 0.6875rem;
    letter-spacing: 0.03em;
    flex-shrink: 0;
  }

  .fau-footer {
    padding: 1rem;
  }

  .fau-footer-text {
    font-size: 0.75rem;
  }
}

@media (max-width: 380px) {
  .fau-logo-header {
    max-height: 20px;
  }

  .fau-btn {
    padding: 0 0.5rem;
    font-size: 0.625rem;
  }
}

/* ==========================================================================
   6. GRADUATE COLLEGE BRANDING (GraduateOverlay)
   ========================================================================== */
.fau-grad-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #FFFFFF;
}

.fau-grad-logo {
  height: auto;
  max-height: 35px;
  width: auto;
  max-width: 100%;
  display: block;
}

.fau-grad-program-logo {
  height: auto;
  max-height: 35px;
  width: auto;
  max-width: 100%;
  display: block;
}

.fau-grad-name {
  font-family: var(--fau-font-heading);
  font-weight: 700;
  color: #FFFFFF;
  font-size: 1rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .fau-grad-name {
    font-size: 0.8125rem;
  }
}

/* ==========================================================================
   2. APPLICATION STEP NAVIGATION — CHEVRON PROGRESS BAR
   ==========================================================================
   Server-generated by AdmissionsApplicationBean.getApplicationTabs():
     <ul id="application_tabs">
       <li id="titleXX" class="titletabs_complete|titletabs_incompleteDE
                                titletabs titletabs_inactive">
         <span class="arrow2"><a href="..." target="form">Label</a></span>
       </li>
       ...
       <li id="titleSummary" class="titletabs_complete titletabs
                                    titletabs_inactive"><span class="arrow2">...</span></li>
     </ul>

   State classes (see frevvo.xhtml on-load logic):
     - current step : .titletabs            (titletabs_inactive removed)
     - completed    : .titletabs_complete
     - inactive     : .titletabs_inactive
   The old styling relied on arrowhead/arrowend background images that no
   longer exist in the webapp; this replaces them with CSS-only chevrons.
   ========================================================================== */

/* Step list — horizontal row of chevrons */
#application_tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  margin: 0;
  padding: 0;
  list-style: none;
  /* row-gap separates wrapped rows so chevrons can't overlap; column-gap is 0 so each arrow's notch aligns exactly with the previous arrow's tip (no offset artifact) */
  gap: 0.5rem 0;
}

/* Each chevron step */
#application_tabs li.titletabs {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 2.5rem;
  /* Modest horizontal padding around the label. Each step is now a plain
     rectangle (the chevron tip/notch pseudo-elements were removed), so no
     extra clearance is needed for an arrow point. */
  padding: 0 0.9rem;
  margin-right: 0;
  /* !important overrides the legacy arrowhead background in cob.css, which is
     loaded after this file and otherwise paints every non-active step pink
     (#e68484), leaving the CSS-only arrow tip/notch squares stranded as
     disconnected red diamonds instead of a continuous chevron strip. */
  background-color: var(--fau-red) !important; /* FAU red for all non-active arrows */
  color: #FFFFFF;
  font-family: var(--fau-font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  line-height: 2.5rem;
  white-space: nowrap;
  /* Don't shrink: each chevron sizes to its own label and wraps to the next
     row when the bar is too narrow, instead of compressing. Compressing
     (the flex-shrink:1 default, with min-width:0) is what trimmed the ends
     of longer labels and buried the arrow tips under the overflowing text. */
  flex: 0 0 auto;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* Right-pointing arrow tip (rotated square) — sized to the full bar height so the point is sharp */
#application_tabs li.titletabs::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -0.884rem;
  width: 1.768rem;
  height: 1.768rem;
  margin-top: -0.884rem;
  background-color: inherit;
  transform: rotate(45deg);
  z-index: 1;
}

/* Left-side notch (rotated square) creates the arrow's concave edge.
   Colored to match the PREVIOUS arrow so chevrons interlock cleanly
   (the notch of each arrow is filled by the tip of the one before it). */
#application_tabs li.titletabs::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -0.884rem;
  width: 1.768rem;
  height: 1.768rem;
  margin-top: -0.884rem;
  background-color: var(--fau-red);
  transform: rotate(45deg);
  z-index: 2;
}

/* Neutralize the legacy .arrow2 span. cob.css (loaded after this file) gives
   the <span class="arrow2"> inside each step its own background — pink
   (#e68484) for inactive steps, red (#cc0000) otherwise — via
   ".titletabs_inactive .arrow2 { background: ... !important }". That span sits
   on top of the li's content area, so its background would paint a band across
   the middle of each chevron on top of the red/blue li body. Make it
   transparent (with !important to win) so only the li body and the ::before /
   ::after arrow squares are visible. The legacy 3px margin-right is also
   dropped: it offsets each arrow's notch from the previous arrow's tip,
   breaking the interlock and leaving the chevrons looking like separate
   diamonds. The span is then made a full-height flex container so its label is
   vertically centered in the arrow — the legacy 27px height + vertical padding
   otherwise left the text sitting off-center in the taller chevron. */
#application_tabs li.titletabs .arrow2 {
  background: transparent !important;
  margin-right: 0;
  display: inline-flex;
  align-items: center;
  height: 100%;
  padding-top: 0;
  padding-bottom: 0;
  box-sizing: border-box;
  /* The <a> inside otherwise inherits the li's line-height: 2.5rem, making the
     <a> flex item as tall as the whole arrow so align-items: center has nothing
     to center (the text then sits where the 2.5rem line box puts the baseline).
     Reset to normal so the <a> shrinks to its label and gets truly centered. */
  line-height: normal;
}

/* Links inside the chevrons */
#application_tabs li.titletabs a {
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

#application_tabs li.titletabs a:hover {
  text-decoration: underline;
}

/* Not-yet-started steps — FAU red. The base rule already paints every step
   red; this makes the intent explicit. Completed steps also carry
   titletabs_inactive but are excluded here (:not(.titletabs_complete)) so they
   stay blue. */
#application_tabs li.titletabs.titletabs_inactive:not(.titletabs_complete) {
  background-color: var(--fau-red) !important;
}

/* Completed steps — FAU blue (the done / in-progress path). !important so it
   beats the !important base-red rule; the higher specificity of
   .titletabs_complete (1,2,0 vs the base's 1,1,1) then makes completed blue. */
#application_tabs li.titletabs_complete {
  background-color: var(--fau-blue) !important;
}

#application_tabs li.titletabs_complete::after {
  background-color: var(--fau-blue);
}

/* Current (active) step — FAU blue. !important so it beats the base-red rule;
   :not(.titletabs_inactive) is higher specificity, so the active step is blue. */
#application_tabs li.titletabs:not(.titletabs_inactive) {
  background-color: var(--fau-blue) !important;
}

#application_tabs li.titletabs:not(.titletabs_inactive)::after {
  background-color: var(--fau-blue);
}

/* The left notch (::before) of each arrow is colored to match the PREVIOUS
   arrow so the chevrons interlock (the base notch is red). Color it blue after
   any blue arrow — a completed step or the active step — so that arrow's blue
   tip flows into the next arrow instead of showing a red break. */
#application_tabs li.titletabs_complete + li.titletabs::before,
#application_tabs li.titletabs:not(.titletabs_inactive) + li.titletabs::before {
  background-color: var(--fau-blue);
}

/* First chevron: flat left edge (no notch).
   :first-child covers the very first chevron; .first-in-row (added by JS)
   covers the first chevron of each wrapped row so the flat-edge logic
   "also applies after wrapping". */
#application_tabs li.titletabs:first-child::before {
  display: none;
}

#application_tabs li.titletabs.first-in-row::before {
  display: none;
}

/* Responsive: stack chevrons vertically on small screens */
@media (max-width: 768px) {
  #application_tabs {
    flex-direction: column;
    align-items: stretch;
  }

  #application_tabs li.titletabs {
    width: 100%;
    margin-right: 0;
    margin-bottom: 0.5rem;
  }

  #application_tabs li.titletabs::after,
  #application_tabs li.titletabs::before {
    display: none;
  }
}
