/* Radios.PRO — global (header/footer/hero) carregado em todas as paginas */

:root {
    --rp-bg: #0a0a14;
    --rp-bg-2: #11122a;
    --rp-accent: #4f8bff;
    --rp-accent-2: #7c3aed;
    --rp-text: #f4f5fb;
    --rp-muted: #9aa0b4;
}

/* Override do padding-top legado de .radio-detail-page (era 130px para a navbar antiga do AppRadio). */
.radio-detail-page,
main.radio-detail-page {
    padding-top: 24px;
}

/* Titulos de categorias do grid (".category-title") em styles.css fixam #000000.
   Em fundo escuro da home da radios.pro isso fica ilegivel — substituir aqui. */
.rp-body .category-title,
body .radio-grid-section .category-title,
body .radio-category-section .category-title {
    color: var(--rp-text);
}

.rp-body .category-detail,
body .radio-grid-section .category-detail,
body .radio-category-section .category-detail {
    color: var(--rp-muted);
}

/* ----------------------------------------------------------------
   Mini player flutuante (.music-player) — adaptado do appradio.pro
   para a paleta escura da radios.pro (em styles.css o background eh
   #ffffff e textos pretos).
   ---------------------------------------------------------------- */
.rp-music-player {
    /* Substitui background/borda do styles.css */
    background: linear-gradient(160deg, rgba(17, 18, 42, 0.92), rgba(10, 10, 20, 0.92)) !important;
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(10px) saturate(140%);
    -webkit-backdrop-filter: blur(10px) saturate(140%);
    color: var(--rp-text);
    /* Posicionamento (top:111px do styles.css colide com header sticky de 58px) */
    top: 150px !important;
    right: 16px !important;
    width: min(92vw, 320px);
    min-width: 248px;
    max-width: 420px;
    padding: 16px 18px !important;
}

.rp-music-player .music-player-content {
    gap: 12px;
}

.rp-music-player .play-music {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 14px;
}

.rp-music-player.playing .play-music {
    gap: 12px;
}

.rp-music-player.has-coverart .play-music {
    grid-template-columns: auto minmax(0, 1fr) 64px;
}

.rp-music-player .play-music-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
}

.rp-music-player .music-label {
    color: var(--rp-muted);
    display: block;
    font-size: 11px;
    line-height: 1.2;
    margin: 0 0 4px;
    flex-shrink: 0;
}

.rp-music-player .music-title-track {
    height: 20px;
    flex: 0 0 20px;
}

.rp-music-player .music-artist-track {
    height: 16px;
    flex: 0 0 16px;
    margin-top: 2px;
}

.rp-music-player .music-title {
    color: var(--rp-text);
    font-size: 16px;
    line-height: 20px;
    height: 20px;
    margin: 0;
    padding: 0;
    font-weight: 600;
    max-height: none;
    display: block;
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
    overflow: hidden;
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
    text-overflow: clip;
}

.rp-music-player .music-artist {
    color: var(--rp-text);
    opacity: 0.9;
    margin: 0;
    padding: 0;
    font-size: 12px;
    line-height: 16px;
    height: 16px;
    font-weight: 600;
    overflow: hidden;
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
    text-overflow: clip;
}

.rp-music-player .music-station {
    color: var(--rp-muted);
    margin: 0;
    font-size: 11px;
    line-height: 1.35;
    min-width: 0;
}

.rp-music-scroll {
    overflow: hidden;
    min-width: 0;
    max-width: 100%;
    position: relative;
}

.rp-music-scroll__text {
    display: inline-block;
    max-width: none;
    white-space: nowrap;
    vertical-align: top;
}

.rp-music-scroll.is-scrolling .rp-music-scroll__text {
    animation: rp-music-scroll 14s linear infinite;
    will-change: transform;
    padding-right: 1.25rem;
}

@keyframes rp-music-scroll {
    0%, 12% { transform: translateX(0); }
    88%, 100% { transform: translateX(calc(var(--scroll-distance, 0px) * -1)); }
}

@media (prefers-reduced-motion: reduce) {
    .rp-music-scroll.is-scrolling .rp-music-scroll__text {
        animation: none;
    }
}

.rp-music-player .music-coverart {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    object-fit: cover;
    margin: 0;
    grid-column: 3;
    grid-row: 1;
    align-self: center;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}

.rp-music-player-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}

