.banner-image {
  background-image:
    linear-gradient(rgba(2, 36, 84, 0), rgba(2, 36, 84, 0.9)),
    image-set(
      var(--banner-webp) type("image/webp"),
      var(--banner-jpg) type("image/jpeg")
    );
  background-size: cover;
  background-position: center;
}

a.link {
  color: rgb(37, 99, 235);
}

a.link:hover {
  text-decoration: underline;
}

details > summary::-webkit-details-marker {
  display: none;
}

body > header img {
  width: auto !important;
  height: auto !important;
  max-height: 56px;
  object-fit: contain;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  body > header img {
    max-height: 64px;
  }
}

/* Triangle buttons for first/last page */
.triangle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  transition:
    background-color 0.15s,
    color 0.15s,
    border-color 0.15s;
  width: 36px;
  height: 36px;
  background: #ffffff;
}

.triangle-btn-active {
  background: #ffffff;
}

.triangle-btn-active:hover {
  background: #f9fafb;
}

.triangle-btn-active:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.triangle-btn-disabled {
  background: #f3f4f6;
  border-color: #e5e7eb;
  cursor: not-allowed;
}

.triangle-left,
.triangle-right {
  width: 0;
  height: 0;
}

.triangle-left {
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-right: 10px solid #374151;
}

.triangle-right {
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 10px solid #374151;
}

.triangle-btn-disabled .triangle-left {
  border-right-color: #9ca3af;
}

.triangle-btn-disabled .triangle-right {
  border-left-color: #9ca3af;
}

/* down when closed, up when open */
#toggleAdvanced #advChevron {
  transition: transform 0.2s ease;
}

/* rotate the base down-chevron to point up */
#toggleAdvanced[aria-expanded="true"] #advChevron {
  transform: rotate(180deg);
}

/* Date picker styling */
.w-full[type="date"],
input[type="date"].w-full,
input[type="date"],
input[type="datetime-local"],
input[type="month"],
input[type="time"] {
  background-color: #3f5d8f !important;
  color: #ffffff !important;
  border: 1px solid #4d6a96 !important;
  border-radius: 0.375rem !important;
  padding: 0.5rem 0.75rem !important;
  height: 48px !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

/* Advanced filters area inputs override */
#advancedFilters input[type="text"],
#advancedFilters input[type="date"],
#advancedFilters input[type="datetime-local"],
#advancedFilters input[type="month"],
#advancedFilters input[type="time"],
#advancedFilters select {
  background-color: #26436b !important;
}

/* On focus, use stronger blue ring */
input[type="date"]:focus,
input[type="datetime-local"]:focus,
input[type="month"]:focus,
input[type="time"]:focus {
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(77, 106, 150, 0.18) !important;
  border-color: #4d6a96 !important;
}

/* Chrome and Edge support */
input[type="date"]::-webkit-clear-button,
input[type="date"]::-webkit-inner-spin-button,
input[type="date"]::-webkit-outer-spin-button {
  -webkit-appearance: none !important;
  display: none !important;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer !important;
  filter: invert(1) sepia(0.2) saturate(0.6) hue-rotate(180deg) brightness(0.95) !important;
  width: 1.2em !important;
  height: 1.2em !important;
}

/* Firefox support */
input[type="date"] {
  accent-color: #4d6a96 !important;
}

input[type="date"]::placeholder {
  color: rgba(255, 255, 255, 0.85) !important;
  opacity: 1 !important;
}

/* Country input placeholder colour white */
#countryInput::placeholder {
  color: #ffffff !important;
  opacity: 1 !important;
}

#countryInput:-ms-input-placeholder {
  color: #ffffff !important;
}

#countryInput::-ms-input-placeholder {
  color: #ffffff !important;
}

#countryInput::-webkit-input-placeholder {
  color: #ffffff !important;
}

/* Decision number & title placeholders white */
input[name="decision_number"]::placeholder,
input[name="decision_title"]::placeholder {
  color: #ffffff !important;
  opacity: 1 !important;
}

/* Ensure table view stays fully visible */
#tableView {
  overflow-x: visible !important;
  overflow-y: visible !important;
  max-height: none !important;
}

input[name="decision_number"]:-ms-input-placeholder,
input[name="decision_title"]:-ms-input-placeholder {
  color: #ffffff !important;
}

input[name="decision_number"]::-ms-input-placeholder,
input[name="decision_title"]::-ms-input-placeholder {
  color: #ffffff !important;
}

input[name="decision_number"]::-webkit-input-placeholder,
input[name="decision_title"]::-webkit-input-placeholder {
  color: #ffffff !important;
}

/* hide everything except the table for print */
@media print {
  #filtersForm,
  #viewToggles,
  #cardView,
  #pagerWrap,
  header,
  footer,
  nav,
  .banner-view {
    display: none !important;
  }

  #tableView {
    display: block !important;
    box-shadow: none !important;
  }
}
