/* ═══════════════════════════════════════════════
   COMPONENTS – Gombok, lejátszó, vizualizátor,
                oldalsáv, lábléc, ticker
   MovarFM · css/components.css
   ═══════════════════════════════════════════════ */

/* ─── Gombok ─── */
.btn{
    border-radius:999px;
    padding:10px 16px;
    font-size:.9rem;
    font-weight:700;
    border:1px solid transparent;
    transition:.22s ease;
    cursor:pointer;
    white-space:nowrap;
}

.btn:hover{transform:translateY(-1px)}

.btn-outline{
    color:var(--text);
    background:rgba(255,255,255,.04);
    border-color:rgba(255,255,255,.08);
}

.btn-accent{
    color:#04131a;
    background:linear-gradient(135deg,#8df1ff,#00d2ff);
    box-shadow:0 10px 24px rgba(0,210,255,.2);
}

/* ─── Téma váltó gomb ─── */
.theme-btn{
    display:inline-flex;
    align-items:center;
    gap:7px;
    padding:9px 14px;
    border-radius:999px;
    border:1px solid var(--line);
    background:rgba(255,255,255,.04);
    color:var(--text);
    cursor:pointer;
    font-size:.86rem;
    font-weight:600;
    transition:.22s ease;
    white-space:nowrap;
}
.theme-btn:hover{transform:translateY(-1px)}

/* ─── Lejátszó kártya ─── */
.player-card{
    padding:24px 24px 22px;
    background:var(--card-strong);
    position:relative;
    overflow:hidden;
    width:100% !important;
    max-width:100% !important;
    min-width:0;
    min-height:555px;
    display:flex;
    flex-direction:column;
    gap:20px;
}

.player-card::before{
    content:"";
    position:absolute;
    inset:-20% auto auto -10%;
    width:260px;
    height:260px;
    background:radial-gradient(circle, rgba(0,210,255,.12), transparent 70%);
    filter:blur(20px);
    pointer-events:none;
}

.player-shell{
    width:100%;
    min-width:0;
    display:grid;
    grid-template-columns:195px minmax(0,1fr);
    gap:26px;
    align-items:start;
    padding-top:18px;
}

/* ─── Borítókép ─── */
.cover-wrap{
    position:relative;
    width:195px;
    height:195px;
    margin:0;
    align-self:start;
    overflow:visible;
}

.cover-aura{
    position:absolute;
    inset:9%;
    border-radius:26px;
    background:radial-gradient(circle, rgba(0,210,255,.18), transparent 72%);
    filter:blur(22px);
}

.cover-image{
    position:relative;
    z-index:1;
    width:100%;
    height:100%;
    object-fit:cover;
    border-radius:24px;
    border:1px solid rgba(255,255,255,.08);
    background:#0b1321;
    animation:floatCover 5.6s ease-in-out infinite;
    box-shadow:0 18px 36px rgba(0,0,0,.26);
    image-rendering:auto;
}

/* ─── Lejátszó fő rész ─── */
.player-main{
    min-width:0;
    width:100%;
    display:flex;
    flex-direction:column;
    justify-content:flex-start;
    align-items:flex-start;
    padding-top:8px;
}

.np-badge{
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:6px 10px;
    border-radius:999px;
    margin-bottom:12px;
    background:rgba(255,255,255,.04);
    border:1px solid rgba(255,255,255,.07);
    color:#dff6ff;
    font-size:.73rem;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.08em;
    align-self:flex-start;
}

.np-dot{
    width:8px;
    height:8px;
    border-radius:50%;
    background:var(--accent);
    box-shadow:0 0 10px var(--accent);
}

.track-title{
    margin:0;
    font-size:clamp(1.45rem,1.8vw,2rem);
    line-height:1.08;
    font-weight:800;
    word-break:break-word;
    max-width:240px;
}

.track-artist{
    margin:10px 0 0;
    color:var(--muted);
    font-size:1.02rem;
    line-height:1.45;
    max-width:240px;
}

.meta-row{
    display:flex;
    flex-direction:column;
    gap:6px;
    margin-top:16px;
    color:var(--muted);
    font-size:.98rem;
    max-width:240px;
}

.meta-row strong{
    color:var(--accent);
    font-weight:700;
}

/* ─── Lejátszó vezérlők ─── */
.player-controls{
    margin-top:22px;
    display:flex;
    flex-direction:row;
    gap:20px;
    align-items:flex-start;
    width:100%;
    min-width:0;
}

.play-btn{
    width:76px;
    height:76px;
    border-radius:50%;
    border:1px solid rgba(255,255,255,.08);
    background:radial-gradient(circle at 30% 30%, #90f4ff 0%, #00d2ff 68%, #00b5df 100%);
    color:#04121a;
    cursor:pointer;
    display:grid;
    place-items:center;
    box-shadow:0 14px 32px rgba(0,210,255,.24);
    transition:.22s ease;
    flex:0 0 auto;
}

.play-btn:hover{transform:translateY(-1px) scale(1.01)}
.play-btn:active{transform:scale(.98)}
.play-btn[aria-busy="true"]{opacity:.85}
.play-btn svg,.sticky-play svg{
    width:28px;
    height:28px;
    fill:currentColor;
}

.controls-stack{
    flex:1;
    min-width:0;
    width:100%;
    display:flex;
    flex-direction:column;
    gap:16px;
}

/* ─── Haladás sáv ─── */
.progress-head{
    display:flex;
    justify-content:space-between;
    gap:14px;
    font-size:.82rem;
    color:var(--muted-2);
    margin-bottom:8px;
}

.progress-track{
    width:100%;
    height:6px;
    border-radius:999px;
    background:rgba(255,255,255,.10);
    overflow:hidden;
}

.progress-bar{
    width:0%;
    height:100%;
    border-radius:inherit;
    background:linear-gradient(90deg, rgba(0,210,255,.98), rgba(122,236,255,.98));
    box-shadow:0 0 18px rgba(0,210,255,.35);
    transition:width .35s linear;
}

/* ─── Hangerő ─── */
.volume-row{
    display:grid;
    grid-template-columns:56px minmax(0,1fr) 48px;
    gap:12px;
    align-items:center;
    width:100%;
}

.volume-row .label,
.volume-value{
    color:var(--muted);
    font-size:.86rem;
}

input[type="range"]{
    -webkit-appearance:none;
    appearance:none;
    width:100%;
    height:6px;
    border-radius:999px;
    background:linear-gradient(90deg, rgba(0,210,255,.28), rgba(255,255,255,.10));
    outline:none;
    cursor:pointer;
    border:1px solid rgba(255,255,255,.05);
}

input[type="range"]::-webkit-slider-runnable-track{
    height:6px;
    border-radius:999px;
    background:transparent;
}

input[type="range"]::-webkit-slider-thumb{
    -webkit-appearance:none;
    appearance:none;
    margin-top:-5px;
    width:16px;
    height:16px;
    border-radius:50%;
    background:var(--accent);
    border:none;
    cursor:pointer;
    box-shadow:0 0 0 4px rgba(0,210,255,.18), 0 0 14px rgba(0,210,255,.4);
}

input[type="range"]::-moz-range-track{
    height:6px;
    border-radius:999px;
    background:linear-gradient(90deg, rgba(0,210,255,.28), rgba(255,255,255,.10));
    border:none;
}

input[type="range"]::-moz-range-thumb{
    width:16px;
    height:16px;
    border:none;
    border-radius:50%;
    background:var(--accent);
    cursor:pointer;
    box-shadow:0 0 0 4px rgba(0,210,255,.18), 0 0 14px rgba(0,210,255,.4);
}

/* ─── Vizualizátor ─── */
.visualizer-wrap{
    position:relative;
    width:min(100%, 680px);
    margin-inline:auto;
    align-self:center;
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:10px;
}

@media (min-width: 761px){
    .visualizer-wrap{
        /* A lejátszó gomb (76px) + oszlopköz (20px) alá is kifuttatjuk desktopon */
        width:calc(100% + 96px);
        max-width:none;
        margin-left:-96px;
        margin-right:0;
    }
}

.visualizer-label{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:44px;
    width:100%;
    padding:0 12px;
    font-size:.82rem;
    color:var(--muted);
    white-space:nowrap;
    flex-shrink:0;
    cursor:pointer;
    border-radius:10px;
    transition:color .2s ease, opacity .2s ease, background-color .2s ease;
    order:2;
}

.visualizer-label:focus-visible{
    outline:2px solid var(--accent);
    outline-offset:2px;
}

@media (hover: hover) and (pointer: fine){
    .visualizer-label:hover{
        color:var(--text);
        opacity:.96;
        background:var(--line-soft);
    }
}

.visualizer{
    position:relative;
    display:flex;
    align-items:flex-end;
    justify-content:center;
    gap:6px;
    height:104px;
    width:100%;
    min-width:0;
    border-radius:16px;
    padding:8px 10px;
    border:1px solid var(--line-soft);
    background:linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01));
    cursor:pointer;
    overflow:hidden;
    order:1;
}