.rp-music-player-footer-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.rp-music-player-favorite {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: var(--rp-text);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.rp-music-player-favorite:hover {
    background: rgba(79, 139, 255, 0.18);
    border-color: rgba(79, 139, 255, 0.35);
    transform: translateY(-1px);
}

.rp-music-player-favorite[hidden] {
    display: none !important;
}

.rp-music-player-favorite .favorite-icon-filled {
    display: none;
    color: #fb7185;
}

.rp-music-player-favorite.is-favorited .favorite-icon-empty {
    display: none;
}

.rp-music-player-favorite.is-favorited .favorite-icon-filled {
    display: inline-block;
}

.rp-music-player-favorite .radio-favorite-btn-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: radio-favorite-spin 0.65s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.rp-music-player-favorite.loading .radio-favorite-btn-spinner {
    display: block;
}

.rp-music-player-favorite.loading .favorite-icon-empty,
.rp-music-player-favorite.loading .favorite-icon-filled {
    visibility: hidden;
}

.rp-music-player-details {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    padding: 7px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: var(--rp-text);
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.rp-music-player-details:hover {
    background: rgba(79, 139, 255, 0.18);
    border-color: rgba(79, 139, 255, 0.35);
    transform: translateY(-1px);
}

.rp-music-player-details[hidden] {
    display: none !important;
}

.rp-music-player.playing {
    width: min(92vw, 380px);
}

.rp-music-player.playing.has-coverart {
    width: min(92vw, 420px);
}

.rp-music-player .play-button img {
    filter: invert(1);
}

.rp-music-player.playing .play-button {
    background: linear-gradient(135deg, var(--rp-accent), var(--rp-accent-2));
}

.rp-music-player.playing .play-button img {
    filter: brightness(0) invert(1);
}

@media (max-width: 720px) {
    .rp-music-player {
        top: auto !important;
        bottom: 12px !important;
        right: 12px !important;
        left: 12px !important;
        width: auto;
        min-width: 0;
        max-width: none;
    }

    .rp-music-player.playing,
    .rp-music-player.playing.has-coverart {
        width: auto;
    }

    .rp-music-player-details-label {
        display: none;
    }
}

/* As paginas internas (radio/, etc.) nao tem .rp-body — herdar tipografia do Poppins. */
body {
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
    /* Sticky footer: garante que rp-footer fique colado em baixo quando o
       conteudo nao preenche a viewport, eliminando espaco em branco apos
       o footer. */
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
}

body > main,
body > .container,
body > .app-landing-main {
    flex: 1 0 auto;
}

body > .rp-footer,
body > footer {
    flex-shrink: 0;
}

.rp-body {
    background: var(--rp-bg);
    color: var(--rp-text);
}

/* Header --------------------------------------------------- */
.rp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 24px;
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(10, 10, 20, 0.78);
    backdrop-filter: saturate(140%) blur(10px);
    -webkit-backdrop-filter: saturate(140%) blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.rp-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--rp-text);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.2px;
}

/* Em mobile o texto "Radios.PRO" da brand quebra o layout do header — só logo. */
@media (max-width: 640px) {
    .rp-brand span {
        display: none;
    }
}

.rp-brand img {
    width: 28px;
    height: 28px;
    min-width: 28px;
    max-width: 28px;
    object-fit: contain;
    flex: 0 0 auto;
}

.rp-brand em {
    font-style: normal;
    background: linear-gradient(90deg, var(--rp-accent), var(--rp-accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 800;
}

/* User menu (logado via whoami cross-domain) */
.rp-user-menu {
    position: relative;
    display: inline-block;
}

.rp-user-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: var(--rp-text);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease;
    font-family: inherit;
}

.rp-user-trigger:hover,
.rp-user-menu.is-open .rp-user-trigger {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(79, 139, 255, 0.45);
}

.rp-user-trigger i.fa-user-circle {
    font-size: 18px;
    color: var(--rp-accent);
}

.rp-user-name {
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rp-user-caret {
    font-size: 10px;
    opacity: 0.6;
    transition: transform 0.18s ease;
}

.rp-user-menu.is-open .rp-user-caret {
    transform: rotate(180deg);
}

.rp-user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    padding: 6px;
    background: #11122a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 100;
}

.rp-user-menu.is-open .rp-user-dropdown {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.rp-user-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--rp-text);
    text-decoration: none;
    font-size: 13px;
    transition: background 0.15s ease;
}

.rp-user-dropdown a:hover {
    background: rgba(79, 139, 255, 0.12);
}

.rp-user-dropdown a i {
    width: 16px;
    text-align: center;
    color: var(--rp-muted);
}

.rp-user-dropdown a.rp-user-logout {
    color: #ff8a8a;
}

.rp-user-dropdown a.rp-user-logout i {
    color: #ff8a8a;
}

@media (max-width: 720px) {
    .rp-user-name { max-width: 90px; }
    .rp-user-trigger { padding: 6px 10px; font-size: 13px; }
}

/* Login button no header */
.rp-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--rp-accent), var(--rp-accent-2));
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.2px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
    box-shadow: 0 4px 14px rgba(79, 139, 255, 0.25);
    white-space: nowrap;
}

.rp-login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(79, 139, 255, 0.35);
}

.rp-login-btn i {
    font-size: 13px;
    opacity: 0.95;
}

@media (max-width: 720px) {
    .rp-header { padding: 12px 16px; }
    .rp-login-btn { padding: 7px 12px; font-size: 13px; }
    .rp-login-btn span { display: none; }
    .rp-login-btn i { font-size: 16px; }
}

/* Header nav (Contato / Suporte / Sugestão) ----------------- */
.rp-header-nav {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}
.rp-header-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--rp-text);
    background: transparent;
    border: 1px solid transparent;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.rp-header-link:hover,
