/* public/country-list.css
 * Etherwave — All Countries list view (redesigned).
 * All rules scoped under .cl-redesigned for high
 * specificity over the existing .wallpaper-container baseline in styles.css.
 */

/* ── Container: override the white-gradient wallpaper baseline ──────────── */
.cl-redesigned {
  background-color: rgba(5, 3, 8, 0.30) !important;
  
  backdrop-filter: blur(5px) saturate(1.1) !important;
  -webkit-backdrop-filter: blur(5px) saturate(1.1) !important;
  font-family: 'Mulish', -apple-system, system-ui, sans-serif;
  color: #f0e9dd;
  /* Inherits position/size from .wallpaper-container, but we need columnar
     stretch so our top bar / controls bar span the full width. */
  align-items: stretch !important;
}

.cl-redesigned .cl-topbar,
.cl-redesigned .cl-controls,
.cl-redesigned .cl-items {
  width: 100%;
  align-self: stretch;
}

/* ── Top bar ──────────────────────────────────────────────────────────── */
.cl-redesigned .cl-topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 20px 28px 12px;
  gap: 16px;
  flex-shrink: 0;
}

.cl-redesigned .cl-topbar-side {
  display: flex;
  gap: 10px;
  min-width: 0;
}

.cl-redesigned .cl-topbar-right {
  justify-content: flex-end;
  position: relative;
}

.cl-redesigned .cl-topbar-title {
  text-align: center;
  min-width: 0;
}

.cl-redesigned .cl-eyebrow {
  font-size: 9px;
  letter-spacing: 0.26em;
  color: #b8963e;
  font-weight: 700;
  margin-bottom: 4px;
}

.cl-redesigned .cl-title {
  font-size: 22px !important;
  font-weight: 800 !important;
  letter-spacing: 0.01em !important;
  color: #f0e9dd !important;
  margin: 0 !important;
  line-height: 1.1 !important;
  font-family: 'Mulish', sans-serif !important;
}

/* ── Icon buttons (Home, LoadRegions, Mode) ───────────────────────────── */
.cl-redesigned .cl-icon-btn {
  width: 44px !important;
  height: 44px !important;
  background: transparent !important;
  background-color: transparent !important;
  
  border: 1px solid rgba(184, 150, 62, 0.30) !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  color: #d4af6a !important;
  cursor: pointer;
  transition: all .2s;
  padding: 0;
  margin: 0 !important;        /* override .mapicons margin-right */
  box-shadow: none !important;
  flex-shrink: 0;
}

.cl-redesigned .cl-icon-btn svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cl-redesigned .cl-icon-btn:hover {
  background: rgba(184, 150, 62, 0.14) !important;
  background-color: rgba(184, 150, 62, 0.14) !important;
  border-color: #b8963e !important;
  color: #f0e9dd !important;
  box-shadow: 0 0 18px rgba(184, 150, 62, 0.28) !important;
}

/* ── Mode dropdown menu ───────────────────────────────────────────────── */
.cl-redesigned .cl-mode-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: rgba(20, 16, 10, 0.97);
  backdrop-filter: blur(6px) saturate(120%);
  -webkit-backdrop-filter: blur(6px) saturate(120%);
  border: 1px solid rgba(184, 150, 62, 0.30);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cl-redesigned .cl-mode-menu[hidden] {
  display: none;
}

.cl-redesigned .cl-mode-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 14px;
  background: transparent;
  border: none;
  color: rgba(240, 233, 221, 0.92);
  font-family: 'Mulish', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: left;
  cursor: pointer;
  border-radius: 8px;
  transition: background .15s, color .15s;
}

.cl-redesigned .cl-mode-opt.active {
  color: #d4af6a;
  background: rgba(184, 150, 62, 0.12);
}

.cl-redesigned .cl-mode-opt:hover:not(.active):not(:disabled) {
  background: rgba(184, 150, 62, 0.06);
  color: #f0e9dd;
}

.cl-redesigned .cl-mode-opt:disabled {
  color: rgba(240, 233, 221, 0.72);
  cursor: not-allowed;
}

.cl-redesigned .cl-mode-sub {
  color: rgba(184, 150, 62, 0.60);
  font-weight: 500;
}

.cl-redesigned .cl-mode-soon {
  font-size: 9px;
  font-style: italic;
  font-weight: 600;
  color: rgba(184, 150, 62, 0.45);
  letter-spacing: 0.10em;
}

/* ── Controls bar (fixed, doesn't scroll with list) ───────────────────── */
.cl-redesigned .cl-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 28px 16px;
  flex-shrink: 0;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(184, 150, 62, 0.15);
}

/* View pills (LIST / CAROUSEL) — segmented container */
.cl-redesigned .cl-view-pills {
  display: flex;
  gap: 2px;
  background: rgba(10, 8, 6, 0.55);
  border: 1px solid rgba(184, 150, 62, 0.18);
  border-radius: 18px;
  padding: 3px;
  flex-shrink: 0;
}

.cl-redesigned .cl-view-pill {
  padding: 7px 16px !important;
  background: transparent !important;
  background-color: transparent !important;
  
  border: none !important;
  border-radius: 14px !important;
  color: rgba(240, 233, 221, 0.72) !important;
  font-family: 'Mulish', sans-serif !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.14em !important;
  cursor: pointer;
  transition: background .18s, color .18s;
  margin: 0 !important;
  box-shadow: none !important;
  width: auto !important;
  height: auto !important;
}

