/* GECANDO Live Propagation Viewer Stylesheet */

/* Twemoji Country Flags Web Font Polyfill for Windows & Chromium */
@font-face {
  font-family: 'Twemoji Country Flags';
  unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E0063, U+E0065, U+E0067, U+E006C, U+E006E, U+E0073-E0074, U+E0077, U+E007F;
  src: url('TwemojiCountryFlags.woff2') format('woff2'),
       url('../TwemojiCountryFlags.woff2') format('woff2'),
       url('https://cdn.jsdelivr.net/npm/country-flag-emoji-polyfill@0.1/dist/TwemojiCountryFlags.woff2') format('woff2');
  font-display: swap;
}

/* Flag emoji & Leaflet map popups font support for Windows Chromium */
.flag-emoji {
  font-family: 'Twemoji Country Flags', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
  display: inline-block;
  vertical-align: -1px;
}

.leaflet-container,
.leaflet-popup,
.leaflet-popup-content-wrapper,
.leaflet-popup-content,
.leaflet-popup-content * {
  font-family: 'Twemoji Country Flags', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
}

:root {
  --band-160m: #636366;
  --band-80m: #bf5af2;
  --band-60m: #5e5ce6;
  --band-40m: #0a84ff;
  --band-30m: #64d2ff;
  --band-20m: #30d158;
  --band-17m: #ffd60a;
  --band-15m: #ff9f0a;
  --band-12m: #ff7a59;
  --band-10m: #ff453a;
  --band-6m: #ff375f;
}

/* Page Layout */
.propagation-page {
  background-color: #0b0e14;
  color: #f5f5f7;
  min-height: 100vh;
}

.prop-hero {
  padding: 40px 0 20px;
  background: radial-gradient(ellipse at top, rgba(191, 90, 242, 0.12) 0%, rgba(11, 14, 20, 0) 70%);
}

.prop-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.prop-title-group h1 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 12px;
}

.live-pulse-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(48, 209, 88, 0.12);
  border: 1px solid rgba(48, 209, 88, 0.3);
  border-radius: 999px;
  color: #30d158;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #30d158;
  box-shadow: 0 0 10px #30d158;
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(48, 209, 88, 0.7); }
  70% { transform: scale(1.15); box-shadow: 0 0 0 8px rgba(48, 209, 88, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(48, 209, 88, 0); }
}

/* Cluster Selector Controls */
.cluster-selector-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cluster-pill-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #a1a1aa;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.cluster-pill-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.cluster-pill-toggle.active {
  background: rgba(191, 90, 242, 0.18);
  border-color: rgba(191, 90, 242, 0.5);
  color: #e09aff;
}

.cluster-pill-toggle input {
  display: none;
}