.visualizer span{
    display:block;
    width:6px;
    min-height:12px;
    height:14px;
    border-radius:999px;
    background:linear-gradient(180deg, rgba(158,244,255,1), var(--visualizer-color));
    box-shadow:0 0 16px rgba(0,210,255,.35);
    opacity:.92;
    transform-origin:bottom;
    transition:height .06s linear, opacity .06s linear;
}

.visualizer.is-interactive:focus-visible{
    outline:2px solid rgba(0,210,255,.5);
    outline-offset:2px;
}

.visualizer-canvas{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    display:block;
    z-index:1;
    pointer-events:none;
}

.visualizer-overlay{
    position:absolute;
    inset:0;
    z-index:3;
    background:transparent;
    pointer-events:none;
    cursor:default;
}

.visualizer[data-viz-style] span{
    opacity:0;
}

/* ─── Vizualizátor stílus menü (desktop) ─── */
.viz-style-menu{
    position:absolute;
    right:0;
    bottom:calc(100% + 10px);
    display:none;
    grid-template-columns:1fr;
    gap:5px;
    min-width:190px;
    max-height:min(60vh, 320px);
    overflow-y:auto;
    padding:10px;
    border-radius:14px;
    background:rgba(4,9,18,.96);
    border:1px solid rgba(255,255,255,.16);
    box-shadow:0 24px 48px rgba(0,0,0,.55), 0 2px 8px rgba(0,0,0,.4);
    -webkit-backdrop-filter:blur(18px);
    backdrop-filter:blur(18px);
    z-index:40;
}