.cl-redesigned .cl-view-pill.active {
  background: rgba(184, 150, 62, 0.22) !important;
  background-color: rgba(184, 150, 62, 0.22) !important;
  color: #d4af6a !important;
}

.cl-redesigned .cl-view-pill:hover:not(.active) {
  color: #f0e9dd !important;
}

/* Filter input — override the existing .shortcut-input absolute positioning */
.cl-redesigned .cl-filter {
  flex: 1 !important;
  min-width: 140px !important;
  max-width: 320px !important;
  background: rgba(10, 8, 6, 0.55) !important;
  border: 1px solid rgba(184, 150, 62, 0.18) !important;
  border-bottom: 1px solid rgba(184, 150, 62, 0.18) !important;
  border-radius: 18px !important;
  padding: 8px 16px !important;
  color: #f0e9dd !important;
  font-family: 'Mulish', sans-serif !important;
  font-size: 11px !important;
  letter-spacing: 0.04em !important;
  outline: none !important;
  height: auto !important;
  width: auto !important;
  margin: 0 !important;
  position: static !important;
  right: auto !important;
  text-align: left !important;
  transition: border-color .2s;
}

.cl-redesigned .cl-filter:focus {
  border-color: rgba(184, 150, 62, 0.50) !important;
}

.cl-redesigned .cl-filter::placeholder {
  color: rgba(240, 233, 221, 0.72);
  letter-spacing: 0.06em;
  font-size: 11px;
}

/* ALL/VISITED segmented toggle (preserved filterBtn) */
.cl-redesigned .cl-all-visited {
  margin-left: auto !important;
  display: flex !important;
  background: rgba(10, 8, 6, 0.55) !important;
  background-color: rgba(10, 8, 6, 0.55) !important;
  
  border: 1px solid rgba(184, 150, 62, 0.30) !important;
  border-radius: 18px !important;
  padding: 3px !important;
  cursor: pointer;
  font-family: inherit;
  gap: 2px;
  width: auto !important;
  height: auto !important;
  box-shadow: none !important;
  flex-shrink: 0;
}

.cl-redesigned .cl-seg {
  padding: 6px 14px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: rgba(240, 233, 221, 0.72);
  border-radius: 14px;
  transition: background .18s, color .18s;
  user-select: none;
  -webkit-user-select: none;
}

.cl-redesigned .cl-seg.active {
  background: rgba(184, 150, 62, 0.22);
  color: #d4af6a;
}

/* ── Items area (scrolls) ─────────────────────────────────────────────── */
.cl-redesigned .cl-items {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 0 24px;
  scrollbar-width: thin;
  scrollbar-color: rgba(184, 150, 62, 0.35) transparent;
}

.cl-redesigned .cl-items::-webkit-scrollbar {
  width: 6px;
}

.cl-redesigned .cl-items::-webkit-scrollbar-thumb {
  background: rgba(184, 150, 62, 0.35);
  border-radius: 3px;
}

/* Existing #country-list-items has class="container" with fixed positioning
   (position: fixed; top: 96px; height: calc(100vh - 144px) — from styles.css).
   Reset it for use inside our flex layout. */
.cl-redesigned .cl-items #country-list-items.container {
  position: static !important;
  top: auto !important;
  left: auto !important;
  height: auto !important;
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 24px !important;
  margin: 0 !important;
  overflow: visible !important;
  gap: 10px !important;
}

/* Hidden bucket — invisible storage for userBtn / mapBtn */
.cl-redesigned .cl-hidden-bucket {
  display: none !important;
}

/* ── Mobile ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .cl-redesigned .cl-topbar {
    padding: 14px 16px 8px;
    gap: 8px;
  }
  .cl-redesigned .cl-icon-btn {
    width: 40px !important;
    height: 40px !important;
  }
  .cl-redesigned .cl-icon-btn svg {
    width: 19px;
    height: 19px;
  }
  .cl-redesigned .cl-title {
    font-size: 17px !important;
  }
  .cl-redesigned .cl-eyebrow {
    font-size: 8px;
  }
  .cl-redesigned .cl-controls {
    padding: 4px 16px 14px;
    gap: 10px;
  }
  .cl-redesigned .cl-filter {
    max-width: none !important;
    flex: 1 1 100% !important;
    order: 3;
  }
  .cl-redesigned .cl-view-pills {
    order: 1;
  }
  .cl-redesigned .cl-all-visited {
    order: 2;
    margin-left: auto !important;
  }
  .cl-redesigned .cl-items #country-list-items.container {
    padding: 0 14px !important;
  }
}

@media (max-width: 380px) {
  .cl-redesigned .cl-view-pill {
    padding: 6px 12px !important;
    font-size: 10px !important;
  }
  .cl-redesigned .cl-seg {
    padding: 5px 10px;
    font-size: 9.5px;
  }
}

/* Title font — Medula One for header only */
.cl-redesigned .cl-title {
  font-family: 'Medula One', Georgia, serif;
  font-size: 28px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
