.court-dates {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    margin-top: 5em;
}

.court-date-list {
  font-family: "Roboto Condensed", Arial, sans-serif;
  line-height: 1.45;
    margin-top: 1em;
}

.court-date-group + .court-date-group {
  margin-top: 1.25rem;
}

.court-date-heading {
  margin: 0 0 0.35rem;
  font-size: inherit;
  font-weight: inherit;
}

.court-date-officers {
  margin: 0;
  padding-left: 1.75rem;
  list-style-type: disc;
}

.court-date-officer {
  margin-bottom: 0.75rem;
}

.court-date-officer-link {
  cursor: pointer;
  -webkit-tap-highlight-color: rgba(0, 102, 204, 0.2);
}

.court-date-officer-link:hover .court-date-officer-header {
  color: #004499;
}

.court-date-officer-header {
  font-weight: 600;
  color: #0066cc;
  text-decoration: underline;
}

.court-date-officer-agency,
.court-date-officer-detail {
  margin-top: 0.15rem;
}

/* Court event detail modal (see showCourtEventModal in court_date_list.js) */
.court-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.court-modal-box {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 400px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.court-modal-box--wide {
  max-width: min(920px, calc(100vw - 32px));
}

.court-modal-close {
  margin-top: 12px;
  cursor: pointer;
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 16px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #f5f5f5;
  touch-action: manipulation;
}

.court-modal-close:active {
  background: #e8e8e8;
}

.court-modal-body {
  font-family: sans-serif;
}

.court-modal-field {
  margin-bottom: 12px;
}

.court-modal-field:last-child {
  margin-bottom: 0;
}

.court-modal-label {
  font-weight: bold;
  margin-bottom: 2px;
}

.court-modal-value {
  margin: 0;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.court-modal-officer-link {
  color: #0066cc;
  text-decoration: underline;
  cursor: pointer;
  -webkit-tap-highlight-color: rgba(0, 102, 204, 0.2);
}

.court-modal-charges-wrap {
  overflow-x: auto;
  max-width: 100%;
  margin-top: 12px;
  -webkit-overflow-scrolling: touch;
}

.court-modal-charges-table {
  border-collapse: collapse;
  font-size: 13px;
  white-space: nowrap;
}

.court-modal-charges-table th,
.court-modal-charges-table td {
  border: 1px solid #ddd;
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
}

.court-modal-charges-table th {
  background: #f5f5f5;
  font-weight: bold;
}

@media (max-width: 480px) {
  .court-modal-overlay {
    align-items: flex-start;
  }

  .court-modal-box,
  .court-modal-box--wide {
    padding: 16px;
    margin-top: 0;
    max-width: calc(100vw - 32px);
  }
}
