/*
Theme Name: Radio Lo Chacón FM API SonicPanel
Theme URI: https://example.com/
Author: Radio Lo Chacón FM
Author URI: https://example.com/
Description: Tema compacto para Radio Lo Chacón FM que obtiene canción y carátula desde la salida JSON oficial de SonicPanel.
Version: 3.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: radio-lo-chacon
Tags: entertainment, custom-background, custom-logo, full-width-template
*/

*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --rlc-red: #e00000;
    --rlc-red-bright: #ff2323;
    --rlc-red-soft: rgba(255, 0, 0, .18);
    --rlc-white: #ffffff;
    --rlc-black: #050505;
    --rlc-muted: rgba(255,255,255,.80);
    --rlc-line: rgba(255,255,255,.28);
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100%;
    background: #090909;
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
}

body.admin-bar .rlc-site {
    min-height: calc(100vh - 32px);
}

img {
    max-width: 100%;
    height: auto;
}

button,
input {
    font: inherit;
}

.rlc-site {
    min-height: 100vh;
}

.rlc-radio {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: clamp(22px, 4vw, 48px);
    overflow: hidden;
    background: url("assets/images/fondo-radio.png") center center / cover no-repeat;
}

.rlc-radio::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(circle at 18% 36%, rgba(255,0,0,.10), transparent 24%),
        radial-gradient(circle at 82% 38%, rgba(255,0,0,.22), transparent 22%),
        linear-gradient(180deg, rgba(0,0,0,.30), rgba(0,0,0,.58));
}

.rlc-radio::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(135deg, rgba(0,0,0,.67), rgba(0,0,0,.34) 40%, rgba(0,0,0,.56));
}

.rlc-player-shell {
    width: min(1020px, 100%);
}

.rlc-radio__panel {
    position: relative;
    width: 100%;
    border: 1px solid rgba(255,255,255,.46);
    border-radius: 28px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.04)),
        linear-gradient(135deg, rgba(17,17,17,.46), rgba(7,7,7,.18));
    box-shadow:
        0 18px 50px rgba(0,0,0,.45),
        inset 0 1px 0 rgba(255,255,255,.20);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    overflow: hidden;
}

.rlc-radio__main {
    display: grid;
    grid-template-columns: minmax(145px, 205px) 1fr minmax(155px, 220px);
    align-items: center;
    gap: clamp(12px, 1.6vw, 18px);
    padding: clamp(16px, 2.2vw, 24px);
}

.rlc-radio__logo-side {
    display: flex;
    justify-content: center;
    align-items: center;
}

.rlc-radio__logo-wrap {
    position: relative;
    width: min(100%, 180px);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255,255,255,.94);
    box-shadow:
        0 0 0 3px rgba(255,255,255,.64),
        0 0 0 9px rgba(255,255,255,.06),
        0 0 32px rgba(255,0,0,.45);
}

.rlc-radio__logo-wrap::after {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: inherit;
    border: 2px solid rgba(255,40,40,.82);
    box-shadow: 0 0 18px rgba(255,0,0,.45);
    pointer-events: none;
}

.rlc-radio__logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.rlc-radio__center {
    min-width: 0;
    padding-left: clamp(10px, 2vw, 26px);
    border-left: 1px solid var(--rlc-line);
}

.rlc-radio__title-top {
    margin: 0 0 4px;
    font-size: clamp(24px, 3.2vw, 42px);
    line-height: .92;
    font-weight: 900;
    letter-spacing: -2px;
}

.rlc-radio__title-top span {
    display: inline-block;
    color: #fff;
}

.rlc-radio__title-main {
    margin: 0;
    font-size: clamp(32px, 4.7vw, 62px);
    line-height: .88;
    letter-spacing: -3px;
    font-weight: 900;
    color: var(--rlc-red-bright);
    text-shadow: 0 6px 20px rgba(0,0,0,.48);
}

.rlc-radio__title-main em {
    font-style: italic;
}

.rlc-radio__title-fm {
    color: #fff;
    font-style: normal;
}

.rlc-radio__slogan {
    display: inline-block;
    margin: 10px 0 0;
    padding: 0 0 8px;
    border-bottom: 4px solid var(--rlc-red);
    color: #fff;
    font-size: clamp(14px, 1.4vw, 22px);
    font-style: italic;
    font-weight: 700;
}

.rlc-radio__badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-top: 12px;
}

.rlc-live-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 13px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255,45,45,.26), rgba(180,0,0,.40));
    border: 1px solid rgba(255,105,105,.56);
    box-shadow: 0 0 16px rgba(255,0,0,.20);
    font-size: clamp(11px, .8vw, 13px);
    font-weight: 900;
}