.viz-style-menu.is-open{
    display:grid;
}

.viz-style-btn{
    border:1px solid rgba(255,255,255,.08);
    background:rgba(255,255,255,.04);
    color:#edf5ff;
    border-radius:10px;
    padding:8px 10px;
    text-align:left;
    cursor:pointer;
    font-size:.88rem;
    transition:background .18s ease, border-color .18s ease, color .18s ease;
}

.viz-style-btn:hover{
    background:rgba(255,255,255,.13);
    border-color:rgba(255,255,255,.18);
    color:#fff;
}

.viz-style-btn.is-active{
    border-color:rgba(0,210,255,.6);
    background:rgba(0,210,255,.18);
    color:#87f0ff;
}

/* ─── Vizualizátor bottom sheet (mobil) ─── */
.viz-sheet-backdrop{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.34);
    opacity:0;
    pointer-events:none;
    transition:opacity .2s ease;
    z-index:88;
}

.viz-sheet-backdrop.is-open{
    opacity:1;
    pointer-events:auto;
}

.viz-bottom-sheet{
    position:fixed;
    left:0;
    right:0;
    bottom:0;
    transform:translateY(108%);
    transition:transform .25s ease;
    z-index:89;
    padding:16px;
    border-radius:20px 20px 0 0;
    background:var(--card-strong);
    border-top:1px solid var(--line);
    box-shadow:0 -16px 38px rgba(0,0,0,.24);
}

.viz-bottom-sheet.is-open{
    transform:translateY(0);
}

.viz-sheet-title{
    font-size:.88rem;
    color:var(--muted);
    margin-bottom:8px;
}

.viz-sheet-list{
    display:grid;
    gap:8px;
}

/* ─── Státusz sor ─── */
.status-line{
    margin-top:18px;
    min-height:24px;
    color:var(--muted);
    font-size:.94rem;
    text-align:center;
}

.status-line.is-error{color:var(--status-error)}
.status-line.is-warn{color:var(--status-warn)}
.status-line.is-ok{color:var(--status-ok)}

/* ─── Oldalsáv ─── */
.side-card{
    padding:18px;
    background:rgba(10,18,32,.82);
}

.section-title{
    margin:0 0 14px;
    font-size:.84rem;
    font-weight:800;
    color:var(--muted);
    text-transform:uppercase;
    letter-spacing:.08em;
}

.info-grid,
.history-list{
    display:grid;
    gap:12px;
}

.info-separator{
    height:1px;
    margin:16px 2px 14px;
    background:linear-gradient(90deg, transparent 0%, var(--line-soft) 18%, var(--line-soft) 82%, transparent 100%);
}

.info-box,
.history-item{
    padding:14px;
    border-radius:18px;
    background:rgba(255,255,255,.035);
    border:1px solid var(--line-soft);
}

