/* ================================================================
   Módulo LedPanel: simulador de matriz de LED 32x8
   Cores neutras aqui; cada produto ajusta o acento no seu style.css
   ================================================================ */

.ledp-description {
    color: rgba(218, 218, 218, 0.75);
    font-size: 1rem;
    line-height: 1.7;
    max-width: 60ch;    /* 60rem dava ~120 caracteres por linha */
    margin-left: auto;
    margin-right: auto;
}

.ledp-stage {
    max-width: 46rem;
    margin: 0 auto;
}

/* ── Gabinete do painel ───────────────────────────────────────── */

.ledp-device {
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(180deg, #16161c 0%, #0d0d12 100%);
    padding: 0.9rem;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
}

.ledp-screen {
    border-radius: 0.6rem;
    background: #0a0a0c;
    border: 1px solid rgba(255, 255, 255, 0.10);
    padding: 0.35rem;
    overflow: hidden;
}

.ledp-canvas {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 32 / 8;
    image-rendering: auto;
}

.ledp-chassis {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 0.25rem 0.1rem;
}

.ledp-chassis-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    text-shadow: none;
}

/* Botão físico de troca de lane (GPIO6 no hardware) */
.ledp-hw-btn {
    position: relative;
    width: 2.6rem;
    height: 2.6rem;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: radial-gradient(circle at 35% 30%, #3a3a44 0%, #1a1a20 70%);
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
}

.ledp-hw-btn-cap {
    position: absolute;
    inset: 0.45rem;
    border-radius: 50%;
    background: linear-gradient(180deg, #4a4a55 0%, #24242c 100%);
}

.ledp-hw-btn:hover {
    border-color: rgba(255, 255, 255, 0.4);
}

.ledp-hw-btn.pressed {
    transform: translateY(2px) scale(0.96);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

/* ── Modo "framed": foto do produto com o visor recortado ─────────
   O canvas fica atrás do PNG e aparece pelo recorte transparente; o
   botão é uma área clicável por cima do botão desenhado na foto.
   Cada produto define a geometria do seu PNG nestas variáveis. */

.ledp-framed {
    --ledp-screen-left:   0%;
    --ledp-screen-top:    0%;
    --ledp-screen-width:  100%;
    --ledp-screen-height: 100%;
    --ledp-btn-left:      0%;
    --ledp-btn-top:       0%;
    --ledp-btn-width:     0%;
    --ledp-btn-height:    0%;

    position: relative;
    padding: 0;
    border: none;
    border-radius: 0;
    background: none;
    box-shadow: none;
    line-height: 0;
}

.ledp-frame-pic {
    display: block;
    line-height: 0;
}

/* `.entrance img` (módulo Entrance) força aspect-ratio 1/1 + max-height, e
   `.full-screen img` (layout01) força outro max-height: as duas regras são
   para a foto quadrada do hero. A foto do painel é panorâmica, então precisa
   de especificidade maior e do reset explícito das duas propriedades. */
.ledp-framed .ledp-frame {
    position: relative;
    z-index: 2;
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: none;
    aspect-ratio: auto;
    object-fit: fill;
    pointer-events: none;
}

.ledp-framed .ledp-canvas {
    position: absolute;
    z-index: 1;
    left:   var(--ledp-screen-left);
    top:    var(--ledp-screen-top);
    width:  var(--ledp-screen-width);
    height: var(--ledp-screen-height);
    aspect-ratio: auto;
    background: #0a0a0c;
}

.ledp-framed .ledp-hw-btn {
    position: absolute;
    z-index: 3;
    left:   var(--ledp-btn-left);
    top:    var(--ledp-btn-top);
    width:  var(--ledp-btn-width);
    height: var(--ledp-btn-height);
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    box-shadow: none;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.2s ease;
}

/* O botão desenhado na foto encolhe junto com ela: a 375px o círculo visível
   tem 18x25 CSS px. O ::after estende a área de toque para além do círculo,
   com piso de 44px nos dois eixos (um inset fixo deixava a largura em 40). */
.ledp-framed .ledp-hw-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: max(calc(100% + 20px), 44px);
    height: max(calc(100% + 20px), 44px);
    border-radius: 50%;
}

/* Sem hover não há como descobrir que a foto tem um controle: no touch o anel
   fica permanente, discreto. */
@media (hover: none) {
    .ledp-framed .ledp-hw-btn {
        box-shadow: 0 0 0 2px rgba(0, 216, 255, 0.35);
    }
}

.ledp-framed .ledp-hw-btn:hover,
.ledp-framed .ledp-hw-btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35), 0 0 18px rgba(255, 255, 255, 0.25);
    outline: none;
}

