/* Django components adapted from UW Theme 2.14.0 patterns. Application overrides follow. */

select:not([multiple]) {
  appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23646569' d='M6 9L1 4h10z'/%3E%3C/svg%3E") right 1rem center / 12px no-repeat;
  padding: 0.75rem 2.5rem 0.75rem 1rem;
  font-size: 1rem;
  line-height: normal;
}

:root{
  --uw-card-radius:.5rem;
}

.uw-card{
  display: flex;
  flex-direction: column;
  flex-basis: auto;
  max-width: 100%;
  min-width: 0;
  padding: 0;
  background: var(--wp--custom--color--base, #fff);
  border-radius: var(--uw-card-radius);
  box-shadow: var(--wp--preset--shadow--button-shadow);
  overflow:hidden;
}

/* Legacy template names use the v2 surface without changing application markup.
   Keep overflow visible for forms, popovers, and wide table scroll wrappers. */
.uw-content-box,
.uw-sidebar-box {
  background-color: var(--wp--custom--color--base);
  border-bottom-width: 0;
  border-right-width: 0;
  border-radius: var(--wp--custom--border-radius--8);
  box-shadow: var(--wp--preset--shadow--button-shadow);
  padding: var(--wp--custom--spacing--32);
  min-width: 0;
}

.uw-sidebar-box {
  border-top-width: 0;
  border-left-width: 0;
}

.uw-content-box.uw-content-box-bleed {
  padding: 0 0 var(--wp--custom--spacing--32);
}

.uw-content-box.uw-content-box-bleed > :not(.bleed) {
  padding-inline: var(--wp--custom--spacing--32);
}

@media print {
  .uw-card,
  .uw-content-box,
  .uw-sidebar-box {
    box-shadow: none;
  }
}

.uw-card img{display:block;width:100%;height:auto}
.uw-card-content{padding:var(--wp--custom--spacing--32);flex:1}
.uw-card-label{font-size:.875rem;text-transform:uppercase;letter-spacing:.075em;margin-bottom:.75rem;color:var(--wp--custom--color--primary-dark,#0b3b74)}
.uw-card-title{margin:0 0 0.75rem 0;font-size:var(--uwFontSizeXL)}
.uw-card-text{margin-bottom:1rem}
.uw-card-meta{font-size:1rem;color:var(--wp--custom--color--text-medium)}
.uw-card-actions{display:flex;flex-wrap:wrap;align-items:center;gap:var(--wp--custom--spacing--16);padding:0 var(--wp--custom--spacing--32) var(--wp--custom--spacing--32)}

.uw-hero{position:relative;background-size:cover;background-position:center;color:#fff;min-height:320px;display:flex;align-items:center}
.uw-hero-overlay{position:absolute;inset:0;background:linear-gradient(180deg, rgba(0,0,0,0.15) 24%, rgb(0,0,0) 100%)}
.uw-hero-content{position:relative;z-index:1;max-width:var(--uw-content-width);min-width:0;margin:0 auto;padding:var(--wp--custom--spacing--48) var(--wp--custom--spacing--32);text-align:center}
.uw-hero-title{margin:0 0 1rem 0;font-size:var(--uwFontSize3XL);font-weight:700}
.uw-hero-subtitle{font-size:var(--wp--custom--font-size--20);margin-bottom:var(--wp--custom--spacing--24)}
.uw-hero-text a:not(.uw-button){color:var(--wp--custom--color--white);text-decoration:underline}
.uw-hero-text a:not(.uw-button):hover,.uw-hero-text a:not(.uw-button):focus-visible{color:var(--wp--custom--color--contrast-medium)}
.uw-hero-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:var(--wp--custom--spacing--24)}

.entry-header{margin-bottom:1.25rem}
.entry-title{margin:0 0 .75rem 0}
.entry-meta{font-size:1rem;color:var(--wp--custom--color--text-medium)}
.entry-content a:not(.uw-button){text-decoration:underline}
.entry-content a:not(.uw-button):hover,.entry-content a:not(.uw-button):focus-visible{color:var(--wp--custom--color--secondary-dark)}

.uw-link{color:var(--wp--custom--color--secondary);text-decoration:underline;text-underline-offset:2px}
.uw-link:hover,.uw-link:focus-visible{color:var(--wp--custom--color--secondary-dark)}

html, body {
  height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

footer.uw-footer {
  margin-top: auto;
}

/* Give data-heavy desktop pages room while preserving explicitly narrow layouts. */
@media (min-width: 48.01em) {
  .uw-row:not(.uw-row-narrow) {
    max-width: 96rem;
  }
}

.uw-footer-crest-svg {
  display: block;
  margin: 0 auto;
}

.list-page-actions {
  align-items: stretch;
}

@media (max-width: 48em) {
  .uw-col,
  .uw-row,
  .uw-row.uw-row-narrow,
  .uw-full-row {
    max-width: 100%;
    min-width: 0;
  }

  .uw-content-box {
    padding: 1rem 1rem 1.25rem;
  }

  #uw-top-menus .uw-nav-menu a,
  #uw-top-menus .uw-dropdown-toggle {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  #uw-top-menus.uw-stacked .uw-nav-menu {
    background-color: var(--color-uw-red);
  }

  #uw-top-menus.uw-stacked .uw-nav-menu a,
  #uw-top-menus.uw-stacked .uw-dropdown-toggle {
    color: #fff;
  }

  #uw-top-menus.uw-stacked .uw-nav-menu a:hover,
  #uw-top-menus.uw-stacked .uw-nav-menu a:focus-visible,
  #uw-top-menus.uw-stacked .uw-dropdown-toggle:hover,
  #uw-top-menus.uw-stacked .uw-dropdown-toggle:focus-visible {
    background-color: #9b0008;
    border-bottom-color: #fff;
  }

  .uw-footer-content > div {
    padding-left: 1rem;
    padding-right: 1rem;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }

  .uw-footer-content {
    justify-content: center;
    row-gap: 0.75rem;
  }

  .uw-footer a.uw-footer-stand-out-link .no-break,
  .uw-nowrap {
    white-space: normal;
  }

  .uw-footer a,
  .uw-contact-item,
  .uw-copyright p {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .uw-body form .flex.flex-wrap > input[style*="min-width"],
  .uw-body form .flex.flex-wrap > select[style*="min-width"],
  .uw-body form .flex.flex-wrap > a.uw-button[style*="min-width"],
  .uw-body form .flex.flex-wrap > button.uw-button[style*="min-width"] {
    min-width: 0 !important;
    width: 100%;
    flex: 1 1 100%;
  }

  .list-page-actions .uw-button {
    width: 100%;
  }
}