.rp-header-link:focus-visible {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: #fff;
    outline: none;
}
.rp-header-link i { font-size: 14px; opacity: 0.85; }
.rp-header-link--btn { background: transparent; }

/* "Loja" — encostado ao brand, ligeiramente destacado (azul sutil). */
.rp-brand-shop {
    margin-right: auto; /* afasta a nav do botão de loja */
    border-color: rgba(79, 139, 255, 0.28);
    background: rgba(79, 139, 255, 0.10);
    color: var(--rp-text);
}
.rp-brand-shop i { color: var(--rp-accent); opacity: 1; }
.rp-brand-shop:hover,
.rp-brand-shop:focus-visible {
    background: rgba(79, 139, 255, 0.18);
    border-color: rgba(79, 139, 255, 0.55);
}

@media (max-width: 880px) {
    .rp-header-link span { display: none; }
    .rp-header-link { padding: 7px 10px; }
    .rp-header-link i { font-size: 16px; opacity: 1; }
}

/* Modal de sugestão ---------------------------------------- */
.rp-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(5, 5, 12, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: rpModalFadeIn 0.18s ease;
}
.rp-modal-overlay[hidden] { display: none; }
@keyframes rpModalFadeIn { from { opacity: 0; } to { opacity: 1; } }

.rp-modal {
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    background: #14141c;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
    color: var(--rp-text);
    animation: rpModalSlideUp 0.22s ease;
}
@keyframes rpModalSlideUp {
    from { transform: translateY(12px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.rp-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.rp-modal-title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.rp-modal-title i { color: var(--rp-accent, #fbbf24); }
.rp-modal-close {
    background: transparent;
    border: none;
    color: var(--rp-text);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    opacity: 0.7;
    transition: opacity 0.15s;
}
.rp-modal-close:hover { opacity: 1; }

.rp-modal-body { padding: 18px 22px 20px; }
.rp-modal-hint { margin: 0 0 14px; font-size: 13.5px; color: rgba(255, 255, 255, 0.7); }

.rp-form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.rp-form-group label { font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, 0.85); }
.rp-required { color: #f87171; }
.rp-optional { color: rgba(255, 255, 255, 0.45); font-weight: 400; font-size: 12px; }

.rp-form-group input,
.rp-form-group textarea {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 10px 12px;
    color: var(--rp-text);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.15s, background 0.15s;
}
.rp-form-group input:focus,
.rp-form-group textarea:focus {
    outline: none;
    border-color: var(--rp-accent, #38bdf8);
    background: rgba(255, 255, 255, 0.07);
}
.rp-form-group textarea { resize: vertical; min-height: 90px; }

.rp-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 540px) { .rp-form-row { grid-template-columns: 1fr; } }

.rp-suggestion-feedback {
    margin: 8px 0 4px;
    font-size: 13px;
    min-height: 18px;
}
.rp-suggestion-feedback.is-pending { color: rgba(255, 255, 255, 0.65); }
.rp-suggestion-feedback.is-error   { color: #f87171; }
.rp-suggestion-feedback.is-success { color: #4ade80; }

.rp-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 14px;
}
.rp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}
.rp-btn--ghost {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.16);
    color: var(--rp-text);
}
.rp-btn--ghost:hover { background: rgba(255, 255, 255, 0.06); }
.rp-btn--primary {
    background: linear-gradient(90deg, var(--rp-accent, #38bdf8), var(--rp-accent-2, #818cf8));
    color: #0a0a14;
}
.rp-btn--primary:hover { filter: brightness(1.08); }
.rp-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Hero ----------------------------------------------------- */
.rp-hero {
    position: relative;
    overflow: hidden;
    padding: 56px 24px 56px;
    min-height: min(620px, 70vh);
    text-align: center;
    background:
        radial-gradient(1200px 480px at 50% -10%, rgba(79, 139, 255, 0.18), transparent 60%),
        radial-gradient(900px 420px at 80% 0%, rgba(124, 58, 237, 0.16), transparent 60%),
        var(--rp-bg);
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
@media (max-width: 640px) {
    .rp-hero {
        padding: 36px 18px 36px;
        min-height: min(520px, 80vh);
    }
}

.rp-hero-orbs {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

.rp-hero-orbs .orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.55;
    will-change: transform;
}

.rp-hero-orbs .orb-1 {
    width: 320px;
    height: 320px;
    left: -80px;
    top: -60px;
    background: #4f8bff;
    animation: rp-orb-drift-1 18s ease-in-out infinite;
}

.rp-hero-orbs .orb-2 {
    width: 260px;
    height: 260px;
    right: -60px;
    top: 20px;
    background: #7c3aed;
    animation: rp-orb-drift-2 22s ease-in-out infinite;
    animation-delay: -6s;
}

.rp-hero-orbs .orb-3 {
    width: 220px;
    height: 220px;
    left: 50%;
    top: 80%;
    background: #22d3ee;
    opacity: 0.35;
    transform: translate(-50%, -50%);
    animation: rp-orb-drift-3 26s ease-in-out infinite;
    animation-delay: -12s;
}

/* Movimento suave em ciclo (respira + deriva); cada orb com ritmo ligeiramente diferente */
@keyframes rp-orb-drift-1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(48px, 22px) scale(1.06); }
    66%      { transform: translate(18px, 44px) scale(1.03); }
}

@keyframes rp-orb-drift-2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(-44px, 32px) scale(1.08); }
    66%      { transform: translate(-20px, 14px) scale(1.04); }
}

@keyframes rp-orb-drift-3 {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    33%      { transform: translate(-44%, -56%) scale(1.08); }
    66%      { transform: translate(-56%, -48%) scale(1.04); }
}

@media (prefers-reduced-motion: reduce) {
    .rp-hero-orbs .orb,
    .rp-equalizer span,
    .rp-hero-title em { animation: none !important; }
}

/* Globo 3D (globe.gl) — preenche o hero, atrás do conteúdo, à frente dos orbs */
.rp-globe-canvas {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: auto;
    opacity: 0;
    transition: opacity 0.6s ease;
}
.rp-globe-canvas.is-ready {
    opacity: 1;
}
.rp-globe-canvas canvas {
    display: block;
    margin: 0 auto;
    cursor: grab;
}
.rp-globe-canvas canvas:active {
    cursor: grabbing;
}
/* Tooltip do globe.gl: sem pointer-events para não disputar hover com o canvas. */
.rp-globe-canvas .scene-tooltip {
    pointer-events: none !important;
}
/* Quando o globo está pronto, atenuamos os orbs para não competir visualmente */
.rp-hero.has-globe .rp-hero-orbs {
    opacity: 0.35;
    transition: opacity 0.6s ease;
}

.rp-hero-content {
    position: relative;
    z-index: 2;
    max-width: 720px;
    margin: 0 auto;
    pointer-events: none; /* deixa o globo receber drag por trás do título */
    transition: opacity 0.35s ease, transform 0.35s ease;
}
.rp-hero-content > * {
    pointer-events: auto;
}

/* Ao interagir com o globo, o conteúdo do hero some para dar espaço ao mapa.
   Volta só quando o utilizador clica fora do hero (handler em rp-globe.js). */
.rp-hero.is-interacted .rp-hero-content {
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
}
.rp-hero.is-interacted .rp-hero-content > * {
    pointer-events: none;
}

/* Mini-player flutuante: oculto enquanto o hero está em vista (evita
   sobreposição com o popover do globo). Toggle via IntersectionObserver. */
.rp-music-player {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
/* Player só some no hero quando não há stream ativo (nem tocando, carregando ou com erro). */
body.rp-in-hero-view .rp-music-player:not(.playing):not(.loading):not(.has-error) {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.rp-globe-user-info {
    display: inline-block;
    margin: 14px auto 0;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.55);
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 500;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Controles do globo (zoom in/out, desfocar) — canto inferior-esquerdo do hero */
.rp-globe-controls {
    position: absolute;
    left: 16px;
    bottom: 16px;
    z-index: 4;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.rp-globe-ctrl {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.78);
    color: #e2e8f0;
    font-size: 14px;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.rp-globe-ctrl:hover {
    background: rgba(30, 41, 59, 0.92);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45);
}
.rp-globe-ctrl:active {
    transform: translateY(0);
}
.rp-globe-ctrl-unfocus {
    /* Acento sutil no botão de "voltar à vista geral" */
    background: linear-gradient(135deg, rgba(79, 139, 255, 0.78), rgba(124, 58, 237, 0.78));
    color: #fff;
    border-color: rgba(255, 255, 255, 0.18);
}
.rp-globe-ctrl-unfocus:hover {
    background: linear-gradient(135deg, rgba(79, 139, 255, 0.95), rgba(124, 58, 237, 0.95));
}

/* Botão de toggle da rotação automática — quando ativo, ganha o gradiente
   ciano-violeta. Quando inativo, fica no estilo neutro como os outros. */
.rp-globe-ctrl-rotate.is-active {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.78), rgba(124, 58, 237, 0.78));
    color: #fff;
    border-color: rgba(255, 255, 255, 0.18);
}
.rp-globe-ctrl-rotate.is-active i {
    animation: rp-rotate-spin 4s linear infinite;
}
.rp-globe-ctrl-rotate:hover {
    background: rgba(30, 41, 59, 0.92);
}
.rp-globe-ctrl-rotate.is-active:hover {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.95), rgba(124, 58, 237, 0.95));
}
@keyframes rp-rotate-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
    .rp-globe-controls {
        left: 12px;
        bottom: 12px;
        gap: 6px;
    }
    .rp-globe-ctrl {
        width: 34px;
        height: 34px;
        font-size: 13px;
    }
}

