/* "Perto de ti": a pulsar's beam sweeping around the listener. Motion is transform/opacity only. */
.local-panel { margin: 18px 0 8px; scroll-margin-top: 24px; }
.local-panel[hidden] { display: none; }
.local-top { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); align-items: center; }

.local-radar {
  position: relative; width: 100%; aspect-ratio: 1; border-radius: 50%; overflow: visible;
  background: radial-gradient(circle, #06262b 0, #03161b 62%, #020d11 100%);
  box-shadow: 0 0 0 1px rgba(0, 255, 204, .55), 0 0 30px rgba(0, 255, 204, .22), 0 0 70px rgba(0, 204, 255, .12), inset 0 0 50px rgba(0, 0, 0, .55);
}
.radar-rings {
  position: absolute; inset: 0; border-radius: 50%;
  background:
    radial-gradient(circle, transparent calc(15.33% - 1px), rgba(0, 255, 204, .2) 15.33%, transparent calc(15.33% + 1px)),
    radial-gradient(circle, transparent calc(30.66% - 1px), rgba(0, 255, 204, .2) 30.66%, transparent calc(30.66% + 1px)),
    radial-gradient(circle, transparent calc(46% - 1px), rgba(0, 255, 204, .26) 46%, transparent calc(46% + 1px)),
    linear-gradient(rgba(0, 255, 204, .12), rgba(0, 255, 204, .12)) center / 100% 1px no-repeat,
    linear-gradient(rgba(0, 255, 204, .12), rgba(0, 255, 204, .12)) center / 1px 100% no-repeat;
}
/* The beam: its leading edge is north at rotation 0, so a blip's delay matches its real direction. */
.radar-sweep {
  position: absolute; inset: 0; border-radius: 50%; pointer-events: none; will-change: transform;
  background: conic-gradient(from 0deg, transparent 0 262deg, rgba(0, 255, 204, .03) 280deg, rgba(0, 255, 204, .34) 360deg);
  animation: radar-spin var(--sweep, 6s) linear infinite;
}
.radar-sweep::after { content: ''; position: absolute; left: 50%; top: 2%; width: 2px; height: 48%; margin-left: -1px; background: linear-gradient(rgba(0, 255, 204, 0), #00ffcc); box-shadow: 0 0 10px #00ffcc; }
@keyframes radar-spin { to { transform: rotate(360deg); } }

.radar-km { position: absolute; left: 50%; transform: translate(5px, -50%); color: rgba(154, 217, 211, .6); font-size: .66rem; pointer-events: none; white-space: nowrap; }
.radar-you {
  position: absolute; left: 50%; top: 50%; width: 42px; height: 42px; margin: -21px 0 0 -21px; display: grid; place-items: center; border-radius: 50%;
  background: #00ffcc; color: #001a14; font-size: .72rem; font-weight: bold; box-shadow: 0 0 18px rgba(0, 255, 204, .85); pointer-events: none;
}
.radar-you::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 1px solid #00ffcc; animation: radar-pulse 3s cubic-bezier(.16, 1, .3, 1) infinite; }
@keyframes radar-pulse { from { transform: scale(1); opacity: .9; } to { transform: scale(3.2); opacity: 0; } }

/* A generous hit area around a small light. */
.radar-blip { position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.radar-blip::before {
  content: ''; position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%;
  background: #ff2d9b; box-shadow: 0 0 10px #ff2d9b; opacity: .5;
  animation: blip-ping var(--sweep, 6s) linear infinite; animation-delay: var(--passes, 0s);
}
@keyframes blip-ping { 0% { opacity: 1; transform: scale(1.5); } 22% { opacity: .78; transform: scale(1); } 100% { opacity: .5; transform: scale(1); } }
.radar-blip::after {
  content: attr(data-label); position: absolute; left: 100%; top: 50%; transform: translateY(-50%); padding: 3px 8px; border-radius: 6px; background: #021417; border: 1px solid rgba(0, 255, 204, .55); color: #ecfffb; font-size: .72rem; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s ease; z-index: 3;
}
.radar-blip.label-left::after { left: auto; right: 100%; }
.radar-blip:hover, .radar-blip:focus-visible, .radar-blip.playing { z-index: 4; }
.radar-blip:hover::after, .radar-blip:focus-visible::after, .radar-blip.playing::after { opacity: 1; }
.radar-blip:focus-visible { outline: 2px solid #00ccff; outline-offset: -4px; }
.radar-blip:hover::before { animation: none; opacity: 1; transform: scale(1.5); }
.radar-blip.playing::before { background: #39ff14; box-shadow: 0 0 14px #39ff14, 0 0 28px rgba(57, 255, 20, .6); animation: none; opacity: 1; transform: scale(1.45); }

/* Mini radar in the dock's left wing: takes the place of the empty "now playing" while nothing plays. */
.dock-radar { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; width: 100%; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; letter-spacing: normal; text-transform: none; text-align: left; cursor: pointer; pointer-events: auto; -webkit-tap-highlight-color: transparent; }
.dock-radar[hidden], body.is-playing .dock-radar { display: none; }
body.dock-has-radar:not(.is-playing) .dock-wing-left > :not(.dock-radar) { display: none; }
.dock-radar-disc {
  position: relative; display: block; width: 104px; height: 104px; border-radius: 50%; overflow: hidden; transition: box-shadow .2s ease, transform .3s cubic-bezier(.16, 1, .3, 1);
  background:
    radial-gradient(circle, transparent calc(22% - 1px), rgba(0, 255, 204, .22) 22%, transparent calc(22% + 1px)),
    radial-gradient(circle, transparent calc(44% - 1px), rgba(0, 255, 204, .22) 44%, transparent calc(44% + 1px)),
    linear-gradient(rgba(0, 255, 204, .12), rgba(0, 255, 204, .12)) center / 100% 1px no-repeat,
    linear-gradient(rgba(0, 255, 204, .12), rgba(0, 255, 204, .12)) center / 1px 100% no-repeat,
    radial-gradient(circle, #06262b, #020d11);
  box-shadow: 0 0 0 1px rgba(0, 255, 204, .55), 0 0 18px rgba(0, 255, 204, .22);
}
.dock-radar:hover .dock-radar-disc, .dock-radar:focus-visible .dock-radar-disc { box-shadow: 0 0 0 1px #00ffcc, 0 0 26px rgba(0, 255, 204, .5); transform: scale(1.05); }
.dock-radar:focus-visible { outline: 2px solid var(--line-secondary); outline-offset: 4px; border-radius: 8px; }
.dock-radar-sweep { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 250deg, rgba(0, 255, 204, .05) 275deg, rgba(0, 255, 204, .42) 360deg); animation: radar-spin 4s linear infinite; will-change: transform; }
.dock-radar-you { position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: #00ffcc; box-shadow: 0 0 10px #00ffcc; }
.dock-radar-you::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 1px solid #00ffcc; animation: radar-pulse 3s cubic-bezier(.16, 1, .3, 1) infinite; }
.dock-radar-dot { position: absolute; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: #ff2d9b; box-shadow: 0 0 6px #ff2d9b; opacity: .5; animation: blip-ping 4s linear infinite; animation-delay: var(--passes, 0s); }
.dock-radar-title { color: var(--line-primary); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; text-shadow: 0 0 8px rgba(0, 255, 204, .5); }
.dock-radar-hint { color: var(--text-dim); font-size: .78rem; line-height: 1.35; }
.dock-radar:hover .dock-radar-hint { color: var(--text-primary); }

.local-title { margin: 0 0 8px; color: var(--line-primary); font-size: clamp(1.4rem, 2.6vw, 1.9rem); text-shadow: 0 0 14px rgba(0, 255, 204, .35); }
.local-intro { margin: 0 0 10px; color: var(--text-primary); line-height: 1.6; max-width: 56ch; }
.local-zone { margin: 0 0 14px; color: var(--neon-pink); font-size: .85rem; letter-spacing: .04em; }
.local-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.local-cta { padding: 11px 18px; border: 1px solid var(--line-secondary); border-radius: 999px; background: rgba(0, 204, 255, .08); color: var(--line-secondary); font: inherit; font-size: .9rem; cursor: pointer; touch-action: manipulation; transition: background-color .2s ease, box-shadow .2s ease, color .2s ease; }
.local-cta:hover:enabled { background: var(--neon-pink); border-color: var(--neon-pink); color: #1a0010; box-shadow: 0 0 16px rgba(255, 45, 155, .55); }
.local-cta:disabled { opacity: .55; cursor: wait; }
.local-cta-main { background: var(--line-primary); border-color: var(--line-primary); color: #001a14; font-weight: bold; box-shadow: 0 0 16px rgba(0, 255, 204, .4); }
.local-status { min-height: 1.4em; margin: 0 0 8px; color: var(--text-muted); font-size: .88rem; }
.local-zones summary { color: var(--text-muted); cursor: pointer; font-size: .88rem; padding-block: 4px; }
.zone-chips { display: flex; flex-wrap: wrap; gap: 6px 8px; margin-top: 8px; }
.zone-chip { padding: 6px 12px; border: 1px solid rgba(0, 204, 255, .34); border-radius: 999px; background: rgba(0, 204, 255, .06); color: var(--line-secondary); font: inherit; font-size: .8rem; cursor: pointer; touch-action: manipulation; transition: background-color .15s ease, color .15s ease; }
.zone-chip:hover { background: var(--line-secondary); color: #001114; }
.zone-chip[aria-pressed="true"] { background: var(--neon-green); border-color: var(--neon-green); color: #001a00; font-weight: bold; }
.local-note { margin: 12px 0 0; color: var(--text-muted); font-size: .76rem; line-height: 1.5; max-width: 56ch; opacity: .85; }

.local-stations { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 26px; }
.local-meta { margin: -2px 0 10px; color: var(--text-muted); font-size: .8rem; }
/* A station that opens outside the player must not look like "Ouvir agora": hollow light, outlined link. */
.radar-blip-external { text-decoration: none; }
.radar-blip-external::before { box-sizing: border-box; background: #021417; border: 2px solid #ff2d9b; }
.local-external { align-self: flex-start; padding: 9px 16px; border: 1px solid var(--line-secondary); border-radius: 999px; color: var(--line-secondary); font-weight: bold; text-decoration: none; transition: background-color .2s ease, color .2s ease; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.local-external:hover, .local-external:focus-visible { background-color: var(--line-secondary); color: #001114; }
.local-external-note { margin: 8px 0 0; color: var(--text-muted); font-size: .74rem; line-height: 1.4; }
.local-more { display: block; margin: 18px auto 0; }
@media (max-width: 560px) {
  .local-external { align-self: stretch; padding: 13px 16px; font-size: 1rem; text-align: center; }
}

@media (max-width: 760px) {
  .local-top { grid-template-columns: minmax(0, 1fr); }
  .local-radar { width: min(100%, 330px); margin-inline: auto; }
  .local-side { text-align: left; }
  .radar-blip::after { font-size: .68rem; }
}
@media (prefers-reduced-motion: reduce) {
  .radar-sweep, .dock-radar-sweep { animation: none; opacity: .5; }
  .dock-radar-you::after { animation: none; opacity: 0; }
  .dock-radar-dot { animation: none; opacity: .9; }
  .dock-radar-disc { transition: none; }
  .radar-you::after { animation: none; opacity: 0; }
  .radar-blip::before { animation: none; opacity: .9; }
  .local-cta, .zone-chip, .radar-blip::after, .local-external { transition: none; }
}
