/* ================================================================
   Modulo ScreenDeck: simulacao da tela tatil de 800x480 da JJSD-02,
   dividida na mesma grade de 10x6 celulas que o JJManager usa.

   As cores base ficam neutras aqui; cada produto ajusta o acento no
   proprio /{produto}/css/style.css, como o KeyDeck ja faz.
   ================================================================ */

.sdk-description p {
    margin-bottom: 0.85rem;
    line-height: 1.7;
}

.sdk-description p:last-child {
    margin-bottom: 0;
}

/* ── Abas de pagina ───────────────────────────────────────────── */

.sdk-pages {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
}

.sdk-page-tab {
    padding: 0.45rem 1.1rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-shadow: none;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.sdk-page-tab.active {
    color: #fff;
}

/* ── Tabuleiro: aparelho + monitor ────────────────────────────── */

.sdk-board {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
}

@media (max-width: 991.98px) {
    .sdk-board {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.5rem;
    }
}

/* ── Aparelho ─────────────────────────────────────────────────── */

.sdk-device {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.sdk-bezel {
    width: 100%;
    padding: 2.4%;
    border-radius: 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #121217;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 18px 48px rgba(0, 0, 0, 0.6);
}

.sdk-screen {
    position: relative;
    width: 100%;
    aspect-ratio: 5 / 3;
    border-radius: 0.35rem;
    overflow: hidden;
    background: #141418;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.9);
    container-type: inline-size;
}

.sdk-grid {
    position: absolute;
    inset: 0;
    display: none;
    grid-template-columns: repeat(10, 1fr);
    grid-template-rows: repeat(6, 1fr);
    padding: 0.6%;
}

.sdk-grid.active {
    display: grid;
}

/* ── Modulos na tela ──────────────────────────────────────────── */

.sdk-tile {
    --sdk-tile-color: #6b7078;

    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4cqw;
    margin: 0.35%;
    padding: 0.6cqw;
    border: 0;
    border-radius: 0.9cqw;
    background: var(--sdk-tile-color);
    color: #fff;
    font-size: 1.8cqw;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0.01em;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    cursor: pointer;
    transition: filter 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}

/* Fallback para navegadores sem unidade de container: a tela tem largura
   conhecida no desktop, entao um tamanho fixo mantem o texto legivel. */
@supports not (font-size: 1cqw) {
    .sdk-tile { font-size: 0.68rem; }
}

.sdk-tile:hover {
    filter: brightness(1.18);
}

.sdk-tile.pressed {
    transform: scale(0.96);
    filter: brightness(1.35);
}

.sdk-tile.active {
    box-shadow: inset 0 0 0 0.25cqw rgba(255, 255, 255, 0.85);
}

.sdk-tile-label {
    display: block;
    max-width: 100%;
    overflow: hidden;
}

.sdk-tile-glyph {
    display: block;
    width: 3.2cqw;
    height: 3.2cqw;
    opacity: 0.95;
}

.sdk-tile-glyph svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Sem rotulo, o glifo ocupa mais espaco. */
.sdk-tile-label:empty {
    display: none;
}

/* ── Modulo: troca de pagina ──────────────────────────────────── */

.sdk-tile-page {
    background: rgba(255, 255, 255, 0.09);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

/* ── Modulo: slider de volume ─────────────────────────────────── */

.sdk-tile-slider {
    --sdk-tile-color: #2b2b33;
    justify-content: flex-end;
    gap: 0.5cqw;
}

.sdk-tile-slider .sdk-slider-track {
    position: relative;
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    border-radius: 0.6cqw;
    background: rgba(255, 255, 255, 0.14);
    overflow: hidden;
}

.sdk-tile-slider .sdk-slider-fill {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--sdk-fill, 60%);
    background: #d8dde3;
    border-radius: 0.6cqw;
}

.sdk-tile-slider.sdk-orient-h {
    flex-direction: row;
    align-items: center;
    gap: 0.7cqw;
}

.sdk-tile-slider.sdk-orient-h .sdk-slider-track {
    height: 1.6cqw;
    flex: 1 1 auto;
}

.sdk-tile-slider.sdk-orient-h .sdk-slider-fill {
    top: 0;
    height: auto;
    right: auto;
    width: var(--sdk-fill, 60%);
}

.sdk-slider-value {
    flex-shrink: 0;
    font-size: 1.45cqw;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0.75;
}

.sdk-tile-slider .sdk-tile-label {
    flex-shrink: 0;
}

/* ── Modulo: chave liga/desliga ───────────────────────────────── */

.sdk-tile-toggle,
.sdk-tile-togglecap {
    --sdk-tile-color: #2b2b33;
    justify-content: center;
    gap: 0.6cqw;
}

.sdk-switch {
    position: relative;
    width: 4.4cqw;
    height: 2.2cqw;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    transition: background 0.2s ease;
}

.sdk-switch-knob {
    position: absolute;
    top: 0.25cqw;
    left: 0.25cqw;
    width: 1.7cqw;
    height: 1.7cqw;
    border-radius: 50%;
    background: #e6ebf0;
    transition: transform 0.2s ease, background 0.2s ease;
}

.sdk-tile.is-on .sdk-switch-knob {
    transform: translateX(2.2cqw);
}

.sdk-cap {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 28%;
    background: repeating-linear-gradient(
        135deg,
        rgba(255, 190, 60, 0.85) 0 0.8cqw,
        rgba(40, 30, 10, 0.85) 0.8cqw 1.6cqw
    );
    transition: transform 0.25s ease;
}

.sdk-tile.is-on .sdk-cap {
    transform: translateY(-100%);
}

/* ── Modulo: analogico e direcional ───────────────────────────── */

.sdk-tile-analog,
.sdk-tile-dpad {
    --sdk-tile-color: #2b2b33;
}

.sdk-stick {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 5.4cqw;
    height: 5.4cqw;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 0 0 0.2cqw rgba(255, 255, 255, 0.2);
}

.sdk-stick-dot {
    width: 2.4cqw;
    height: 2.4cqw;
    border-radius: 50%;
    background: #e6ebf0;
}

.sdk-dpad {
    position: relative;
    width: 5.4cqw;
    height: 5.4cqw;
}

.sdk-dpad-arm {
    position: absolute;
    background: rgba(255, 255, 255, 0.75);
    border-radius: 0.3cqw;
}

.sdk-dpad-up,
.sdk-dpad-down {
    left: 38%;
    width: 24%;
    height: 34%;
}

.sdk-dpad-up    { top: 0; }
.sdk-dpad-down  { bottom: 0; }

.sdk-dpad-left,
.sdk-dpad-right {
    top: 38%;
    height: 24%;
    width: 34%;
}

.sdk-dpad-left  { left: 0; }
.sdk-dpad-right { right: 0; }

/* ── Modulo: equalizador ──────────────────────────────────────── */

.sdk-tile-equalizer {
    --sdk-tile-color: #2b2b33;
}

.sdk-eq {
    display: flex;
    align-items: flex-end;
    gap: 0.4cqw;
    height: 3.4cqw;
}

.sdk-eq i {
    width: 0.7cqw;
    border-radius: 0.3cqw;
    background: #d8dde3;
}

.sdk-eq i:nth-child(1) { height: 40%; }
.sdk-eq i:nth-child(2) { height: 70%; }
.sdk-eq i:nth-child(3) { height: 95%; }
.sdk-eq i:nth-child(4) { height: 60%; }
.sdk-eq i:nth-child(5) { height: 80%; }
.sdk-eq i:nth-child(6) { height: 45%; }
.sdk-eq i:nth-child(7) { height: 65%; }

/* ── Modulo: chat de live ─────────────────────────────────────── */

.sdk-tile-chat {
    --sdk-tile-color: #1d1d24;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.6cqw;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.sdk-chat-head {
    display: flex;
    align-items: center;
    gap: 0.6cqw;
    opacity: 0.8;
}

.sdk-chat-head .sdk-tile-glyph {
    width: 2cqw;
    height: 2cqw;
    flex-shrink: 0;
}

.sdk-chat-lines {
    display: flex;
    flex-direction: column;
    gap: 0.45cqw;
    text-align: left;
    font-weight: 500;
    font-size: 1.5cqw;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.8);
    overflow: hidden;
}

.sdk-chat-line b {
    color: #6FEFFF;
    margin-right: 0.5cqw;
    font-weight: 700;
}

/* ── Monitor lateral ──────────────────────────────────────────── */

.sdk-monitor {
    position: sticky;
    top: calc(var(--navbar-size, 106px) + 1rem);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.03);
}