/* Master Control & Filter Bar */
.prop-filter-panel {
  background: rgba(18, 24, 38, 0.8);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.filter-row + .filter-row {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Spotter Country Filter Box */
.spotter-filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #8e8e93;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.spotter-btn {
  font-family: 'Twemoji Country Flags', var(--font-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #d1d1d6;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.spotter-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.spotter-btn.active {
  background: rgba(10, 132, 255, 0.2);
  border-color: rgba(10, 132, 255, 0.5);
  color: #64d2ff;
}

.spotter-select, .spotter-select option {
  font-family: 'Twemoji Country Flags', var(--font-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
  padding: 6px 12px;
  border-radius: 8px;
  background: #151a26;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 0.82rem;
  outline: none;
  cursor: pointer;
}

/* Band Filter Pills */
.band-pills-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.band-pill {
  padding: 5px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #a1a1aa;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.band-pill:hover {
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.band-pill.active {
  color: #fff;
  border-color: currentColor;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.15);
}

.band-pill[data-band="ALL"].active { background: rgba(255, 255, 255, 0.2); color: #fff; }
.band-pill[data-band="160M"].active { background: rgba(99, 99, 102, 0.35); color: #aeaeb2; border-color: var(--band-160m); }
.band-pill[data-band="80M"].active { background: rgba(191, 90, 242, 0.3); color: #e09aff; border-color: var(--band-80m); }
.band-pill[data-band="60M"].active { background: rgba(94, 92, 230, 0.3); color: #8f8eff; border-color: var(--band-60m); }
.band-pill[data-band="40M"].active { background: rgba(10, 132, 255, 0.3); color: #64d2ff; border-color: var(--band-40m); }
.band-pill[data-band="30M"].active { background: rgba(100, 210, 255, 0.3); color: #64d2ff; border-color: var(--band-30m); }
.band-pill[data-band="20M"].active { background: rgba(48, 209, 88, 0.3); color: #68e085; border-color: var(--band-20m); }
.band-pill[data-band="17M"].active { background: rgba(255, 214, 10, 0.3); color: #ffe668; border-color: var(--band-17m); }
.band-pill[data-band="15M"].active { background: rgba(255, 159, 10, 0.3); color: #ffb84d; border-color: var(--band-15m); }
.band-pill[data-band="12M"].active { background: rgba(255, 122, 89, 0.3); color: #ffa48d; border-color: var(--band-12m); }
.band-pill[data-band="10M"].active { background: rgba(255, 69, 58, 0.3); color: #ff857d; border-color: var(--band-10m); }
.band-pill[data-band="6M"].active { background: rgba(255, 55, 95, 0.3); color: #ff7693; border-color: var(--band-6m); }

/* Mode Pills & Search */
.mode-pills-bar {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mode-pill {
  padding: 5px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #a1a1aa;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.mode-pill.active {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border-color: #fff;
}

.search-input-wrapper {
  position: relative;
  min-width: 220px;
}

.search-input-wrapper i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #71717a;
  font-size: 0.85rem;
}

.prop-search-input {
  width: 100%;
  padding: 7px 12px 7px 34px;
  background: #141924;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #fff;
  font-size: 0.82rem;
  outline: none;
}

.prop-search-input:focus {
  border-color: #bf5af2;
  box-shadow: 0 0 0 2px rgba(191, 90, 242, 0.2);
}

/* View Mode Toggles (Hybrid) */
.view-mode-group {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}

.view-mode-btn {
  padding: 5px 12px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: #a1a1aa;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.view-mode-btn.active {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* Main Display Container */
.prop-display-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.prop-map-card {
  background: #121826;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
}

#propagationMap {
  width: 100%;
  height: 520px;
  background: #090c12;
}

.fullscreen-map #propagationMap {
  height: 82vh;
}

/* Map Overlays & Legend */
.map-legend-overlay {
  position: absolute;
  bottom: 24px;
  left: 20px;
  z-index: 1000;
  background: rgba(14, 19, 30, 0.88);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.75rem;
  color: #d1d1d6;
  pointer-events: auto;
}

.legend-title {
  font-weight: 700;
  margin-bottom: 6px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-bands {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.legend-color {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

/* Spot Table Card */
.prop-table-card {
  background: rgba(18, 24, 38, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
}

.table-header-bar {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.table-title {
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-table-action {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #a1a1aa;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-table-action:hover {
  background: rgba(100, 210, 255, 0.15);
  border-color: rgba(100, 210, 255, 0.4);
  color: #64d2ff;
}

.prop-table-responsive {
  max-height: 480px;
  overflow-y: auto;
}

.fullscreen-table .prop-table-responsive {
  max-height: 80vh;
}

.prop-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}

.prop-table th {
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 14px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #8e8e93;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.prop-table th.sortable-th {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.prop-table th.sortable-th:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.prop-table th.sortable-th:focus-visible {
  outline: 2px solid #64d2ff;
  outline-offset: -2px;
}

.prop-table th.sortable-th.active-sort {
  color: #64d2ff;
  background: rgba(100, 210, 255, 0.08);
  border-bottom: 2px solid #64d2ff;
}

.prop-table th.sortable-th .sort-icon {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.72rem;
  opacity: 0.35;
  vertical-align: middle;
  transition: opacity 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.prop-table th.sortable-th:hover .sort-icon {
  opacity: 0.85;
}

.prop-table th.sortable-th.active-sort .sort-icon {
  opacity: 1;
  color: #64d2ff;
}

.prop-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.prop-table tr:hover {
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.band-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-align: center;
  min-width: 44px;
}

.band-badge.b-160M { background: rgba(99, 99, 102, 0.25); color: #aeaeb2; border: 1px solid var(--band-160m); }
.band-badge.b-80M  { background: rgba(191, 90, 242, 0.2); color: #e09aff; border: 1px solid var(--band-80m); }
.band-badge.b-60M  { background: rgba(94, 92, 230, 0.2); color: #8f8eff; border: 1px solid var(--band-60m); }
.band-badge.b-40M  { background: rgba(10, 132, 255, 0.2); color: #64d2ff; border: 1px solid var(--band-40m); }
.band-badge.b-30M  { background: rgba(100, 210, 255, 0.2); color: #64d2ff; border: 1px solid var(--band-30m); }
.band-badge.b-20M  { background: rgba(48, 209, 88, 0.2); color: #68e085; border: 1px solid var(--band-20m); }
.band-badge.b-17M  { background: rgba(255, 214, 10, 0.2); color: #ffe668; border: 1px solid var(--band-17m); }
.band-badge.b-15M  { background: rgba(255, 159, 10, 0.2); color: #ffb84d; border: 1px solid var(--band-15m); }
.band-badge.b-12M  { background: rgba(255, 122, 89, 0.2); color: #ffa48d; border: 1px solid var(--band-12m); }
.band-badge.b-10M  { background: rgba(255, 69, 58, 0.2); color: #ff857d; border: 1px solid var(--band-10m); }
.band-badge.b-6M   { background: rgba(255, 55, 95, 0.2); color: #ff7693; border: 1px solid var(--band-6m); }

.callsign-cell {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 700;
  color: #fff;
  font-size: 0.9rem;
}

.cluster-tag {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  color: #a1a1aa;
}

/* AutoQSO Teaser Banner */
.autoqso-teaser-banner {
  margin-top: 30px;
  background: linear-gradient(135deg, rgba(191, 90, 242, 0.15) 0%, rgba(10, 132, 255, 0.1) 100%);
  border: 1px solid rgba(191, 90, 242, 0.3);
  border-radius: 16px;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.teaser-content {
  display: flex;
  align-items: center;
  gap: 18px;
}

.teaser-icon {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(191, 90, 242, 0.3);
}

.teaser-text h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.teaser-text p {
  color: #a1a1aa;
  font-size: 0.88rem;
}

/* Responsive */
@media (max-width: 900px) {
  #propagationMap { height: 380px; }
  .prop-table-responsive { max-height: 380px; }
  .prop-title-row { flex-direction: column; align-items: flex-start; }
}



/* ==========================================================================
   Map Top Toolbar & Control Actions (In-Line in Upper Right Corner)
   ========================================================================== */

.map-top-bar {
  position: absolute;
  top: 10px;
  right: 14px;
  left: 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  pointer-events: none;
}

.map-stat-capsule {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  color: #e2e8f0;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.map-time-select {
  background: transparent;
  border: none;
  color: #38bdf8;
  font-weight: 700;
  font-size: 0.8rem;
  outline: none;
  cursor: pointer;
}

.map-time-select option {
  background: #0f172a;
  color: #fff;
}

.map-control-actions {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.map-icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: #f1f5f9;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  white-space: nowrap;
}

.map-icon-btn:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.map-icon-btn.active {
  background: rgba(14, 165, 233, 0.3);
  border-color: #38bdf8;
  color: #38bdf8;
}

.map-dropdown-wrapper {
  position: relative;
}

.map-style-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  padding: 4px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 1002;
  min-width: 140px;
}

.map-style-menu.open {
  display: flex !important;
}

.style-option {
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #cbd5e1;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.style-option:hover {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
}

.style-option.active {
  background: rgba(14, 165, 233, 0.25);
  color: #38bdf8;
  font-weight: 700;
}

.map-bottom-capsule {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 16px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  z-index: 1000;
  pointer-events: auto;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.capsule-band-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #cbd5e1;
}

.capsule-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}


/* ==========================================================================
   Floating Draggable "Propagation by Continent" Widget (Neatly Inside Map)
   ========================================================================== */

.propagation-chart-card {
  position: absolute;
  top: 56px;
  left: 14px;
  z-index: 1001;
  width: 490px;
  max-width: calc(100% - 28px);
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.94) 0%, rgba(14, 165, 233, 0.88) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 14px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.2);
  padding: 12px 14px 10px;
  color: #0f172a;
  transition: opacity 0.25s ease, transform 0.25s ease, box-shadow 0.2s ease;
  touch-action: none;
}

.propagation-chart-card.is-dragging {
  cursor: grabbing !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.48), 0 0 0 2px rgba(255, 255, 255, 0.55) !important;
  transition: none !important;
}

.propagation-chart-card.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px) scale(0.98);
}

.chart-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.chart-card-header:active,
.propagation-chart-card.is-dragging .chart-card-header {
  cursor: grabbing !important;
}

.drag-handle-icon {
  display: inline-block;
  font-size: 0.85rem;
  color: rgba(15, 23, 42, 0.45);
  margin-right: 6px;
  cursor: grab;
  vertical-align: middle;
  transition: color 0.2s, transform 0.2s;
}

.chart-card-header:hover .drag-handle-icon {
  color: rgba(15, 23, 42, 0.85);
  transform: scale(1.12);
}

.chart-header-titles {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chart-main-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.chart-sub-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: #334155;
}

.chart-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.chart-action-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.3);
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chart-action-btn:hover {
  background: rgba(255, 255, 255, 0.6);
  transform: scale(1.06);
}

.chart-action-btn.active {
  color: #ea580c;
  background: rgba(255, 255, 255, 0.55);
}

/* SVG Chart Area */
.chart-render-area {
  position: relative;
  width: 100%;
  height: 140px;
}

#propChartSvg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* SVG Elements Styling */
.chart-grid-line {
  stroke: rgba(255, 255, 255, 0.45);
  stroke-width: 0.75;
  stroke-dasharray: 2 2;
}

.chart-axis-baseline {
  stroke: rgba(15, 23, 42, 0.25);
  stroke-width: 1;
}

.chart-axis-label-y {
  fill: #334155;
  font-size: 8px;
  font-weight: 600;
  text-anchor: end;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.chart-axis-label-x {
  fill: #0f172a;
  font-size: 9.5px;
  font-weight: 800;
  text-anchor: middle;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.chart-bar {
  cursor: pointer;
  transition: opacity 0.15s ease, filter 0.15s ease;
}

.chart-bar:hover {
  filter: brightness(1.15);
  opacity: 0.9;
}

/* Chart Tooltip */
.chart-tooltip {
  position: absolute;
  display: none;
  padding: 4px 8px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  pointer-events: none;
  z-index: 1020;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Chart Legend */
.chart-legend-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
  padding-top: 4px;
}

.chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #0f172a;
}

.chart-legend-dot {
  width: 7.5px;
  height: 7.5px;
  border-radius: 50%;
}

/* AutoQSO Bottom Band Capsule on Map */
.map-bottom-capsule {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 16px;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 30px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  font-size: 0.75rem;
  font-weight: 600;
  color: #e2e8f0;
  pointer-events: auto;
  flex-wrap: wrap;
  justify-content: center;
}

.capsule-band-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.capsule-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.capsule-dot.b-160m { background: #636366; }
.capsule-dot.b-80m  { background: #bf5af2; }
.capsule-dot.b-60m  { background: #5e5ce6; }
.capsule-dot.b-40m  { background: #0a84ff; }
.capsule-dot.b-30m  { background: #64d2ff; }
.capsule-dot.b-20m  { background: #30d158; }
.capsule-dot.b-17m  { background: #ffd60a; }
.capsule-dot.b-15m  { background: #ff9f0a; }
.capsule-dot.b-12m  { background: #ff7a59; }
.capsule-dot.b-10m  { background: #ff453a; }
.capsule-dot.b-6m   { background: #ff375f; }

/* Maidenhead Grid Labels */
.maidenhead-field-label {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
  font-size: 11px;
  font-weight: 700;
  color: rgba(100, 210, 255, 0.65);
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

@media (max-width: 640px) {
  .propagation-chart-card {
    top: 52px;
    left: 8px;
    width: calc(100% - 16px);
    padding: 8px;
  }
  .map-top-bar {
  position: absolute;
  top: 10px;
  right: 14px;
  left: 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  pointer-events: none;
}
  .map-bottom-capsule {
    bottom: 8px;
    gap: 8px;
    padding: 4px 10px;
    font-size: 0.68rem;
  }
}

/* --- Live Propagation Help Button & Detailed Modal --- */
.prop-help-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  background: rgba(191, 90, 242, 0.15);
  border: 1px solid rgba(191, 90, 242, 0.4);
  border-radius: 10px;
  color: #e09aff;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.prop-help-btn:hover {
  background: rgba(191, 90, 242, 0.28);
  border-color: #bf5af2;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(191, 90, 242, 0.4);
}

.prop-help-btn:active {
  transform: translateY(0);
}

.prop-help-modal-content {
  max-width: 900px;
  background: #0d121d;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 25px 65px rgba(0, 0, 0, 0.8), 0 0 30px rgba(191, 90, 242, 0.12);
  padding: 32px;
  border-radius: 20px;
}

.prop-help-header {
  display: flex;
  align-items: center;
  gap: 18px;
}

.prop-help-icon-wrap {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(191, 90, 242, 0.25) 0%, rgba(137, 68, 171, 0.15) 100%);
  border: 1px solid rgba(191, 90, 242, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #bf5af2;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(191, 90, 242, 0.25);
}

.prop-help-tagline {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-top: 4px;
  line-height: 1.4;
}

.help-section {
  margin-bottom: 26px;
}

.help-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.help-section-title h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #f5f5f7;
  letter-spacing: -0.01em;
}

.help-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.help-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.help-mini-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  transition: all 0.2s ease;
}

.help-mini-card:hover {
  border-color: rgba(191, 90, 242, 0.35);
  background: rgba(255, 255, 255, 0.05);
}

.help-mini-icon {
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.help-mini-title {
  font-weight: 700;
  font-size: 0.92rem;
  color: #f5f5f7;
  margin-bottom: 6px;
}

.help-mini-desc {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.help-feature-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}

.help-feature-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 14px 16px;
}

.help-feature-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.05rem;
}

.help-feature-item strong {
  display: block;
  font-size: 0.94rem;
  color: #f5f5f7;
  margin-bottom: 4px;
}

.help-feature-item p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.help-band-table-wrap {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 16px 18px;
  margin-top: 14px;
}

.help-band-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.help-band-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font-size: 0.82rem;
  color: #e2e8f0;
}

@media (max-width: 768px) {
  .help-grid-3, .help-grid-2 {
    grid-template-columns: 1fr;
  }
  .prop-help-modal-content {
    padding: 20px;
  }
}

