/* Wireless Link Calc — /tools/wireless-calc/ */

/* container_1 min-height is for homepage hero — collapse on this tool page */
.container_1:has(.wlc-page-main),
.container_1:has(+ .wlc-page-main) {
  min-height: 0 !important;
  padding-bottom: 0 !important;
}

.container_1 > .services {
  margin-bottom: 0 !important;
}

/* te-wrap defaults to max-width:720px — override for full-width map tool */
#wlcApp.te-wrap {
  max-width: none;
  width: 100%;
  margin: 0 auto 48px;
  padding: 0;
}

.wlc-page-main {
  display: block;
  clear: both;
  margin: 0;
  padding: 0;
  background: #fff;
}

.wlc-page-main .wlc-page {
  max-width: none;
  width: 100%;
  padding: 0 clamp(12px, 2.5vw, 28px) 32px;
}

.wlc-chrome {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 0;
}

.wlc-chrome__crumb {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.wlc-breadcrumb.news-crumb {
  margin: 0;
  padding: 0;
}

.wlc-chrome__title {
  background: #fff;
  border-bottom: 1px solid #eef2f7;
}

/* Page title — right-aligned with wireless icon */
.wlc-page-title {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  color: #4356a3;
  margin: 0;
  padding: 0;
  line-height: 1.5;
}
.wlc-title-ico {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  color: #0093e9;
  filter: drop-shadow(0 2px 6px rgba(0, 147, 233, 0.25));
}

#wlcApp .te-shell.wlc-shell {
  max-width: none;
  width: 100%;
  margin: 16px 0 0;
  padding: 16px;
  border-radius: 14px;
}

/* Setup: sidebar first in DOM → right column in RTL; map fills rest */
.wlc-setup { display: grid; grid-template-columns: 1fr; gap: 14px; }

@media (min-width: 992px) {
  .wlc-setup {
    grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
    align-items: stretch;
    gap: 18px;
  }
  .wlc-setup-controls { min-width: 0; align-self: start; }
  .wlc-setup-map {
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: min(85vh, 820px);
  }
  .wlc-setup-map .wlc-map-wrap {
    flex: 1;
    height: auto;
    min-height: min(80vh, 780px);
  }
  .wlc-setup-map .wlc-map { height: 100%; min-height: 0; }
  .wlc-setup-controls .wlc-grid { grid-template-columns: 1fr; }
}

/* Sidebar — glass, no internal scroll */
.wlc-sidebar {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(67, 86, 163, 0.12);
  border-radius: 14px;
  padding: 14px;
  overflow: visible;
  min-width: 0;
}

