/*
 * Admin panel — the rules used only by the admin layout and the pages under
 * app/views/admin/. Not admin-only delivery: `stylesheet_link_tag :app` links
 * every file in this directory, so these reach every page. The split is for
 * reading.
 *
 * The admin layout also uses `body`, `.flash`, `.button`, and `.button_to` from
 * application.css. `.admin-nav .button` below overrides `.button` on
 * specificity, not on link order — propshaft promises no order, so a same-
 * selector override across the two files would be a coin flip.
 */
.admin-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0.75rem 1.5rem;
  background: #1a1a1a;
  color: #fff;
}

.admin-nav__brand {
  font-weight: 600;
}

.admin-nav__sections {
  display: flex;
  gap: 1.25rem;
  /* Pushes sign-out to the far right, whatever the section count. */
  margin-right: auto;
}

.admin-nav__link {
  color: #e8e8e8;
  text-decoration: none;
}

.admin-nav__link:hover {
  color: #fff;
  text-decoration: underline;
}

/* Inverts the shared .button, which is dark on light. */
.admin-nav .button {
  padding: 0.25rem 0.75rem;
  border-color: #fff;
  background: transparent;
  font-size: 0.875rem;
}

.admin-nav .button_to {
  margin: 0;
}

.admin-page {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.admin-page h1 {
  margin-top: 0;
  font-size: 1.5rem;
}

.admin-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.admin-page-header h1 {
  margin: 0;
}

/* A location and its company frequently share a name, and the two pages are the
   same shape, so the title alone does not say what is being looked at. */
.admin-record__kind {
  margin: 0 0 0.15rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #777;
}

.admin-record__kind + h1 {
  margin-top: 0;
}

.admin-page h2 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #666;
}

/* The break between the users index's two tables — only an h2 that directly
   follows a table gets it, so show pages' headings are untouched. */
.admin-table + h2 {
  margin-top: 3rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid #dcdfe4;
  border-radius: 8px;
  /* Keeps the striping inside the rounded corners. */
  overflow: hidden;
}

.admin-table th,
.admin-table td {
  padding: 0.6rem 0.9rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #e6e8ec;
}

.admin-table th {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #666;
  background: #f0f2f5;
}

.admin-table tbody tr:nth-child(even) {
  background: #fafbfc;
}

.admin-table tbody tr:last-child td {
  border-bottom: none;
}

.admin-table__empty {
  color: #777;
}

.admin-attributes {
  margin: 0;
  padding: 0.25rem 0;
  background: #fff;
  border: 1px solid #dcdfe4;
  border-radius: 8px;
}

.admin-attributes__row {
  display: flex;
  gap: 1rem;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid #e6e8ec;
}

.admin-attributes__row:last-child {
  border-bottom: none;
}

.admin-attributes__label {
  flex: 0 0 12rem;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #666;
}

.admin-attributes__value {
  margin: 0;
}

/* Monospace so a UUID can be compared by eye against the Chargebee sandbox. */
.admin-attributes__value--identifier {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.875rem;
}

.admin-related {
  margin-top: 2rem;
}

.admin-related__list {
  margin: 0;
  padding-left: 1.25rem;
}

.pagination {
  display: flex;
  gap: 1rem;
  margin: 1rem 0;
}

.event-filters {
  margin: 1.75rem 0 1.5rem;
  padding: 1rem 1.25rem;
  background: #fff;
  border: 1px solid #dcdfe4;
  border-radius: 8px;
}

.event-filters__fields {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1rem;
}

.event-filters__field {
  flex: 1 1 9rem;
}

.event-filters__actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.event-filters__field label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #666;
}

.event-filters__shape {
  display: block;
}

.event-filters__field input,
.event-filters__field select {
  box-sizing: border-box;
  width: 100%;
  font: inherit;
  padding: 0.35rem 0.5rem;
  border: 1px solid #dcdfe4;
  border-radius: 6px;
  background: #fff;
}
