/* FlyingRadio branding overrides */
html,
body {
  background-color: #2b2b2b !important;
  color: #fff !important;
}

html[data-mode="light"],
html:not([data-mode="dark"]) {
  --color-background-1-rgb: 43, 43, 43;
  --color-background-1: rgb(43, 43, 43);
  --color-foreground-rgb: 255, 255, 255;
  --color-foreground: #fff;
  --theme-background: #2b2b2b;
}

.playIcon.isLoading svg circle {
  stroke: #00E070 !important;
}

#fr-boot {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: #2b2b2b;
  color: #fff;
  font-family: system-ui, sans-serif;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

#fr-boot.fr-done {
  opacity: 0;
  visibility: hidden;
}

#fr-boot-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(255,255,255,0.15);
  border-top-color: #00E070;
  border-radius: 50%;
  animation: fr-spin 0.9s linear infinite;
}

@keyframes fr-spin {
  to { transform: rotate(360deg); }
}

:root {
  --color-primary-rgb-bright: 0, 224, 112;
  --color-primary-intense: rgb(0, 255, 130);
}

/* Hide MapTiler / map attribution */
.maplibregl-ctrl-attrib,
.maplibregl-compact-show,
a[href*="maptiler"],
[class*="attribution"],
[class*="maptiler"],
.maplibregl-ctrl-bottom-right .maplibregl-ctrl-attrib-button {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Hide Radio Garden app promo in settings */
[class*="appPromo"],
[class*="AppPromo"],
[class*="app-promo"],
[class*="storeButtons"],
[class*="StoreButtons"],
a[href*="play.google.com/store/apps/details"],
a[href*="itunes.apple.com"],
a[href*="apps.apple.com"] {
  display: none !important;
}

/* Hide ads */
ins.adsbygoogle,
[class*="google-revocation"],
iframe[src*="googlesyndication"],
iframe[src*="doubleclick"] {
  display: none !important;
}

/* Slightly smaller globe */
[class*="globeContainer"] {
  transform: scale(0.93);
  transform-origin: center center;
}

/* FlyingRadio header — minimal wordmark */
#fr-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 0;
  pointer-events: none;
}

#fr-brand {
  pointer-events: auto;
  display: flex;
  align-items: center;
  padding: 2px 0;
  text-decoration: none;
  color: #fff;
}

#fr-brand img {
  width: auto;
  height: 22px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(93, 255, 200, 0.25));
}

/* Twitter — same style as map HUD buttons (bottom-right stack) */
.fr-hud-btn {
  width: var(--hud-button-size, 52px);
  height: var(--hud-button-size, 52px);
  flex-shrink: 0;
  pointer-events: all;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fr-hud-btn + div,
[class*="iconContainer"] > div + .fr-hud-btn {
  margin-top: var(--margin-50, 7.5px);
}

#fr-twitter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: var(--corner-radius, 10px);
  background: rgb(var(--color-white-rgb, 255, 255, 255), var(--dim-15, 0.15));
  color: var(--color-map-foreground, #fff);
  text-decoration: none;
  transition: background 0.15s ease;
}

#fr-twitter:hover {
  background: rgb(var(--color-white-rgb, 255, 255, 255), var(--dim-20, 0.2));
}

#fr-twitter svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
  filter: drop-shadow(var(--map-hud-shadow, 0 0 1px rgba(0, 0, 0, 0.3)));
}

/* Search — Twitter panel when query is "t" */
.fr-search-twitter-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: var(--margin-50, 8px) var(--margin, 15px) 0;
  padding: 11px 14px;
  border-radius: var(--corner-radius, 10px);
  background: rgb(var(--color-white-rgb, 255, 255, 255), var(--dim-15, 0.15));
  text-decoration: none;
  color: var(--color-foreground, #fff);
  font-family: 'Atlas Grotesk Web', Helvetica, Arial, sans-serif;
  transition: background 0.15s ease;
}

.fr-search-twitter-panel:hover {
  background: rgb(var(--color-white-rgb, 255, 255, 255), var(--dim-20, 0.2));
}

.fr-search-twitter-icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgb(var(--color-white-rgb, 255, 255, 255), var(--dim-10, 0.1));
  color: #fff;
}

.fr-search-twitter-icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.fr-search-twitter-copy {
  min-width: 0;
  flex: 1;
}

.fr-search-twitter-title {
  font-size: var(--type-3-size, 1rem);
  line-height: 1.25;
}

.fr-search-twitter-sub {
  margin-top: 2px;
  font-size: var(--type-4-size, 0.875rem);
  color: var(--color-foreground-alpha-50, rgba(255, 255, 255, 0.55));
}

.fr-search-twitter-arrow {
  flex-shrink: 0;
  opacity: 0.45;
  font-size: 1.1rem;
}

@media (max-width: 450px) {
  #fr-header { padding-top: calc(env(safe-area-inset-top, 0px) + 8px); }
  #fr-brand img { height: 20px; }
}