/* ========================================================================
   Modal 2D — mapa Leaflet da região (aberto ao clicar num cluster do globo)
   ======================================================================== */
.rp-region-map-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(2, 6, 23, 0.86);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
    animation: rp-region-fade-in 0.25s ease;
}
.rp-region-map-overlay[hidden] { display: none; }
@keyframes rp-region-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.rp-region-map-card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1100px;
    height: min(720px, calc(100vh - 48px));
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}
.rp-region-map-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.92);
    color: #f1f5f9;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    transition: background 0.15s ease, transform 0.15s ease;
}
.rp-region-map-close:hover {
    background: rgba(30, 41, 59, 1);
    transform: scale(1.05);
}
.rp-region-map-header {
    padding: 18px 60px 12px 22px;
    color: #f1f5f9;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.rp-region-map-title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
}
.rp-region-map-meta {
    margin: 4px 0 0;
    font-size: 13px;
    color: #94a3b8;
}
.rp-region-map-body {
    flex: 1 1 auto;
    position: relative;
    min-height: 0;
    overflow: hidden;
}
.rp-region-map-canvas {
    width: 100%;
    height: 100%;
    min-height: 240px;
}
.rp-region-map-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #cbd5e1;
    font-size: 14px;
    background: rgba(15, 23, 42, 0.85);
    z-index: 5;
}
.rp-region-map-loading[hidden] { display: none; }
.rp-region-map-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.18);
    border-top-color: var(--rp-accent, #4f8bff);
    border-radius: 50%;
    animation: rp-globe-spin 0.7s linear infinite;
}
/* Marcador customizado — bolinha estilo radio.garden */
.rp-region-marker { background: transparent !important; border: none !important; }
.rp-region-marker .rp-region-marker-dot {
    display: block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: radial-gradient(circle, #34d399 0%, #059669 70%);
    box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.25), 0 0 10px rgba(52, 211, 153, 0.55);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    margin: 2px;
}
.rp-region-marker:hover .rp-region-marker-dot {
    transform: scale(1.4);
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.4), 0 0 14px rgba(52, 211, 153, 0.75);
}

