/* Custom font: Fira Sans */
@font-face {
  font-family: "Fira Sans";
  src: url("../fonts/FiraSans-Light.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fira Sans";
  src: url("../fonts/FiraSans-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fira Sans";
  src: url("../fonts/FiraSans-Italic.otf") format("opentype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Fira Sans";
  src: url("../fonts/FiraSans-Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fira Sans";
  src: url("../fonts/FiraSans-MediumItalic.otf") format("opentype");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Fira Sans";
  src: url("../fonts/FiraSans-ExtraBold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fira Sans";
  src: url("../fonts/FiraSans-ExtraBoldItalic.otf") format("opentype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

body {
  --pico-font-size: 16px;
  --pico-font-family: "Fira Sans", system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  font-family: var(--pico-font-family);
}
.fade-in {
  animation: fadeIn 0.3s ease-in-out;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Navigation search moved to responsive.css */

/* navigation spacing */
nav ul {
  gap: 0.5rem;
}

/* table tweaks */
table[role="grid"] td,
table[role="grid"] th {
  white-space: nowrap;
}

/* header */

header nav a[href]:not(.button):not(.no-btn):not(:has(img)),
header nav ul li a,
header nav .nav-right a {
  /* Reset button-like rules from global styles */
  display: inline !important;
  padding: 0.6rem 1rem !important;
  min-height: 0 !important;
  border: none !important;
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  gap: 0 !important;
  align-items: baseline !important;
  transform: none !important;
  color: inherit !important;
  text-decoration: none !important;
  font-weight: 700;
  text-transform: uppercase;
}

/* Ensure hover/active don't reapply button backgrounds/borders */
header nav a[href]:not(.button):not(.no-btn):not(:has(img)):hover,
header nav ul li a:hover,
header nav .nav-right a:hover {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

li.hide-on-mobile {
  width: 250px;
}

.hide-on-mobile form {
  min-width: 300px;
}

.hide-on-mobile form input[type="search"] {
  width: 100%;
  padding: 0.4rem 0.75rem 0.4rem 2.75rem;
  border: none;
  background-color: #DFE3EB;
  color: #181C25;
}

/* top bar social icons */
.social-links-item {
  display: flex;
  justify-content: center;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.social-links img {
  max-width: 32px;
  max-height: 32px;
  width: auto;
  height: 32px;
  display: block;
}
/* keep social icon links unstyled (no pill button) */
.social-links a[href] {
  display: inline-block;
  padding: 0.5rem;
  border: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}
.social-links a[href]:hover {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

/* footer styles */
.site-footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--pico-muted-border-color, #e5e7eb);
}
.footer-nav {
  margin-bottom: 0.5rem;
}

footer small {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: start;
  margin: 1rem 1rem 1rem 0;
}

.footer-nav {
  padding: 0 1rem 0 0;
  margin: 0;
}

footer small a[href]:not(.button):not(.no-btn):not(:has(img)){
  /* Reset button-like rules from global styles */
  display: inline !important;
  padding: 0.6rem 0.3rem !important;
  min-height: 0 !important;
  border: none !important;
  background: transparent !important;
  gap: 0 !important;
  align-items: baseline !important;
  transform: none !important;
  color: inherit !important;
  text-decoration: none !important;
  font-weight: 700;
  text-transform: uppercase;
}

/* Ensure hover/active don't reapply button backgrounds/borders */
footer small a[href]:not(.button):not(.no-btn):not(:has(img)):hover {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

.inline-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.inline-list li {
  margin: 0;
}
.site-footer .social-links {
  margin-bottom: 0.5rem;
}
.site-footer small.muted {
  color: var(--pico-muted-color, #6b7280);
}

/* search suggest dropdown */
.suggest-list {
  max-height: 280px;
  overflow-y: auto;
}
.suggest-list li {
  display: block;
  white-space: normal;
  word-wrap: break-word;
  line-height: 1.4;
  min-height: 1.4em;
}
.suggest-list li:hover {
  background: var(--pico-muted-border-color, #f3f4f6);
}

/* Card styles moved to components.css */

/* navigation enhancements */
nav ul li a[href="/updates"] {
  position: relative;
  transition: color 0.2s ease;
}

nav ul li a[href="/updates"]:hover {
  color: var(--pico-primary-hover);
}



/* table polish */
table.striped thead th {
  position: sticky;
  top: 0;
  background: var(--pico-card-background-color, #fff);
  z-index: 1;
}
table.striped tr:nth-child(even) {
  background: color-mix(
    in oklab,
    var(--pico-muted-border-color, #e5e7eb) 12%,
    transparent
  );
}
table.striped td,
table.striped th {
  vertical-align: middle;
}

/* Badge styles moved to components.css */

/* team accents */
.team-amber {
  color: #b45309;
}
.team-sapphire {
  color: #1d4ed8;
}

/* headings */
h2 {
  letter-spacing: 0.2px;
}
h3 {
  letter-spacing: 0.15px;
  margin-top: 0.5rem;
}

/* minor spacing */
.muted {
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  color: var(--pico-muted-color, #6b7280);
  margin: 1rem 1rem 1rem 0.2rem;
}

.muted img {
  width: 200px;
  margin: 1rem 1rem 1rem 0;
}

a[href]:not(.button):not(.no-btn):not(:has(img)):hover {
  background: color-mix(
    in oklab,
    var(--pico-muted-border-color, #e5e7eb) 28%,
    transparent
  );
  border-color: color-mix(
    in oklab,
    var(--pico-muted-border-color, #e5e7eb) 50%,
    #64748b 50%
  );
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02), 0 2px 16px rgba(0, 0, 0, 0.04) inset;
}
a[href]:not(.button):not(.no-btn):not(:has(img)):active {
  transform: translateY(0.5px);
}

/* footer links will inherit the global link button styles */

/* filter panels */
.filter-panel {
  margin-top: 0.5rem;
}
.filter-panel > summary {
  cursor: pointer;
  list-style: none;
  user-select: none;
  font-weight: 600;
  color: var(--pico-muted-color, #6b7280);
}
.filter-panel > summary::-webkit-details-marker {
  display: none;
}
.filters-body {
  padding-top: 0.5rem;
}
.inline-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
}
.inline-filters label {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  margin: 0.25rem 0;
}

/* modal */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1000;
}
.modal[aria-hidden="false"] {
  display: block;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: saturate(140%) blur(2px);
  z-index: 1000;
}
.modal-card {
  position: relative;
  width: min(640px, 92vw);
  margin: 6vh auto;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--pico-background-color, #fff);
  border-radius: 12px;
  border: 1px solid var(--pico-muted-border-color, #e5e7eb);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.2);
  z-index: 1001;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--pico-muted-border-color, #e5e7eb);
}
.modal-body {
  padding: 0.9rem 1rem;
  overflow: auto;
  flex: 1 1 auto;
}
.modal-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 0.5rem;
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--pico-muted-border-color, #e5e7eb);
}
.modal-card .modal-actions .button {
  margin: 0;
}
.icon-button.close {
  border: none;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.stacked label {
  display: grid;
  gap: 0.25rem;
}

/* prevent background scroll when modal is open */
body.no-scroll {
  overflow: hidden;
}

/* Short viewport fallback */
@media (max-height: 540px) {
  .modal-card {
    margin: 3vh auto;
    max-height: 94vh;
  }
}

/* subtle chip-style button (used for Filters) */
.chip-button {
  font: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--pico-muted-border-color, #e5e7eb);
  background: color-mix(
    in oklab,
    var(--pico-muted-border-color, #e5e7eb) 8%,
    transparent
  );
  color: inherit;
  cursor: pointer;
}
.chip-button:hover {
  background: color-mix(
    in oklab,
    var(--pico-muted-border-color, #e5e7eb) 18%,
    transparent
  );
}
.chip-button .chev {
  opacity: 0.7;
  font-size: 0.95em;
}

/* Ensure social icon links remain unstyled buttons (placed after global link styles for cascade) */
.social-links a[href] {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 8px !important;
  gap: 0 !important;
  transform: none !important;
  text-decoration: none !important;
}
.social-links a[href]:hover {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  text-decoration: none !important;
}
