/* ArcGIS Patch Notify - app styles layered over caco3.css */

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

/* The browse page's table needs room - widen its container. (Browsers without
   :has() support just keep the standard width.) */
.container:has(#patch-table) {
  max-width: 1500px;
}

.hero {
  text-align: center;
  padding: 2.5rem 0 1.5rem;
}

.hero h1 {
  margin-bottom: 0.5rem;
}

.hero p {
  max-width: 560px;
  margin: 0 auto;
}

.muted {
  color: var(--caco3-color-text-3, #6a6a6a);
  font-size: 0.875rem;
}

.form-section {
  margin-top: 1.5rem;
}

.form-section + .form-section {
  margin-top: 2rem;
}

/* Subscription row editor */
.sub-rows {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.sub-row {
  display: grid;
  grid-template-columns: 1fr 140px auto auto;
  gap: 0.75rem;
  align-items: center;
}

/* CaCO3's form margins are for stacked layouts; inside a row the grid gap
   provides the spacing. The selectors are deliberately specific enough to beat
   caco3's label:has(input[type="checkbox"]) rule, which otherwise keeps its
   bottom margin and pushes the checkbox off-centre. */
.sub-row > select,
.sub-row > button,
.sub-row > label.checkbox,
.sub-row > label:has(input[type="checkbox"]) {
  margin-block-end: 0;
  margin-block-start: 0;
  align-self: center;
}

.sub-row > label.checkbox {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  font-size: 0.875rem;
  line-height: 1;
}

/* The icon-only delete button: same 32px square as caco3 selects, icon centred */
.sub-row > button[data-icon-only] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  block-size: 32px;
}

@media (max-width: 640px) {
  .sub-row {
    grid-template-columns: 1fr;
  }
}

.actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-top: 1rem;
  flex-wrap: wrap;
}

/* Browse page: filter bar (same margin-reset approach as .sub-row) */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  margin-bottom: 1.25rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  min-width: 160px;
}

.filter-bar .filter-group select {
  margin-block-end: 0;
}

.filter-bar .filter-clear button {
  margin-block-end: 0;
}

/* Browse page: table cell decorations */
.version-chip {
  display: inline-block;
  padding: 1px 8px;
  border: 1px solid var(--caco3-color-border-1, #dfdfdf);
  border-radius: 10px;
  font-size: 0.8125rem;
  white-space: nowrap;
}

.badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 0.6875rem;
  color: #ffffff;
  white-space: nowrap;
}

.badge-critical {
  background: #d83020;
}

.badge-security {
  background: #a80000;
}

.plat-cell i {
  font-size: 1.1rem;
}

.plat-win   { color: #0078d4; }
.plat-linux { color: #dd8800; }
.plat-mac   { color: #6e6e6e; }
.plat-other { color: #a0aec0; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Static content pages (about, privacy) */
.prose {
  max-width: 680px;
  margin: 1.5rem auto 0;
}

.prose h1 {
  margin-bottom: 1rem;
}

.prose h2 {
  margin: 1.75rem 0 0.5rem;
}

.prose p,
.prose ul {
  margin-bottom: 0.75rem;
}

.prose li {
  margin-bottom: 0.35rem;
}

/* Centered message card (magic link results, errors) */
.message-card {
  max-width: 480px;
  margin: 4rem auto;
  text-align: center;
  padding: 2rem;
  border: 1px solid var(--caco3-color-border-1, #dfdfdf);
  border-radius: 4px;
}

.message-card .icon {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 1rem;
  display: block;
}

.page-footer {
  text-align: center;
  margin-top: 3rem;
  font-size: 0.75rem;
  opacity: 0.6;
}

.danger-zone {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--caco3-color-border-1, #dfdfdf);
}