/* Cluster bubble — agrupa marcadores sobrepostos (Leaflet.markercluster) */
.rp-region-cluster { background: transparent !important; border: none !important; }
.rp-region-cluster .rp-region-cluster-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(52, 211, 153, 0.95) 0%, rgba(5, 150, 105, 0.85) 70%);
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.3), 0 0 18px rgba(52, 211, 153, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #04221b;
    font-weight: 800;
    font-family: Poppins, system-ui, sans-serif;
    font-size: 13px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.rp-region-cluster:hover .rp-region-cluster-inner {
    transform: scale(1.08);
    box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.45), 0 0 24px rgba(52, 211, 153, 0.75);
}
/* Popup Leaflet — re-tematizado dark */
.leaflet-popup-content-wrapper {
    background: rgba(15, 23, 42, 0.96) !important;
    color: #f1f5f9 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45) !important;
}
.leaflet-popup-tip { background: rgba(15, 23, 42, 0.96) !important; }
.leaflet-popup-close-button { color: #cbd5e1 !important; }
.rp-region-popup {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
    padding: 4px 6px;
    min-width: 140px;
}
.rp-region-popup-logo {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
    margin-bottom: 4px;
    background: rgba(255, 255, 255, 0.05);
}
.rp-region-popup strong {
    font-size: 13px;
    color: #f8fafc;
    line-height: 1.3;
}
.rp-region-popup span {
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.3;
}

/* Lista de rádios — popup aberto ao clicar num badge de cluster */
.rp-cluster-popup .leaflet-popup-content {
    margin: 10px 12px;
}
.rp-cluster-list-header {
    font-size: 13px;
    color: #cbd5e1;
    margin: 0 0 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.rp-cluster-list-header strong { color: #f8fafc; }

/* Input de filtro por nome dentro do popup de cluster */
.rp-cluster-filter-wrap {
    position: relative;
    margin: 0 0 8px;
}
.rp-cluster-filter-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 11px;
    pointer-events: none;
}
.rp-cluster-filter {
    width: 100%;
    padding: 7px 10px 7px 28px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 8px;
    color: #f1f5f9;
    font-size: 12.5px;
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.rp-cluster-filter::placeholder { color: #64748b; }
.rp-cluster-filter:focus {
    border-color: rgba(52, 211, 153, 0.5);
    background: rgba(255, 255, 255, 0.08);
}
/* Remove o "X" nativo dos browsers para inputs type=search */
.rp-cluster-filter::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.rp-cluster-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 280px;
    overflow-y: auto;
    min-width: 220px;
    padding-right: 2px;
    /* scrollbar dark */
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}
.rp-cluster-list::-webkit-scrollbar { width: 6px; }
.rp-cluster-list::-webkit-scrollbar-track { background: transparent; }
.rp-cluster-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 3px;
}
.rp-cluster-list-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    color: #f1f5f9;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: background 0.15s ease, border-color 0.15s ease;
    width: 100%;
}
.rp-cluster-list-item:hover,
.rp-cluster-list-item:focus {
    background: rgba(52, 211, 153, 0.10);
    border-color: rgba(52, 211, 153, 0.35);
    outline: none;
}
.rp-cluster-list-logo {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.05);
}
.rp-cluster-list-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.rp-cluster-list-title {
    font-size: 12.5px;
    font-weight: 600;
    color: #f8fafc;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rp-cluster-list-meta {
    font-size: 10.5px;
    color: #94a3b8;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rp-cluster-list-play {
    color: #34d399;
    font-size: 12px;
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.15s ease, transform 0.15s ease;
}
.rp-cluster-list-item:hover .rp-cluster-list-play {
    opacity: 1;
    transform: scale(1.15);
}
@media (max-width: 640px) {
    .rp-region-map-overlay { padding: 12px; }
    .rp-region-map-card { height: calc(100vh - 24px); border-radius: 14px; }
    .rp-region-map-header { padding: 14px 50px 10px 16px; }
    .rp-region-map-title { font-size: 15px; }
    .rp-region-map-meta { font-size: 12px; }
}