.info-box .label{
    display:block;
    font-size:.71rem;
    color:var(--muted-2);
    text-transform:uppercase;
    letter-spacing:.08em;
    margin-bottom:6px;
}

.info-box .value{
    font-size:.94rem;
    font-weight:700;
    line-height:1.4;
}

.history-item{
    display:flex;
    gap:12px;
    align-items:center;
}

.history-cover{
    width:52px;
    height:52px;
    border-radius:14px;
    object-fit:cover;
    background:#0b1321;
    flex:0 0 auto;
}

.history-meta{
    font-size:.67rem;
    color:var(--muted-2);
    text-transform:uppercase;
    letter-spacing:.08em;
    margin-bottom:4px;
}

.history-title{
    font-size:.92rem;
    font-weight:700;
    line-height:1.35;
}

.history-artist{
    margin-top:4px;
    color:var(--muted);
    font-size:.83rem;
    line-height:1.35;
}

/* ─── Egységes lábléc sáv (fixed) ─── */
.footer{
    position:fixed;
    left:6px;
    right:6px;
    bottom:6px;
    z-index:50;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    padding:8px 12px;
    background:rgba(4,10,19,.88);
    border:1px solid rgba(255,255,255,.08);
    border-radius:12px;
    box-shadow:0 16px 36px rgba(0,0,0,.34);
    -webkit-backdrop-filter:blur(20px);
    backdrop-filter:blur(20px);
}

.footer-left{
    display:flex;
    align-items:center;
    gap:8px;
    min-width:0;
    flex:0 0 auto;
    max-width:none;
}

.footer-station{
    min-width:0;
}

.footer-center{
    display:flex;
    justify-content:center;
    align-items:center;
    flex:1 1 auto;
    min-width:0;
    max-width:none;
    overflow:hidden;
}

.footer-right{
    display:flex;
    align-items:center;
    gap:10px;
    flex:0 0 auto;
}

/* ─── Lejátszó elemek (JS ID-k alapján) ─── */
.api-indicator{
    width:9px;
    height:9px;
    border-radius:50%;
    background:var(--success);
    box-shadow:0 0 10px rgba(34,197,94,.35);
    flex-shrink:0;
}

.api-indicator.offline{
    background:var(--danger);
    box-shadow:0 0 10px rgba(239,68,68,.3);
}

.sticky-cover{
    width:44px;
    height:44px;
    border-radius:12px;
    object-fit:cover;
    background:#0b1321;
    flex:0 0 auto;
}

.sticky-name{
    color:var(--muted-2);
    font-size:.72rem;
}

.sticky-song{
    font-size:.9rem;
    font-weight:700;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.sticky-listeners{
    color:var(--muted);
    font-size:.8rem;
    white-space:nowrap;
}

.sticky-weather{
    display:inline-flex;
    align-items:center;
    gap:4px;
    color:var(--muted);
    font-size:.78rem;
    white-space:nowrap;
}

.sticky-weather-icon{
    width:18px;
    height:18px;
    object-fit:contain;
}

.sticky-play{
    width:44px;
    height:44px;
    border-radius:50%;
    border:none;
    cursor:pointer;
    display:grid;
    place-items:center;
    color:#04131a;
    background:linear-gradient(135deg,#87f0ff,#00d2ff);
    box-shadow:0 10px 24px rgba(0,210,255,.22);
}

/* ─── Ticker (footer-center-ben) ─── */
.ticker{
    display:flex;
    align-items:center;
    gap:8px;
    overflow:hidden;
    min-width:0;
}

.ticker-label{
    color:var(--accent);
    font-weight:700;
    font-size:.75rem;
    text-transform:uppercase;
    letter-spacing:.05em;
    flex-shrink:0;
    border-right:1px solid rgba(0,210,255,.25);
    padding-right:8px;
    margin-right:2px;
}

.ticker-content{
    color:var(--muted);
    font-size:.82rem;
    transition:opacity .3s ease, transform .3s ease;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    min-width:0;
}

.ticker-link{
    display:inline-flex;
    align-items:center;
    gap:8px;
    color:inherit;
    text-decoration:none;
    white-space:nowrap;
    overflow:hidden;
    min-width:0;
}

.ticker-link:hover{
    color:var(--text);
    text-decoration:underline;
}

.ticker-thumb{
    width:26px;
    height:26px;
    object-fit:cover;
    border-radius:6px;
    flex-shrink:0;
    background:rgba(255,255,255,.08);
    border:1px solid rgba(255,255,255,.10);
}
