/* emergency-resources.css  v4.0 */

/* ============================================================
   PAGE LAYOUT
   ============================================================ */
.emergency-main {
  padding-top: 70px;
  min-height: 100vh;
}

.emergency-container {
  max-width: 780px;
  margin: 0 auto;
  padding: 4rem 2rem 7rem;
}

/* ============================================================
   HERO  — calm, not alarming
   ============================================================ */
.emergency-hero {
  padding: 3.5rem 0 2.5rem;
  margin-bottom: 2rem;
}

.emergency-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.5px;
  line-height: 1.15;
  margin-bottom: 0.875rem;
}

.emergency-subtitle {
  font-size: 1rem;
  color: #888;
  line-height: 1.75;
  max-width: 600px;
}

/* ============================================================
   CALLOUT  — emergency number strip
   ============================================================ */
.emergency-callout {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  background: rgba(180, 22, 22, 0.05);
  border: 1px solid rgba(180, 22, 22, 0.2);
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  margin-bottom: 2rem;
}

.emergency-callout-icon {
  color: #b41616;
  flex-shrink: 0;
  margin-top: 1px;
}

.emergency-callout-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.2rem;
}

.emergency-callout-body {
  font-size: 0.82rem;
  color: #999;
  line-height: 1.6;
  margin: 0;
}

.emergency-callout-body strong {
  color: #e0e0e0;
  font-weight: 700;
}

/* ============================================================
   FILTER BAR  — dropdown + search, same height
   ============================================================ */
.er-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

/* ── Custom dropdown ── */
.er-dropdown-wrap {
  position: relative;
  flex-shrink: 0;
}

.er-dropdown-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  height: 40px;
  padding: 0 0.875rem 0 0.75rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: #d0d0d0;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
  min-width: 200px;
}

.er-dropdown-btn:hover,
.er-dropdown-btn[aria-expanded="true"] {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.18);
}

.er-dropdown-btn-inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  overflow: hidden;
}

.er-dropdown-btn-inner svg {
  color: #b41616;
  flex-shrink: 0;
}

.er-dropdown-flag {
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
}

.er-dropdown-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #d0d0d0;
}

.er-dropdown-btn > svg { /* chevron */
  color: rgba(255,255,255,0.3);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.er-dropdown-btn[aria-expanded="true"] > svg {
  transform: rotate(180deg);
}

.er-dropdown-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 100%;
  max-height: 320px;
  overflow-y: auto;
  background: #1c1c1c;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 0.35rem;
  list-style: none;
  z-index: 200;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}

.er-dropdown-list::-webkit-scrollbar { width: 4px; }
.er-dropdown-list::-webkit-scrollbar-track { background: transparent; }
.er-dropdown-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.er-dropdown-option {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.625rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.12s;
  font-size: 0.85rem;
  color: #aaa;
}

.er-dropdown-option:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
}

.er-dropdown-option.selected {
  color: #fff;
  background: rgba(180,22,22,0.1);
}

.er-dropdown-option-flag {
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
}

.er-dropdown-option-name {
  flex: 1;
}

.er-dropdown-check {
  color: #b41616;
  flex-shrink: 0;
  visibility: hidden;
}

.er-dropdown-option.selected .er-dropdown-check {
  visibility: visible;
}

/* ── Search input ── */
.er-search-wrap {
  position: relative;
  flex: 1;
  min-width: 160px;
}

.er-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.2);
  pointer-events: none;
  display: flex;
}

.er-search-input {
  width: 100%;
  height: 40px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: #fff;
  font-size: 0.85rem;
  font-family: inherit;
  padding: 0 2.25rem 0 2.25rem;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  /* Kill browser native clear button */
  -webkit-appearance: none;
  appearance: none;
}

.er-search-input::-webkit-search-cancel-button,
.er-search-input::-webkit-search-decoration {
  -webkit-appearance: none;
  display: none;
}

.er-search-input::placeholder { color: rgba(255,255,255,0.2); }

.er-search-input:focus {
  border-color: rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
}

.er-search-clear {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255,255,255,0.25);
  cursor: pointer;
  padding: 0.2rem;
  display: flex;
  align-items: center;
  border-radius: 4px;
  transition: color 0.15s;
}

.er-search-clear:hover { color: rgba(255,255,255,0.6); }

/* ── Auto-detect note ── */
.er-detect-note {
  width: 100%;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.25);
  margin-top: -0.1rem;
}

.er-note-dismiss {
  background: none;
  border: none;
  color: rgba(255,255,255,0.35);
  font-size: 0.75rem;
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.er-note-dismiss:hover { color: rgba(255,255,255,0.6); }

/* ============================================================
   SECTION STRUCTURE
   ============================================================ */
.er-section {
  margin-bottom: 3rem;
}

.er-section-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #e0e0e0;
  margin-bottom: 0.35rem;
}

.er-section-header svg {
  color: #b41616;
  flex-shrink: 0;
}

.er-section-desc {
  font-size: 0.85rem;
  color: #666;
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

/* ============================================================
   RESOURCE ROW  — clean list item, not a card
   ============================================================ */
.er-row {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background 0.15s;
}

.er-row:first-child {
  border-top: 1px solid rgba(255,255,255,0.05);
}

.er-row-name {
  display: flex;
  align-items: baseline;
  gap: 0.625rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.25rem;
  flex-wrap: wrap;
}

.er-row-avail {
  font-size: 0.68rem;
  font-weight: 700;
  color: #34d399;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.er-row-avail::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  background: #34d399;
  border-radius: 50%;
  flex-shrink: 0;
}

.er-row-desc {
  font-size: 0.82rem;
  color: #777;
  line-height: 1.6;
  margin-bottom: 0.625rem;
}

/* Contact pills */
.er-row-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.er-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #888;
  white-space: nowrap;
  text-decoration: none;
}

.er-pill svg { flex-shrink: 0; }

.er-pill--link {
  color: #aaa;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  cursor: pointer;
}

.er-pill--link:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.16);
  color: #fff;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.er-empty-state {
  padding: 1.5rem 0;
  font-size: 0.85rem;
  color: #555;
}

.er-empty-state p {
  margin-bottom: 0.625rem;
}

.er-empty-global-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  color: #888;
  font-size: 0.8rem;
  font-family: inherit;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.er-empty-global-btn:hover {
  border-color: rgba(255,255,255,0.18);
  color: #ccc;
}

/* ============================================================
   NOTICE
   ============================================================ */
.er-notice {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: rgba(255,255,255,0.015);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  margin-top: 2rem;
}

.er-notice svg {
  color: rgba(255,255,255,0.2);
  flex-shrink: 0;
  margin-top: 2px;
}

.er-notice p {
  font-size: 0.78rem;
  color: #555;
  line-height: 1.7;
  margin-bottom: 0.3rem;
}

.er-notice p:last-child { margin-bottom: 0; }

.er-notice a {
  color: #888;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s;
}

.er-notice a:hover { color: #ccc; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
  .emergency-container { padding: 2.5rem 1.25rem 5rem; }
  .emergency-title { font-size: 2rem; }

  .er-filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .er-dropdown-btn { min-width: 0; width: 100%; }
  .er-search-wrap { min-width: 0; }

  .er-row-pills { gap: 0.3rem; }
  .er-pill { font-size: 0.75rem; padding: 0.28rem 0.6rem; }

  .emergency-callout { flex-direction: column; gap: 0.625rem; }
}