/* Popover ancorado ao cluster clicado — desktop: lado direito; mobile: bottom sheet */
.rp-globe-popover {
    position: absolute;
    z-index: 3;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    width: min(360px, calc(100% - 48px));
    max-height: calc(100% - 48px);
    overflow-y: auto;
    background: rgba(15, 23, 42, 0.92);
    color: #f1f5f9;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 18px 18px 14px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: rp-globe-popover-in 0.2s ease;
    text-align: left;
}
@keyframes rp-globe-popover-in {
    from { opacity: 0; transform: translate(20px, -50%); }
    to   { opacity: 1; transform: translate(0, -50%); }
}
.rp-globe-popover[hidden] { display: none; }
.rp-globe-popover-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #f1f5f9;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease;
}
.rp-globe-popover-close:hover {
    background: rgba(255, 255, 255, 0.16);
}
.rp-globe-popover-head {
    margin: 0 32px 12px 0;
}
.rp-globe-popover-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #f8fafc;
}
.rp-globe-popover-meta {
    margin: 4px 0 0;
    font-size: 12px;
    color: #94a3b8;
}
.rp-globe-popover-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    color: #cbd5e1;
    font-size: 13px;
}
.rp-globe-popover-loading[hidden] { display: none; }
.rp-globe-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--rp-accent, #4f8bff);
    border-radius: 50%;
    animation: rp-globe-spin 0.7s linear infinite;
}
@keyframes rp-globe-spin {
    to { transform: rotate(360deg); }
}
.rp-globe-popover-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.rp-globe-popover-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.15s ease, transform 0.15s ease;
}
.rp-globe-popover-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}
.rp-globe-popover-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.06);
}
.rp-globe-popover-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.rp-globe-popover-info strong {
    font-size: 13px;
    color: #f1f5f9;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rp-globe-popover-info span {
    font-size: 11px;
    color: #94a3b8;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rp-globe-popover-play {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--rp-accent, #4f8bff), var(--rp-accent-2, #7c3aed));
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 4px 10px rgba(79, 139, 255, 0.4);
}
.rp-globe-popover-play:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 14px rgba(79, 139, 255, 0.55);
}
.rp-globe-popover-empty {
    margin: 10px 0;
    font-size: 13px;
    color: #94a3b8;
    text-align: center;
}

/* Mobile: popover vira bottom-sheet em vez de lateral */
@media (max-width: 640px) {
    .rp-globe-popover {
        right: 12px;
        left: 12px;
        bottom: 12px;
        top: auto;
        transform: none;
        width: auto;
        max-height: 60%;
        animation: rp-globe-popover-in-mobile 0.22s ease;
    }
    @keyframes rp-globe-popover-in-mobile {
        from { opacity: 0; transform: translateY(20px); }
        to   { opacity: 1; transform: translateY(0); }
    }
}

.rp-hero-title {
    font-size: clamp(40px, 7vw, 76px);
    line-height: 1;
    margin: 0 0 16px;
    font-weight: 900;
    letter-spacing: -1.5px;
}

.rp-hero-title em {
    font-style: normal;
    display: inline-block;
    background: linear-gradient(
        110deg,
        var(--rp-accent) 0%,
        #93b8ff 22%,
        var(--rp-accent-2) 45%,
        #c4b5fd 68%,
        var(--rp-accent) 100%
    );
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation:
        rp-pro-shimmer 5.5s ease-in-out infinite,
        rp-pro-bob 2.8s ease-in-out infinite;
}

@keyframes rp-pro-shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes rp-pro-bob {
    0%, 100% { transform: translateY(0); }
    33% { transform: translateY(-4px); }
    66% { transform: translateY(3px); }
}

.rp-hero-tagline {
    margin: 14px 0 0;
    color: var(--rp-muted);
    font-size: clamp(14px, 1.6vw, 17px);
}

/* Equalizer ------------------------------------------------ */
.rp-equalizer {
    display: inline-flex;
    align-items: flex-end;
    gap: 5px;
    height: 36px;
    margin: 6px auto 0;
}

.rp-equalizer span {
    display: inline-block;
    width: 5px;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--rp-accent), var(--rp-accent-2));
    transform-origin: bottom;
    animation: rp-eq 1.1s ease-in-out infinite;
}