.ledp-framed .ledp-hw-btn.pressed {
    transform: scale(0.9);
}

/* ── Dica da lane ativa ───────────────────────────────────────── */

.ledp-hint {
    min-height: 3rem;
    margin: 1.25rem auto 0.5rem;
    max-width: 42rem;
    text-align: center;
    font-size: 0.92rem;
    line-height: 1.6;
    color: rgba(218, 218, 218, 0.7);
}

/* ── Seletor de modos ─────────────────────────────────────────── */

/* A copy diz que o aparelho guarda 4 trilhos e a fileira mostra 7 opções: sem
   este rótulo o visitante lê os 7 como se fossem os trilhos. */
.ledp-modes-label {
    margin: 1.5rem 0 0.75rem;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(218, 218, 218, 0.45);
}


.ledp-lanes {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.ledp-lane {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(218, 218, 218, 0.65);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.ledp-lane:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.ledp-lane.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.ledp-lane-badge {
    font-size: 0.7rem;   /* 0.6rem dava 9.6px, abaixo do piso de texto funcional */
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    text-shadow: none;
}

.ledp-lane-badge-free {
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.75);
}

.ledp-lane-badge-pro {
    background: rgba(255, 176, 32, 0.18);
    color: #FFC356;
}

/* ── Controles ────────────────────────────────────────────────── */

.ledp-controls {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

.ledp-control {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(218, 218, 218, 0.55);
}

/* A trilha de 4px era também a área clicável, seis vezes abaixo do mínimo de
   24px da WCAG 2.5.8. O input agora tem 44px de altura e a trilha visual de
   4px vem dos pseudo-elementos, então a aparência não muda. */
.ledp-range {
    -webkit-appearance: none;
    appearance: none;
    width: min(16rem, 50vw);
    height: 44px;
    background: transparent;
    outline: none;
}

.ledp-range::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.15);
}

.ledp-range::-moz-range-track {
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.15);
}

/* outline:none sem substituto é falha de WCAG 2.4.7; o anel volta aqui. */
.ledp-range:focus-visible::-webkit-slider-thumb {
    box-shadow: 0 0 0 3px rgba(0, 216, 255, 0.55);
}

.ledp-range:focus-visible::-moz-range-thumb {
    box-shadow: 0 0 0 3px rgba(0, 216, 255, 0.55);
}

.ledp-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    margin-top: -6px;   /* centra o thumb de 16px sobre a trilha de 4px */
}

.ledp-range::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border: none;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
}

.ledp-control-value {
    min-width: 3rem;
    text-align: left;
    font-variant-numeric: tabular-nums;
}

.ledp-note {
    margin: 2rem auto 0;
    max-width: 44rem;
    text-align: center;
    font-size: 0.82rem;
    line-height: 1.6;
    color: rgba(218, 218, 218, 0.45);
}

/* ── Embed no hero (sem controles) ────────────────────────────── */

.ledp-hero {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(180deg, #16161c 0%, #0d0d12 100%);
    padding: 0.9rem;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
}

.ledp-hero .ledp-screen {
    padding: 0.5rem;
}

/* Hero com a foto do produto: a moldura e a propria imagem */
.ledp-hero-framed {
    padding: 0;
    border: none;
    background: none;
    box-shadow: none;
}

@media (max-width: 575.98px) {
    .ledp-device,
    .ledp-hero {
        padding: 0.55rem;
    }

    /* A regra antiga só encolhia o chip; o texto continua menor, mas a altura
       do alvo agora tem piso. */
    .ledp-lane {
        min-height: 44px;
        padding: 0.35rem 0.7rem;
        font-size: 0.78rem;
    }

    .ledp-control {
        font-size: 0.72rem;
    }
}