.rlc-live-pill__dot {
    width: 10px;
    height: 9px;
    border-radius: 50%;
    background: #ff4949;
    box-shadow: 0 0 0 5px rgba(255,45,45,.16);
    animation: rlcPulse 1.25s infinite;
}

.rlc-listen-copy {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding-left: 12px;
    border-left: 1px solid var(--rlc-line);
    font-size: clamp(13px, 1vw, 15px);
    line-height: 1.2;
    color: #fff;
}

.rlc-listen-copy__icon {
    font-size: clamp(19px, 1.3vw, 22px);
    color: #ff2a2a;
    text-shadow: 0 0 12px rgba(255,0,0,.30);
}

.rlc-listen-copy__text small {
    display: block;
    color: rgba(255,255,255,.82);
    font-size: .95em;
}

.rlc-radio__action {
    display: flex;
    justify-content: center;
    align-items: center;
}

.rlc-play-wrap {
    position: relative;
    width: clamp(115px, 10vw, 150px);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 50%, rgba(255,255,255,.24), rgba(255,255,255,.06) 66%, rgba(255,255,255,.00) 70%);
    box-shadow:
        inset 0 0 0 2px rgba(255,255,255,.44),
        0 0 28px rgba(255,0,0,.24);
}

.rlc-play-wrap::before,
.rlc-play-wrap::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.rlc-play-wrap::before {
    inset: 10px;
    border: 1px solid rgba(255,255,255,.32);
}

.rlc-play-wrap::after {
    inset: -8px;
    border: 1px solid rgba(255,50,50,.62);
    box-shadow: 0 0 20px rgba(255,0,0,.22);
}

.rlc-play {
    position: relative;
    width: 68%;
    height: 68%;
    padding: 0;
    border: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 35% 28%, #ff5757, #e00000 55%, #9f0000);
    color: #fff;
    box-shadow:
        0 12px 28px rgba(0,0,0,.30),
        0 0 26px rgba(255,0,0,.28);
    cursor: pointer;
    transition: transform .2s ease, filter .2s ease;
}

.rlc-play:hover {
    transform: scale(1.035);
    filter: brightness(1.06);
}

.rlc-play:active {
    transform: scale(.97);
}

.rlc-play__icon {
    width: 0;
    height: 0;
    margin-left: 8px;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-left: 23px solid #fff;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.25));
}

.rlc-radio.is-playing .rlc-play__icon {
    width: 21px;
    height: 18px;
    margin-left: 0;
    border: 0;
    background: linear-gradient(to right, #fff 0 34%, transparent 34% 66%, #fff 66% 100%);
}

.rlc-radio__bottom {
    display: grid;
    grid-template-columns: minmax(190px, 1fr) minmax(190px, 1fr) minmax(190px, .9fr);
    align-items: center;
    gap: 14px;
    padding: 14px 16px 15px;
    border-top: 1px solid rgba(255,255,255,.22);
    background: linear-gradient(180deg, rgba(0,0,0,.26), rgba(0,0,0,.40));
}

.rlc-meta {
    display: flex;
    align-items: center;
    gap: 16px;
}

.rlc-meta__icon-box {
    width: 48px;
    height: 32px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.30);
    background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(0,0,0,.22));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.10);
}

.rlc-meta__bars {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 18px;
}