.rp-equalizer span:nth-child(1)  { animation-delay: -1.0s; height: 60%; }
.rp-equalizer span:nth-child(2)  { animation-delay: -0.6s; height: 90%; }
.rp-equalizer span:nth-child(3)  { animation-delay: -0.2s; height: 50%; }
.rp-equalizer span:nth-child(4)  { animation-delay: -0.8s; height: 80%; }
.rp-equalizer span:nth-child(5)  { animation-delay: -0.4s; height: 100%; }
.rp-equalizer span:nth-child(6)  { animation-delay: -0.1s; height: 70%; }
.rp-equalizer span:nth-child(7)  { animation-delay: -0.5s; height: 85%; }
.rp-equalizer span:nth-child(8)  { animation-delay: -0.3s; height: 55%; }
.rp-equalizer span:nth-child(9)  { animation-delay: -0.7s; height: 95%; }
.rp-equalizer span:nth-child(10) { animation-delay: -0.9s; height: 65%; }

@keyframes rp-eq {
    0%, 100% { transform: scaleY(0.35); }
    50%      { transform: scaleY(1); }
}

/* Search — tema radios.pro (glass dark + accent) ----------- */
.figma-search {
    background: transparent;
    padding: 18px 16px 8px;
}
.figma-search-inner {
    max-width: 1100px;
    margin: 0 auto;
}
.figma-search-controls {
    gap: 14px;
}