@media (max-width: 991.98px) {
    .sdk-monitor {
        position: static;
    }
}

.sdk-monitor-eyebrow {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    opacity: 0.5;
    text-shadow: none;
}

.sdk-monitor-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.6rem;
}

.sdk-monitor-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
}

.sdk-monitor-badge {
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.12);
    text-shadow: none;
    white-space: nowrap;
}

.sdk-monitor-badge.is-empty {
    display: none;
}

.sdk-monitor-about {
    margin: 0.85rem 0 0;
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.75;
}

.sdk-monitor-steps-label {
    display: none;
    margin-top: 1.35rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    opacity: 0.5;
    text-shadow: none;
}

.sdk-monitor-steps-label.is-visible {
    display: block;
}

.sdk-steps {
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sdk-step {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.6rem 0.85rem;
    border-radius: 0.6rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    font-size: 0.88rem;
    line-height: 1.4;
    animation: sdk-step-in 0.28s ease both;
}

@keyframes sdk-step-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .sdk-step { animation: none; }
    .sdk-tile { transition: none; }
}

.sdk-step-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.sdk-step-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* ── Telas estreitas ──────────────────────────────────────────── */

/* A tela simulada tem 800 px de largura; espremida num celular, o rotulo de
   cada modulo fica ilegivel. Abaixo de 768 px o aparelho passa a rolar na
   horizontal, mantendo os modulos no tamanho em que da para ler. */
@media (max-width: 767.98px) {
    .sdk-device {
        align-items: flex-start;
        width: 100%;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }

    .sdk-bezel {
        min-width: 34rem;
    }
}

/* ── Nota de rodape ───────────────────────────────────────────── */

.sdk-note {
    margin: 2rem auto 0;
    max-width: 56rem;
    text-align: center;
    font-size: 0.82rem;
    line-height: 1.6;
    opacity: 0.55;
}