.rlc-meta__bars span {
    width: 5px;
    background: linear-gradient(to top, var(--rlc-red), #ff7f7f);
    border-radius: 6px;
    animation: rlcBars .74s ease-in-out infinite alternate;
    animation-play-state: paused;
}

.rlc-radio.is-playing .rlc-meta__bars span {
    animation-play-state: running;
}

.rlc-meta__bars span:nth-child(1) {height: 6px;}
.rlc-meta__bars span:nth-child(2) {height: 18px; animation-delay: .10s;}
.rlc-meta__bars span:nth-child(3) {height: 10px; animation-delay: .20s;}
.rlc-meta__bars span:nth-child(4) {height: 18px; animation-delay: .30s;}
.rlc-meta__bars span:nth-child(5) {height: 10px; animation-delay: .12s;}

.rlc-meta__copy {
    min-width: 0;
}

.rlc-meta__title {
    margin: 0;
    font-size: clamp(14px, 1vw, 16px);
    font-weight: 800;
    color: #fff;
}

.rlc-meta__text {
    margin: 6px 0 0;
    color: rgba(255,255,255,.80);
    font-size: clamp(11px, .8vw, 13px);
    line-height: 1.4;
}

.rlc-eq-panel {
    min-width: 0;
}

.rlc-now-playing {
    display: block;
    margin-bottom: 8px;
    color: rgba(255,255,255,.80);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.3px;
}

.rlc-song-title {
    display: block;
    color: #fff;
    font-size: clamp(14px, 1.1vw, 17px);
    font-weight: 900;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rlc-song-artist {
    display: block;
    margin-top: 5px;
    color: rgba(255,255,255,.74);
    font-size: clamp(11px, .8vw, 13px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rlc-equalizer {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 22px;
    margin-top: 8px;
}

.rlc-equalizer span {
    width: 4px;
    height: 7px;
    border-radius: 7px 7px 3px 3px;
    background: linear-gradient(to top, var(--rlc-red), #ff8585);
    animation: rlcBarsBig .78s ease-in-out infinite alternate;
    animation-play-state: paused;
}

.rlc-radio.is-playing .rlc-equalizer span {
    animation-play-state: running;
}

.rlc-equalizer span:nth-child(2) { animation-delay: .10s; }
.rlc-equalizer span:nth-child(3) { animation-delay: .22s; }
.rlc-equalizer span:nth-child(4) { animation-delay: .34s; }
.rlc-equalizer span:nth-child(5) { animation-delay: .16s; }
.rlc-equalizer span:nth-child(6) { animation-delay: .28s; }
.rlc-equalizer span:nth-child(7) { animation-delay: .08s; }
.rlc-equalizer span:nth-child(8) { animation-delay: .31s; }
.rlc-equalizer span:nth-child(9) { animation-delay: .15s; }
.rlc-equalizer span:nth-child(10){ animation-delay: .26s; }
.rlc-equalizer span:nth-child(11){ animation-delay: .18s; }
.rlc-equalizer span:nth-child(12){ animation-delay: .38s; }

.rlc-volume-panel {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 14px;
    border-left: 1px solid rgba(255,255,255,.20);
}

.rlc-mute {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    text-shadow: 0 0 12px rgba(0,0,0,.28);
}

.rlc-volume__range {
    width: 100%;
    height: 6px;
    margin: 0;
    accent-color: var(--rlc-red-bright);
    cursor: pointer;
}

.rlc-volume__value {
    min-width: 38px;
    text-align: right;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.rlc-error {
    margin: 0 16px 14px;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(125, 0, 0, .38);
    border: 1px solid rgba(255,110,110,.40);
    color: #fff;
    font-size: 14px;
}

.rlc-content {
    width: min(1200px, calc(100% - 40px));
    margin: 40px auto;
    padding: 30px;
    border-radius: 20px;
    background: #fff;
    color: #222;
}

.rlc-content a {
    color: #bd0000;
}

button:focus-visible,
input:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 4px;
}

@keyframes rlcPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .45; transform: scale(.78); }
}

@keyframes rlcBars {
    from { transform: scaleY(.65); }
    to { transform: scaleY(1.22); }
}

@keyframes rlcBarsBig {
    from { height: 7px; }
    to { height: 28px; }
}

@media (max-width: 1150px) {
    .rlc-radio__main {
        grid-template-columns: 260px 1fr;
    }

    .rlc-radio__action {
        grid-column: 1 / -1;
    }

    .rlc-radio__center {
        border-left: 0;
        padding-left: 0;
    }

    .rlc-radio__bottom {
        grid-template-columns: 1fr;
    }

    .rlc-volume-panel {
        border-left: 0;
        padding-left: 0;
    }
}

@media (max-width: 760px) {
    body.admin-bar .rlc-site {
        min-height: calc(100vh - 46px);
    }

    .rlc-radio {
        min-height: auto;
        padding: 16px;
    }

    .rlc-radio__panel {
        border-radius: 24px;
    }

    .rlc-radio__main {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 18px 14px 14px;
    }

    .rlc-radio__logo-wrap {
        width: min(180px, 52vw);
    }

    .rlc-radio__logo-side,
    .rlc-radio__center,
    .rlc-radio__action {
        justify-content: center;
        text-align: center;
    }

    .rlc-radio__center {
        padding-left: 0;
        border-left: 0;
    }

    .rlc-radio__slogan,
    .rlc-radio__badges,
    .rlc-listen-copy {
        justify-content: center;
    }

    .rlc-radio__badges {
        flex-direction: column;
        align-items: center;
    }

    .rlc-listen-copy {
        border-left: 0;
        padding-left: 0;
    }

    .rlc-play-wrap {
        width: min(160px, 46vw);
    }

    .rlc-radio__bottom {
        gap: 14px;
        padding: 14px 14px 16px;
    }

    .rlc-meta,
    .rlc-volume-panel {
        justify-content: center;
    }

    .rlc-volume-panel {
        flex-wrap: wrap;
    }

    .rlc-meta {
        flex-direction: column;
        text-align: center;
    }

    .rlc-eq-panel {
        text-align: center;
    }

    .rlc-equalizer {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .rlc-radio__title-top {
        font-size: 32px;
    }

    .rlc-radio__title-main {
        font-size: 52px;
    }

    .rlc-radio__slogan {
        font-size: 19px;
    }

    .rlc-play__icon {
        border-top-width: 18px;
        border-bottom-width: 18px;
        border-left-width: 28px;
        margin-left: 6px;
    }

    .rlc-radio.is-playing .rlc-play__icon {
        width: 24px;
        height: 32px;
    }
}


/* --------------------------------------------------------------
   Carátula de la canción actual
-------------------------------------------------------------- */
.rlc-track-card {
    min-width: 0;
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
}

.rlc-cover-link {
    position: relative;
    width: 68px;
    height: 68px;
    display: block;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.34);
    border-radius: 12px;
    background: rgba(255,255,255,.10);
    box-shadow: 0 8px 22px rgba(0,0,0,.32), 0 0 18px rgba(255,0,0,.15);
    transition: transform .2s ease, box-shadow .2s ease;
}

.rlc-cover-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 11px 25px rgba(0,0,0,.38), 0 0 23px rgba(255,0,0,.24);
}

.rlc-cover-link[aria-disabled="true"] {
    pointer-events: none;
}

.rlc-cover {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.rlc-cover-link::after {
    content: "♫";
    position: absolute;
    right: 5px;
    bottom: 5px;
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: rgba(210,0,0,.86);
    box-shadow: 0 2px 8px rgba(0,0,0,.35);
    font-size: 12px;
    font-weight: 900;
}

.rlc-track-info {
    min-width: 0;
}

.rlc-artwork-credit {
    display: none;
    margin-top: 5px;
    color: rgba(255,255,255,.55);
    font-size: 10px;
    line-height: 1.2;
}

.rlc-track-card.has-artwork .rlc-artwork-credit {
    display: block;
}

.rlc-cover.is-loading {
    opacity: .55;
    filter: saturate(.65);
}

@media (max-width: 1150px) {
    .rlc-track-card {
        grid-template-columns: 64px minmax(0, 1fr);
    }

    .rlc-cover-link {
        width: 64px;
        height: 64px;
    }
}

@media (max-width: 760px) {
    .rlc-track-card {
        width: min(420px, 100%);
        margin: 0 auto;
        grid-template-columns: 60px minmax(0, 1fr);
        text-align: left;
    }

    .rlc-cover-link {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 420px) {
    .rlc-track-card {
        grid-template-columns: 54px minmax(0, 1fr);
        gap: 10px;
    }

    .rlc-cover-link {
        width: 54px;
        height: 54px;
        border-radius: 11px;
    }
}


/* --------------------------------------------------------------
   Redes sociales
-------------------------------------------------------------- */
.rlc-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 13px 20px 16px;
    border-top: 1px solid rgba(255,255,255,.16);
    background: linear-gradient(180deg, rgba(0,0,0,.32), rgba(0,0,0,.46));
}

.rlc-social__label {
    margin-right: 4px;
    color: rgba(255,255,255,.76);
    font-size: 12px;
    font-weight: 700;
}

.rlc-social__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 7px 13px;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 999px;
    color: #fff;
    background: rgba(255,255,255,.07);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.09);
    text-decoration: none;
    font-size: 12px;
    font-weight: 800;
    transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

.rlc-social__link:hover {
    color: #fff;
    transform: translateY(-2px);
    background: rgba(255,255,255,.14);
    border-color: rgba(255,255,255,.38);
}

.rlc-social__link:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

.rlc-social__icon {
    width: 23px;
    height: 23px;
    display: block;
    flex: 0 0 auto;
}

.rlc-social__link--facebook .rlc-social__icon {
    color: #5a8cff;
}

.rlc-social__link--whatsapp .rlc-social__icon {
    color: #34d669;
}

.rlc-social__detail {
    color: rgba(255,255,255,.70);
    font-size: 11px;
    font-weight: 600;
}

@media (max-width: 620px) {
    .rlc-social {
        flex-wrap: wrap;
        gap: 9px;
        padding: 12px 14px 15px;
    }

    .rlc-social__label {
        width: 100%;
        margin: 0;
        text-align: center;
    }

    .rlc-social__link {
        justify-content: center;
        flex: 1 1 135px;
    }

    .rlc-social__detail {
        display: none;
    }
}


.rlc-social__link--youtube {
    color: #fff;
    background: linear-gradient(135deg, rgba(255, 0, 0, .32), rgba(150, 0, 0, .22));
    border-color: rgba(255, 80, 80, .48);
}

.rlc-social__link--youtube:hover {
    background: linear-gradient(135deg, rgba(255, 0, 0, .48), rgba(170, 0, 0, .30));
    box-shadow: 0 8px 22px rgba(255, 0, 0, .22);
}
