/* Lochaber Weather - World Earthquakes page (wxquake.php), Nov 2026 */

.qw-intro { color: var(--muted); max-width: 80ch; }
.qw-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.qw-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 18px 0 16px; }
.qw-tile { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; min-width: 0; }
.qw-tile span { display: block; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.qw-tile strong { display: block; font: 600 1.6rem/1.2 "Space Grotesk", Inter, sans-serif; font-variant-numeric: tabular-nums; }
.qw-tile em { display: block; font-style: normal; font-size: .85rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.qw-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 16px; padding: 16px 18px; margin: 0 0 16px; min-width: 0; }
.qw-mapcard { padding: 8px; }
#qw-map { height: 560px; border-radius: 11px; background: var(--surface); }
#qw-map .leaflet-popup-content { font-size: 13px; line-height: 1.45; }
.qw-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 10px 8px 4px; font-size: .8rem; color: var(--muted); }
.qw-leg-title { font-weight: 600; color: var(--text); margin-left: 6px; }
.qw-dot { display: inline-block; border-radius: 50%; vertical-align: middle; margin-right: 5px; border: 1px solid rgba(58,42,16,.8); background: #f2c744; }
.qw-sz1 { width: 6px; height: 6px; } .qw-sz2 { width: 13px; height: 13px; } .qw-sz3 { width: 18px; height: 18px; } .qw-sz4 { width: 24px; height: 24px; } .qw-sz5 { width: 30px; height: 30px; }
.qw-age1 { width: 12px; height: 12px; background: #e0322b; } .qw-age2 { width: 12px; height: 12px; background: #f08a24; } .qw-age3 { width: 12px; height: 12px; background: #f2c744; } .qw-age4 { width: 12px; height: 12px; background: #9b7fd1; }

.qw-listhead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.qw-listhead h2 { margin: 0; font-size: 1.15rem; }
.qw-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.qw-filters button {
  font: inherit; font-size: .85rem; padding: 5px 12px; border-radius: 999px; cursor: pointer;
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
}
.qw-filters button:hover { border-color: var(--accent); }
.qw-filters button.is-on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }

.qw-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.qw-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.qw-table th, .qw-table td { padding: 9px 10px; border-top: 1px solid var(--border); text-align: left; vertical-align: top; }
.qw-table thead th { border-top: 0; color: var(--muted); font-size: .76rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.qw-table tbody tr:hover { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.qw-num { white-space: nowrap; }
.qw-when { white-space: nowrap; }
.qw-when span, .qw-num span:not(.qw-dir) { display: block; color: var(--muted); font-size: .78rem; }
.qw-dir { color: var(--muted); font-size: .85em; }
.qw-place { min-width: 180px; }
.qw-go { all: unset; cursor: pointer; font-weight: 600; color: var(--link); }
.qw-go:hover, .qw-go:focus-visible { text-decoration: underline; }
.qw-go:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.qw-note { display: block; color: var(--muted); font-size: .82rem; }
.qw-felt { display: inline-block; margin-top: 3px; padding: 1px 8px; border-radius: 999px; font-size: .74rem; font-weight: 600;
  background: var(--warn-bg); color: var(--warn-text); border: 1px solid var(--warn-line); }
.qw-link { white-space: nowrap; font-size: .85rem; }

.qw-mag {
  display: inline-grid; place-items: center; min-width: 40px; height: 30px; padding: 0 6px; border-radius: 8px;
  font-weight: 700; font-size: .95rem; color: #2b1d05;
}
.qw-mag.m3 { background: #f2c744; }
.qw-mag.m4 { background: #f08a24; }
.qw-mag.m5 { background: #e0322b; color: #fff; }
.qw-mag.m6 { background: #7a1020; color: #fff; }
.qw-mag.qw-big { min-width: 58px; height: 46px; font-size: 1.35rem; border-radius: 12px; }

.qw-empty { color: var(--muted); padding: 10px; }
.qw-notes { margin: 12px 0 0; font-size: .82rem; color: var(--muted); }
.qw-foot { font-size: .82rem; color: var(--muted); margin: 6px 0 10px; }

@media (max-width: 900px) {
  .qw-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #qw-map { height: 440px; }
}
@media (max-width: 600px) {
  .qw-card { padding: 14px 12px; }
  #qw-map { height: 360px; }
  .qw-table thead { display: none; }
  .qw-table, .qw-table tbody { display: block; }
  .qw-table tr { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 10px; padding: 10px 2px; border-top: 1px solid var(--border); }
  .qw-table tr[hidden] { display: none; }
  .qw-table td { border: 0; padding: 0; }
  .qw-table td:nth-child(1) { grid-row: 1 / span 3; }
  .qw-table td:nth-child(2) { grid-column: 2 / span 2; }
  .qw-table td:nth-child(3) { grid-column: 2; }
  .qw-table td:nth-child(4) { display: none; }
  .qw-table td:nth-child(5) { grid-column: 3; grid-row: 2; text-align: right; }
  .qw-table td:nth-child(6) { grid-column: 2 / span 2; }
}

/* Significant earthquakes */
.qw-card h2 { margin: 0 0 4px; font-size: 1.15rem; }
.qw-sub { margin: 0 0 12px; color: var(--muted); font-size: .88rem; }
.qw-sig { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.qw-sigcard { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.qw-sigcard h3 { margin: 2px 0 4px; font-size: 1rem; line-height: 1.3; }
.qw-sigcard p { margin: 0 0 6px; font-size: .85rem; color: var(--muted); }
.qw-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.qw-tags a { font-size: .82rem; }
.qw-tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .74rem; font-weight: 600; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }
.qw-tag.is-sig { background: #9b7fd1; border-color: #9b7fd1; color: #fff; vertical-align: 1px; }
.qw-alert { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .74rem; font-weight: 700; }
.qw-alert.is-green { background: #2e9e5b; color: #fff; }
.qw-alert.is-yellow { background: #f2c744; color: #2b1d05; }
.qw-alert.is-orange { background: #f08a24; color: #2b1d05; }
.qw-alert.is-red { background: #c4161c; color: #fff; }

.qw-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.qw-sort { font-size: .85rem; color: var(--muted); }
.qw-sort select { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 4px 8px; margin-left: 4px; }
.qw-more { text-align: center; margin: 12px 0 0; }
.qw-more button { font: inherit; padding: 6px 18px; border-radius: 999px; cursor: pointer; background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.qw-more button:hover { border-color: var(--accent); }