/* Pill principal de busca */
.figma-search-controls .search-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    min-height: 54px;
    overflow: hidden;
}
.figma-search-controls .search-pill:hover {
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.06);
}
.figma-search-controls .search-pill:focus-within {
    border-color: var(--rp-accent, #38bdf8);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18), 0 6px 22px rgba(56, 189, 248, 0.18);
    background: rgba(255, 255, 255, 0.07);
}
.figma-search-controls .search-pill.is-loading {
    border-color: var(--rp-accent, #38bdf8);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.35), 0 6px 22px rgba(56, 189, 248, 0.18);
}

.figma-search-controls .search-pill input {
    color: var(--rp-text, #f4f4f5);
    background: transparent;
    font-size: 15px;
    font-weight: 500;
    padding: 16px 4px 16px 24px;
    caret-color: var(--rp-accent, #38bdf8);
}
.figma-search-controls .search-pill input::placeholder {
    color: rgba(255, 255, 255, 0.45);
    font-weight: 400;
}
.figma-search-controls .search-pill input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: rgba(255, 255, 255, 0.55);
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M18 6L6 18M6 6l12 12' stroke='black' stroke-width='2' stroke-linecap='round' fill='none'/></svg>") center/contain no-repeat;
            mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M18 6L6 18M6 6l12 12' stroke='black' stroke-width='2' stroke-linecap='round' fill='none'/></svg>") center/contain no-repeat;
    cursor: pointer;
    margin-right: 6px;
}

/* Botão lupa — gradient circular do brand radios.pro */
.figma-search-controls .search-btn {
    background: linear-gradient(135deg, var(--rp-accent, #38bdf8), var(--rp-accent-2, #818cf8));
    width: 44px;
    height: 44px;
    margin-right: 6px;
    transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.35);
    flex: 0 0 44px;
}
.figma-search-controls .search-btn:hover {
    filter: brightness(1.08);
    transform: scale(1.04);
}
.figma-search-controls .search-btn:active {
    transform: scale(0.96);
}
.figma-search-controls .search-btn img {
    width: 18px;
    height: 18px;
    /* converte o PNG da lupa preta em branco puro */
    filter: brightness(0) invert(1);
}

/* Filtros: select de segmento + input de localização */
.figma-search-controls .search-filters {
    gap: 12px;
}
.figma-search-controls .search-filters select,
.figma-search-controls .search-filters input {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    color: var(--rp-text, #f4f4f5);
    font-size: 14px;
    padding: 12px 18px;
    min-height: 48px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}
.figma-search-controls .search-filters select:hover,
.figma-search-controls .search-filters input:hover {
    border-color: rgba(255, 255, 255, 0.22);
    background-color: rgba(255, 255, 255, 0.06);
}
.figma-search-controls .search-filters select:focus,
.figma-search-controls .search-filters input:focus {
    border-color: var(--rp-accent, #38bdf8);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
    background-color: rgba(255, 255, 255, 0.07);
    outline: none;
}
.figma-search-controls .search-filters input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}
/* Seta do select em branco — sobrescreve o stroke=currentColor (que herda dark) */
.figma-search-controls .search-filters select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    padding-right: 38px;
}
/* Options dentro do select dropdown ficam com fundo escuro nativo do browser */
.figma-search-controls .search-filters select option {
    background: #14141c;
    color: var(--rp-text, #f4f4f5);
}

/* Mobile: empilha filtros */
@media (max-width: 720px) {
    .figma-search-controls .search-filters {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }
    .figma-search-controls .search-filters select,
    .figma-search-controls .search-filters input {
        width: 100%;
        min-width: 0;
    }
}

/* Footer --------------------------------------------------- */
.rp-footer {
    margin-top: 48px;
    padding: 32px 16px 28px;
    background: #07070f;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--rp-text);
}

.rp-footer-inner {
    max-width: 960px;
    margin: 0 auto;
    text-align: center;
    color: var(--rp-muted);
    font-size: 13px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.rp-footer-brand {
    margin: 0;
    font-weight: 800;
    color: var(--rp-text);
    font-size: 18px;
    letter-spacing: 0.2px;
}

.rp-footer-brand em {
    font-style: normal;
    background: linear-gradient(90deg, var(--rp-accent), var(--rp-accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.rp-footer-cta {
    margin: 0;
    max-width: 520px;
    line-height: 1.5;
}

.rp-footer-links {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 4px 0 2px;
}

.rp-footer-links a {
    color: var(--rp-muted);
    text-decoration: none;
    font-size: 13px;
}

.rp-footer-links a:hover {
    color: var(--rp-text);
}

.rp-footer-copy {
    margin: 6px 0 0;
    font-size: 12px;
    opacity: 0.75;
}

.rp-footer a {
    color: var(--rp-accent);
    text-decoration: none;
}

.rp-footer a:hover { text-decoration: underline; }

/* Cor consistente do <body> em paginas internas (claras vs escuras) */
.radio-detail-page {
    color: #1a1d2b;
}

/* Garantir contraste minimo do texto do footer mesmo em paginas claras */
.rp-footer { color: var(--rp-text); }

/* ----------------------------------------------------------------
   "Carregar mais" sutil por categoria (seta para baixo)
   Botão centrado abaixo de cada .radio-category-grid; busca o
   próximo bloco de rádios do landing daquela categoria.
   ---------------------------------------------------------------- */
.radio-category-load-more {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

.radio-category-load-more-btn {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: var(--rp-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition:
        transform 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        box-shadow 0.18s ease;
}

.radio-category-load-more-btn i {
    font-size: 14px;
    line-height: 1;
    transition: transform 0.18s ease;
}

.radio-category-load-more-btn:hover {
    background: rgba(79, 139, 255, 0.14);
    border-color: rgba(79, 139, 255, 0.55);
    color: var(--rp-text);
    box-shadow: 0 4px 14px rgba(79, 139, 255, 0.18);
}

.radio-category-load-more-btn:hover i {
    transform: translateY(2px);
}

.radio-category-load-more-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 139, 255, 0.35);
}

.radio-category-load-more-btn:disabled {
    cursor: progress;
    opacity: 0.75;
}

.radio-category-load-more-btn.is-loading i {
    opacity: 0;
}

.radio-category-load-more-spinner {
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.18);
    border-top-color: var(--rp-accent);
    opacity: 0;
    pointer-events: none;
    animation: rp-load-more-spin 0.8s linear infinite;
}

.radio-category-load-more-btn.is-loading .radio-category-load-more-spinner {
    opacity: 1;
}

@keyframes rp-load-more-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .radio-category-load-more-btn,
    .radio-category-load-more-btn i,
    .radio-category-load-more-spinner {
        transition: none !important;
        animation: none !important;
    }
}

/*
 * Sticky footer em radio/radio.php: com pouco conteúdo (ex.: sem estatísticas),
 * o footer fica no fundo da janela em vez de subir com o conteúdo curto.
 * Só aplica quando o <body> tem <main class="radio-detail-page"> como filho directo.
 */
body:has(> main.radio-detail-page) {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

/* Primeiro script (i18n) não deve ocupar espaço no layout flex */
body:has(> main.radio-detail-page) > script:first-of-type {
    flex: 0 0 0;
    min-height: 0;
    height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
    border: 0;
    display: block;
}

body:has(> main.radio-detail-page) > main.radio-detail-page {
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

body:has(> main.radio-detail-page) > .rp-footer {
    flex-shrink: 0;
}

/* ----------------------------------------------------------------
   Home — entrada suave das rádios no grid (#dynamic-radio-grid)
   ---------------------------------------------------------------- */
#dynamic-radio-grid .radio-category-section.radio-section--enter .radio-category-header {
    opacity: 0;
    transform: translateY(10px);
}

#dynamic-radio-grid .radio-category-section.radio-section--enter.is-visible .radio-category-header {
    opacity: 1;
    transform: none;
    transition:
        opacity 0.38s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: calc(min(var(--section-stagger, 0), 4) * 60ms);
}

#dynamic-radio-grid .radio-card.radio-card--enter {
    opacity: 0;
    transform: translateY(16px);
}

#dynamic-radio-grid .radio-card.radio-card--enter.is-visible {
    opacity: 1;
    transform: translateY(0);
    transition:
        opacity 0.44s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.44s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: calc(min(var(--stagger, 0), 12) * 48ms);
}

/* Durante a animação de entrada, manter hover funcional (transform fixo da entrada tinha prioridade). */
#dynamic-radio-grid .radio-card.radio-card--enter.is-visible:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

@media (prefers-reduced-motion: reduce) {
    #dynamic-radio-grid .radio-category-section.radio-section--enter .radio-category-header,
    #dynamic-radio-grid .radio-card.radio-card--enter {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