/* Pick active point (sidebar) */
.wlc-pick { margin-bottom: 12px; }
.wlc-pick-label { display: block; font-size: 10px; font-weight: 700; color: var(--te-muted); margin-bottom: 6px; }
.wlc-pick-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wlc-pick-btn {
  height: 38px; border-radius: 10px; border: 1px solid var(--te-border);
  background: rgba(255,255,255,0.8); font-size: 12px; font-weight: 800;
  cursor: pointer; font-family: inherit; transition: all 0.15s;
}
.wlc-pick-btn--a.wlc-pick-btn--active { border-color: #0093e9; background: #0093e9; color: #fff; }
.wlc-pick-btn--b.wlc-pick-btn--active { border-color: #059669; background: #059669; color: #fff; }

.wlc-setup-controls .wlc-site-card {
  padding: 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.65);
  border-width: 1px;
}

.wlc-setup-controls .wlc-site-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-bottom: 8px;
}
.wlc-setup-controls .wlc-site-ico { width: 20px; height: 20px; flex-shrink: 0; }
.wlc-setup-controls .wlc-site-name {
  flex: 1 1 100%;
  margin-inline-start: 0;
  font-size: 12px;
  line-height: 1.3;
  word-break: break-word;
}
.wlc-setup-controls .wlc-spec-chips { margin: 6px 0 8px; min-height: 0; gap: 4px; }
.wlc-setup-controls .wlc-chip { font-size: 9px; padding: 3px 6px; }
.wlc-setup-controls .wlc-field { min-width: 0; }
.wlc-setup-controls .wlc-input--select { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wlc-setup-controls .wlc-fields--compact { gap: 6px; }
.wlc-setup-controls .wlc-input { height: 36px; font-size: 13px; }
.wlc-setup-controls .wlc-cw { margin-top: 10px; padding: 10px 12px; }
.wlc-setup-controls .wlc-advanced { margin-top: 10px; padding: 10px 12px; }

/* Sidebar — preview + calc buttons */
.wlc-sidebar-actions {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.wlc-setup-controls .wlc-sidebar-actions .wlc-preview { margin: 0; }
.wlc-setup-controls .wlc-sidebar-actions .wlc-actions {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wlc-setup-controls .wlc-calc-btn,
.wlc-setup-controls .wlc-sidebar-actions .te-btn { width: 100%; min-width: 0; }

/* Map panel */
.wlc-map-panel {
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(67, 86, 163, 0.14);
  background: #e2e8f0;
  min-height: 340px;
  min-width: 0;
}

.wlc-map-wrap {
  position: relative;
  flex: 1;
  min-height: 280px;
}

.wlc-map-panel .wlc-map {
  width: 100%;
  height: 100%;
  min-height: inherit;
}

.wlc-map-layers {
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
  z-index: 500;
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(67, 86, 163, 0.12);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.wlc-layer-btn {
  height: 32px;
  padding: 0 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-size: 11px;
  font-weight: 800;
  font-family: inherit;
  color: #475569;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.wlc-layer-btn--active {
  background: #4356a3;
  color: #fff;
}

.wlc-city-jump {
  height: 36px;
  min-width: 118px;
  max-width: 168px;
  padding: 0 26px 0 10px;
  margin-inline-start: 2px;
  border: none;
  border-inline-start: 1px solid rgba(67, 86, 163, 0.12);
  border-radius: 0 8px 8px 0;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23475569' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat left 10px center;
  font-size: 13px;
  font-weight: 800;
  font-family: inherit;
  color: #334155;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  direction: rtl;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.wlc-city-jump:focus {
  outline: 2px solid rgba(67, 86, 163, 0.35);
  outline-offset: 1px;
}
.wlc-city-jump option {
  direction: rtl;
  font-family: inherit;
}

/* Cards / sections */
.wlc-card {
  background: var(--te-card);
  border: 1px solid var(--te-border);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 6px 24px rgba(67, 86, 163, 0.06);
}

.wlc-map-card { padding: 0; overflow: hidden; }

.wlc-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.wlc-map-card .wlc-card-head { padding: 14px 16px; margin-bottom: 0; border-bottom: 1px solid var(--te-border); background: linear-gradient(135deg, rgba(67,86,163,0.05), rgba(0,147,233,0.04)); }

.wlc-card-ico {
  width: 26px; height: 26px; flex-shrink: 0; color: #4356a3;
}
.wlc-card-head > div { flex: 1; min-width: 0; }
.wlc-card-title { font-size: 14px; font-weight: 800; color: #1e293b; }
.wlc-card-sub { font-size: 11px; color: var(--te-muted); line-height: 1.6; margin-top: 2px; }

.wlc-map-mode { display: flex; gap: 8px; flex-shrink: 0; }
.wlc-map-btn {
  height: 38px; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--te-border); background: #fff;
  font-size: 12px; font-weight: 800; cursor: pointer; font-family: inherit;
  display: inline-flex; align-items: center; gap: 7px; transition: all 0.15s;
}
.wlc-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.wlc-dot--a { background: #0093e9; }
.wlc-dot--b { background: #059669; }
.wlc-map-btn--a.wlc-map-btn--active { border-color: #0093e9; background: #0093e9; color: #fff; box-shadow: 0 4px 12px rgba(0,147,233,0.35); }
.wlc-map-btn--a.wlc-map-btn--active .wlc-dot--a,
.wlc-map-btn--b.wlc-map-btn--active .wlc-dot--b { background: #fff; }
.wlc-map-btn--b.wlc-map-btn--active { border-color: #059669; background: #059669; color: #fff; box-shadow: 0 4px 12px rgba(5,150,105,0.35); }

.wlc-map { width: 100%; background: #e2e8f0; }
.wlc-map .leaflet-container { font-family: inherit; height: 100%; width: 100%; }
.wlc-map-dist { text-align: center; padding: 10px 14px; font-size: 13px; font-weight: 800; color: #4356a3; border-top: 1px solid var(--te-border); direction: ltr; }

.wlc-marker { width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); border: 2px solid #fff; box-shadow: 0 3px 10px rgba(0,0,0,0.35); display: flex; align-items: center; justify-content: center; }
.wlc-marker span { transform: rotate(45deg); font-size: 11px; font-weight: 800; color: #fff; }
.wlc-marker--a { background: #0093e9; }
.wlc-marker--b { background: #059669; }
.wlc-marker-wrap { background: transparent !important; border: none !important; }

/* Site cards */
.wlc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.wlc-site-card { padding: 16px; border-radius: 14px; border: 1.5px solid var(--te-border); background: #fff; }
.wlc-site-card--tx { border-color: rgba(0,147,233,0.35); }
.wlc-site-card--rx { border-color: rgba(5,150,105,0.35); }

.wlc-site-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 12px; }
.wlc-site-ico { width: 22px; height: 22px; flex-shrink: 0; }
.wlc-site-card--tx .wlc-site-ico { color: #0093e9; }
.wlc-site-card--rx .wlc-site-ico { color: #059669; }
.wlc-site-badge { font-size: 10px; font-weight: 800; padding: 4px 10px; border-radius: 999px; flex-shrink: 0; }
.wlc-site-badge--tx { background: rgba(0,147,233,0.12); color: #0093e9; }
.wlc-site-badge--rx { background: rgba(5,150,105,0.12); color: #059669; }
.wlc-site-name { font-size: 13px; font-weight: 800; color: #1e293b; flex: 1 1 auto; min-width: 0; word-break: break-word; }
.wlc-site-sub { margin-top: 10px; font-size: 11px; color: var(--te-muted); direction: ltr; text-align: left; }

.wlc-spec-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 12px; min-height: 26px; }
.wlc-chip { font-size: 10px; font-weight: 700; padding: 4px 8px; border-radius: 6px; background: rgba(67,86,163,0.08); color: #4356a3; direction: ltr; font-variant-numeric: tabular-nums; }
.wlc-chip--gain { background: rgba(0,147,233,0.12); color: #0077b6; }
.wlc-chip--pwr { background: rgba(245,158,11,0.15); color: #b45309; }
.wlc-chip--sens { background: rgba(5,150,105,0.12); color: #047857; }
.wlc-chip--chain { background: rgba(147,51,234,0.12); color: #7c3aed; }

.wlc-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wlc-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.wlc-field--full { grid-column: 1 / -1; }
.wlc-label { font-size: 10px; font-weight: 700; color: var(--te-muted); letter-spacing: 0.02em; }

.wlc-input {
  width: 100%; height: 38px; box-sizing: border-box; padding: 0 10px;
  border: 1px solid var(--te-border); border-radius: 10px; background: #fff; color: #1e293b;
  font-size: 13px; font-family: ui-monospace, 'Cascadia Mono', monospace; direction: ltr; text-align: left;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.wlc-input:focus { outline: none; border-color: var(--te-accent); box-shadow: 0 0 0 3px rgba(0,147,233,0.12); }
.wlc-input--select { font-family: inherit; font-size: 12px; }

.wlc-cw { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: rgba(67,86,163,0.04); border: 1px solid var(--te-border); }
.wlc-cw-item { display: flex; flex-direction: column; gap: 5px; min-width: 0; }

.wlc-advanced { margin-top: 12px; padding: 12px 14px; border: 1px dashed var(--te-border); border-radius: 12px; background: rgba(67,86,163,0.03); }
.wlc-advanced summary { cursor: pointer; font-size: 12px; font-weight: 700; color: #4356a3; display: flex; align-items: center; gap: 8px; }
.wlc-advanced summary svg { width: 16px; height: 16px; }
.wlc-rf-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }

/* Instant preview */
.wlc-preview { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 11px 14px; border-radius: 12px; background: linear-gradient(90deg, rgba(0,147,233,0.07), rgba(5,150,105,0.06)); border: 1px solid rgba(0,147,233,0.18); }
.wlc-preview-dot { width: 8px; height: 8px; border-radius: 50%; background: #0093e9; flex-shrink: 0; animation: wlc-blink 1.6s ease-in-out infinite; }
@keyframes wlc-blink { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }
.wlc-preview-text { font-size: 12px; font-weight: 600; color: #334155; line-height: 1.6; }

/* Actions + animated button */
.wlc-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 16px; }
.wlc-calc-btn { min-width: 190px; font-size: 15px !important; padding: 12px 24px !important; display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.wlc-btn-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff; display: none; animation: wlc-spin 0.7s linear infinite; }
.wlc-calc-btn--busy .wlc-btn-spin { display: inline-block; }
.wlc-calc-btn--busy .wlc-btn-label { opacity: 0.85; }
@keyframes wlc-spin { to { transform: rotate(360deg); } }

/* Results */
.wlc-results {
  animation: wlc-fade-up 0.4s ease;
  margin-top: 20px;
  padding-top: 4px;
  clear: both;
  position: relative;
  z-index: 1;
}
@keyframes wlc-fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.wlc-verdict { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; padding: 18px; border-radius: 16px; border: 1px solid var(--te-border); background: #fff; margin-bottom: 14px; }
.wlc-verdict-ring { width: 74px; height: 74px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; border: 3px solid #94a3b8; transition: all 0.3s; }
.wlc-verdict-ico { width: 34px; height: 34px; color: #64748b; }
.wlc-verdict-ring--excellent, .wlc-verdict-ring--good { border-color: #059669; box-shadow: 0 0 0 5px rgba(5,150,105,0.12); }
.wlc-verdict-ring--excellent .wlc-verdict-ico, .wlc-verdict-ring--good .wlc-verdict-ico { color: #059669; }
.wlc-verdict-ring--weak { border-color: #f59e0b; box-shadow: 0 0 0 5px rgba(245,158,11,0.12); }
.wlc-verdict-ring--weak .wlc-verdict-ico { color: #f59e0b; }
.wlc-verdict-ring--fail { border-color: #dc2626; box-shadow: 0 0 0 5px rgba(220,38,38,0.1); }
.wlc-verdict-ring--fail .wlc-verdict-ico { color: #dc2626; }

.wlc-verdict-body { min-width: 0; }
.wlc-verdict-title { font-size: 17px; font-weight: 800; margin-bottom: 5px; color: #1e293b; }
.wlc-verdict-detail { font-size: 12.5px; line-height: 1.75; color: #475569; }
.wlc-verdict--excellent { background: rgba(5,150,105,0.06); border-color: rgba(5,150,105,0.3); }
.wlc-verdict--excellent .wlc-verdict-title { color: #047857; }
.wlc-verdict--good { background: rgba(0,147,233,0.06); border-color: rgba(0,147,233,0.28); }
.wlc-verdict--good .wlc-verdict-title { color: #0077b6; }
.wlc-verdict--weak { background: rgba(245,158,11,0.09); border-color: rgba(245,158,11,0.32); }
.wlc-verdict--weak .wlc-verdict-title { color: #b45309; }
.wlc-verdict--fail { background: rgba(220,38,38,0.07); border-color: rgba(220,38,38,0.28); }
.wlc-verdict--fail .wlc-verdict-title { color: #dc2626; }
.wlc-warnings { margin-top: 8px; font-size: 11px; color: #b45309; line-height: 1.6; }

/* Animated link diagram */
.wlc-diagram { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 16px; margin-bottom: 14px; border-radius: 14px; border: 1px solid var(--te-border); background: #fff; }
.wlc-tower { display: flex; flex-direction: column; align-items: center; gap: 6px; color: #4356a3; }
.wlc-tower svg { width: 34px; height: 34px; }
.wlc-tower span { font-size: 10px; font-weight: 700; color: #475569; direction: ltr; text-align: center; max-width: 100px; }
.wlc-beam { position: relative; text-align: center; }
.wlc-beam::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 2px; background: repeating-linear-gradient(90deg, #0093e9 0 8px, transparent 8px 14px); opacity: 0.55; transform: translateY(-50%); }
.wlc-beam-pulse { position: absolute; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: #0093e9; box-shadow: 0 0 10px rgba(0,147,233,0.8); left: 0; opacity: 0; }
.wlc-diagram--pulse .wlc-beam-pulse { animation: wlc-fly 1.1s ease-in-out; }
.wlc-diagram--active .wlc-beam-pulse { animation: wlc-fly 1.1s ease-in-out infinite; }
@keyframes wlc-fly { 0% { left: 0; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { left: 100%; opacity: 0; } }
.wlc-beam b { position: relative; display: inline-block; background: #fff; padding: 2px 8px; font-size: 11px; font-weight: 800; color: var(--te-accent); direction: ltr; border-radius: 6px; }

/* Stats */
.wlc-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 14px; }
.wlc-stat { text-align: center; padding: 14px 6px; background: var(--te-card); border: 1px solid var(--te-border); border-radius: 12px; }
.wlc-stat-label { font-size: 10px; font-weight: 700; color: var(--te-muted); margin-bottom: 6px; }
.wlc-stat-value { font-size: 15px; font-weight: 800; direction: ltr; font-variant-numeric: tabular-nums; color: #1e293b; }
.wlc-stat-value--sm { font-size: 11px; }
.wlc-stat-value--accent { color: var(--te-accent); }
.wlc-stat-value--ok { color: #059669; }
.wlc-stat-value--warn { color: #b45309; }
.wlc-stat-value--bad { color: #dc2626; }

/* Recommendations */
.wlc-reco { margin-bottom: 16px; padding: 16px; border-radius: 16px; border: 1px solid rgba(245,158,11,0.4); background: linear-gradient(135deg, rgba(245,158,11,0.07), rgba(0,147,233,0.05)); }
.wlc-reco-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.wlc-reco-ico { width: 24px; height: 24px; color: #b45309; flex-shrink: 0; }
.wlc-reco-title { font-size: 14px; font-weight: 800; color: #b45309; margin-bottom: 3px; }
.wlc-reco-sub { font-size: 11px; color: var(--te-muted); line-height: 1.6; }
.wlc-reco-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.wlc-reco-card { position: relative; padding: 12px; border-radius: 12px; background: #fff; border: 1px solid var(--te-border); display: flex; flex-direction: column; gap: 4px; }
.wlc-reco-card--best { border-color: #059669; box-shadow: 0 4px 14px rgba(5,150,105,0.15); }
.wlc-reco-tag { position: absolute; top: -9px; inset-inline-end: 10px; font-size: 9px; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: #059669; color: #fff; }
.wlc-reco-vendor { font-size: 10px; font-weight: 700; color: var(--te-muted); }
.wlc-reco-name { font-size: 13px; font-weight: 800; color: #1e293b; line-height: 1.3; min-height: 34px; }
.wlc-reco-specs { display: flex; gap: 6px; flex-wrap: wrap; }
.wlc-reco-specs span { font-size: 10px; font-weight: 700; padding: 3px 7px; border-radius: 6px; background: rgba(0,147,233,0.1); color: #0077b6; direction: ltr; }
.wlc-reco-margin { font-size: 11px; color: #475569; }
.wlc-reco-margin b { color: #059669; direction: ltr; font-variant-numeric: tabular-nums; }
.wlc-reco-apply { margin-top: 6px; height: 32px; border-radius: 8px; border: none; background: #4356a3; color: #fff; font-size: 11px; font-weight: 700; cursor: pointer; font-family: inherit; transition: background 0.15s; }
.wlc-reco-apply:hover { background: #0093e9; }

/* Collapsible budget */
.wlc-collapse { margin-bottom: 14px; border: 1px solid var(--te-border); border-radius: 14px; background: #fff; padding: 6px 14px; }
.wlc-collapse summary { cursor: pointer; font-size: 13px; font-weight: 800; color: #4356a3; padding: 8px 0; }
.wlc-budget-scroll { overflow-x: auto; }
.wlc-budget-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.wlc-budget-table th, .wlc-budget-table td { padding: 8px 10px; border-bottom: 1px solid var(--te-border); text-align: right; }
.wlc-budget-table th { color: var(--te-muted); font-weight: 700; }
.wlc-budget-table td:nth-child(2) { direction: ltr; text-align: left; font-weight: 800; font-variant-numeric: tabular-nums; }
.wlc-budget-row--plus td:nth-child(2) { color: #059669; }
.wlc-budget-row--minus td:nth-child(2) { color: #dc2626; }
.wlc-budget-row--result td { background: rgba(0,147,233,0.06); font-weight: 800; }

/* Chart */
.wlc-chart-wrap { background: var(--te-card); border: 1px solid var(--te-border); border-radius: 14px; padding: 12px; margin-bottom: 14px; }
.wlc-chart-title { font-size: 12px; font-weight: 800; color: #4356a3; margin-bottom: 8px; text-align: center; }
.wlc-chart-wrap canvas { width: 100%; height: 220px; display: block; }
.wlc-chart-legend { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 8px; font-size: 11px; color: var(--te-muted); }
.wlc-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.wlc-legend-swatch { width: 12px; height: 3px; border-radius: 2px; }

.wlc-note { font-size: 11px; color: var(--te-muted); text-align: center; line-height: 1.7; }

/* Tablet/mobile: map on top, sidebar below */
@media (max-width: 991px) {
  .wlc-setup-map { order: 1; }
  .wlc-setup-controls { order: 2; }
  .wlc-map-wrap { height: 420px; min-height: 420px; }
  .wlc-map-panel .wlc-map { height: 100%; min-height: 0; }
}

@media (max-width: 720px) {
  .wlc-hero-title { font-size: 20px; }
  .wlc-hero-sub { font-size: 12.5px; }
  .wlc-grid { grid-template-columns: 1fr; }
  .wlc-map-wrap { height: 340px; min-height: 340px; }
  .wlc-chrome__title { padding: 14px clamp(12px, 2.5vw, 28px) 12px !important; }
  .wlc-page-title { font-size: 17px !important; }
  .wlc-title-ico { width: 26px; height: 26px; }
  .wlc-card { padding: 14px; }
  .wlc-card-head { flex-wrap: wrap; }
  .wlc-map-card .wlc-card-head { padding: 12px 14px; }
  .wlc-map-mode { width: 100%; }
  .wlc-map-btn { flex: 1; justify-content: center; height: 46px; font-size: 13px; }
  .wlc-rf-row { grid-template-columns: 1fr 1fr; }
  .wlc-stats { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .wlc-stat { padding: 12px 4px; }
  .wlc-verdict { grid-template-columns: 1fr; text-align: center; justify-items: center; padding: 16px; }
  .wlc-chart-wrap canvas { height: 190px; }
  /* Bigger touch targets; 16px font stops iOS auto-zoom on focus */
  .wlc-input { height: 46px; font-size: 16px; border-radius: 12px; }
  .wlc-input--select { font-size: 15px; }
  .wlc-label { font-size: 11px; }
  .wlc-actions { flex-direction: column; }
  .wlc-calc-btn, .wlc-actions .te-btn { width: 100%; min-width: 0; }
  .wlc-reco-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

@media (max-width: 430px) {
  .wlc-stats { grid-template-columns: repeat(2, 1fr); }
  .wlc-rf-row { grid-template-columns: 1fr; }
  .wlc-cw { grid-template-columns: 1fr; }
  .wlc-map-wrap { height: 300px; min-height: 300px; }
  .wlc-map-layers { flex-wrap: wrap; max-width: calc(100% - 24px); }
  .wlc-layer-btn { font-size: 10px; padding: 0 8px; }
  .wlc-city-jump { max-width: 100%; flex: 1 1 120px; min-width: 110px; height: 36px; font-size: 12px; }
  .wlc-diagram { gap: 8px; padding: 12px; }
  .wlc-tower svg { width: 28px; height: 28px; }
}

/* Map link status animations (Leaflet SVG) */
.wlc-map-wrap path.wlc-map-link--flow-ok {
  animation: wlc-link-flow 0.95s linear infinite;
}
.wlc-map-wrap path.wlc-map-link--flow-weak {
  animation: wlc-link-flow 1.55s linear infinite;
}
.wlc-map-wrap path.wlc-map-link--flow-fail {
  animation: wlc-link-flow-fail 1.15s linear infinite;
}
.wlc-map-wrap path.wlc-map-link--blocked {
  animation: wlc-link-blocked 1.35s ease-in-out infinite;
}
@keyframes wlc-link-flow {
  from { stroke-dashoffset: 26; }
  to { stroke-dashoffset: 0; }
}
@keyframes wlc-link-flow-fail {
  from { stroke-dashoffset: 20; opacity: 0.35; }
  to { stroke-dashoffset: 0; opacity: 0.8; }
}
@keyframes wlc-link-blocked {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}
.wlc-map-wrap path.wlc-map-obstacle-pulse {
  animation: wlc-obstacle-pulse 1.75s ease-out infinite;
  pointer-events: none;
}
@keyframes wlc-obstacle-pulse {
  0% { stroke-opacity: 0.65; fill-opacity: 0.2; }
  75%, 100% { stroke-opacity: 0; fill-opacity: 0; }
}
.wlc-map-wrap path.wlc-map-flow-dot {
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.85));
}
