/* Records requests on the emergency-hospital directory. */
.tah-records-trigger {
  align-self: flex-start;
  width: auto;
  min-height: 44px;
  margin-top: 12px;
  padding: 8px 16px;
  border: 1px solid #a62f36;
  border-radius: 6px;
  background: #a62f36;
  color: #fff;
  font: inherit;
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
}

.tah-records-trigger:hover,
.tah-records-trigger:focus {
  border-color: #84252b;
  background: #84252b;
  color: #fff;
}

#tah-records-panel[hidden],
#tah-records-result[hidden] {
  display: none !important;
}

.tah-records-panel {
  padding: 0 0 48px;
  background: #f4f9f7;
  scroll-margin-top: 190px;
}

.tah-records-card {
  max-width: 900px;
  margin: 0 auto;
  padding: 30px;
  border: 1px solid #dbe8e2;
  border-top: 4px solid #245a4a;
  border-radius: 10px;
  background: #fff;
  color: #304a43;
  box-shadow: 0 6px 20px rgba(30, 58, 47, .06);
}

.tah-records-card h2 {
  margin: 0 0 10px;
  color: #245a4a;
  font-size: 1.8rem;
  line-height: 1.25;
}

.tah-records-hospital {
  margin-bottom: 12px;
}

.tah-records-help,
.tah-records-label-note {
  color: #596c65;
  font-size: .9rem;
  line-height: 1.5;
}

.tah-records-label-note {
  font-weight: 400;
}

.tah-records-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 24px;
  margin: 24px 0;
}

.tah-records-field {
  min-width: 0;
}

.tah-records-field label {
  display: block;
  margin-bottom: 7px;
  color: #304a43;
  font-weight: 700;
  line-height: 1.5;
}

.tah-records-input {
  display: block;
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #aebfb6;
  border-radius: 6px;
  background: #fff;
  color: #263c33;
  font: inherit;
  font-size: 1rem;
  line-height: 1.5;
}

.tah-records-input[aria-invalid="true"] {
  border: 2px solid #a62f36;
}

.tah-records-trigger:focus-visible,
.tah-records-panel :is(input, button, a):focus-visible {
  outline: 3px solid #175948 !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 3px #fff !important;
}

.tah-records-security {
  min-width: 0;
  margin: 0 0 24px;
  padding: 18px;
  border: 1px solid #dbe8e2;
  border-radius: 8px;
  background: #f7f9f8;
}

.tah-records-security legend {
  width: auto;
  margin: 0;
  padding: 0 6px;
  color: #245a4a;
  font-size: 1rem;
  font-weight: 700;
}

.tah-records-security-checks {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 20px 28px;
}

.tah-records-math {
  flex: 1 1 220px;
}

.tah-records-math-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.tah-records-math .tah-records-input {
  width: 82px;
}

.tah-records-primary,
.tah-records-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 18px;
  border: 1px solid #245a4a;
  border-radius: 6px;
  font: inherit;
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.5;
  cursor: pointer;
}

.tah-records-primary {
  background: #245a4a;
  color: #fff;
}

.tah-records-primary:hover:not(:disabled) {
  border-color: #183e33;
  background: #183e33;
}

.tah-records-secondary {
  background: #fff;
  color: #245a4a;
}

.tah-records-secondary:hover:not(:disabled) {
  background: #e7f3ed;
}

.tah-records-panel :disabled,
.tah-records-trigger:disabled {
  cursor: not-allowed;
  opacity: .6;
}

.tah-records-status {
  margin: 0 0 18px;
  color: #304a43;
  overflow-wrap: anywhere;
}

.tah-records-status:empty {
  display: none;
}

.tah-records-status.is-error,
.tah-records-error {
  color: #a62f36;
}

.tah-records-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tah-records-result {
  margin-top: 20px;
  padding: 18px;
  border-left: 4px solid #245a4a;
  border-radius: 6px;
  background: #e7f3ed;
  color: #245a4a;
  overflow-wrap: anywhere;
}

.tah-records-noscript {
  margin-top: 24px;
  color: #304a43;
}

@media (max-width: 767px) {
  .tah-records-panel {
    scroll-margin-top: 100px;
  }

  .tah-records-card {
    padding: 22px;
  }

  .tah-records-fields {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
}

@media (max-width: 375px) {
  .tah-records-card {
    padding: 18px;
  }

  .tah-records-security {
    padding: 12px;
  }
}