/* ================================================================
   Módulo KeyDeck: deck de 12 teclas 3x4 com perfis de exemplo
   Cores neutras aqui; cada produto ajusta o acento no seu style.css
   ================================================================ */

.kdk-description {
    color: rgba(218, 218, 218, 0.75);
    font-size: 1rem;
    line-height: 1.7;
    max-width: 60rem;
    margin-left: auto;
    margin-right: auto;
}

.kdk-stage {
    max-width: 62rem;
    margin: 0 auto;
}

/* ── Perfis ───────────────────────────────────────────────────── */

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

.kdk-profile {
    padding: 0.45rem 1rem;
    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;
}

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

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

/* ── Tabuleiro: deck + monitor ────────────────────────────────── */

.kdk-board {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.75rem;
    align-items: stretch;
}

/* ── Gabinete do deck ─────────────────────────────────────────── */

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

.kdk-grid {
    display: none;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.55rem;
}

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

.kdk-key {
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    aspect-ratio: 1 / 1;
}

.kdk-keycap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 0.25rem;
    border-radius: 0.45rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(180deg, #2b2b34 0%, #1a1a21 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.09),
        0 3px 0 rgba(0, 0, 0, 0.55),
        0 6px 12px rgba(0, 0, 0, 0.45);
    transition: transform 0.09s ease, box-shadow 0.15s ease, border-color 0.2s ease, background 0.2s ease;
}

.kdk-keycap-legend {
    font-size: clamp(0.58rem, 1.5vw, 0.78rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0.02em;
    text-align: center;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
    text-shadow: none;
    word-break: break-word;
    hyphens: auto;
}

.kdk-key:hover .kdk-keycap {
    border-color: rgba(255, 255, 255, 0.35);
    background: linear-gradient(180deg, #33333d 0%, #1f1f27 100%);
}

.kdk-key:hover .kdk-keycap-legend,
.kdk-key.active .kdk-keycap-legend {
    color: #fff;
}

.kdk-key.active .kdk-keycap {
    border-color: rgba(255, 255, 255, 0.5);
    background: linear-gradient(180deg, #3a3a46 0%, #232330 100%);
}

/* Curso real de uma switch mecânica: desce e o relevo some. */
.kdk-key.pressed .kdk-keycap {
    transform: translateY(3px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 0 0 rgba(0, 0, 0, 0.55),
        0 2px 6px rgba(0, 0, 0, 0.5);
}

.kdk-key:focus-visible .kdk-keycap {
    outline: 2px solid rgba(255, 255, 255, 0.65);
    outline-offset: 2px;
}

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

.kdk-monitor {
    display: flex;
    flex-direction: column;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    padding: 1.4rem 1.5rem;
}

.kdk-monitor-eyebrow {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    text-shadow: none;
}

.kdk-monitor-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.6rem;
    min-height: 2rem;
}

.kdk-monitor-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
}

.kdk-monitor-badge {
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.16rem 0.45rem;
    border-radius: 4px;
    text-shadow: none;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.75);
}

.kdk-monitor-badge:empty {
    display: none;
}

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

.kdk-monitor-about {
    margin: 0.75rem 0 0;
    font-size: 0.92rem;
    line-height: 1.65;
    color: rgba(218, 218, 218, 0.72);
}

.kdk-monitor-steps-label {
    display: block;
    margin-top: 1.35rem;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
    text-shadow: none;
    visibility: hidden;
}

.kdk-monitor-steps-label.is-visible {
    visibility: visible;
}

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

.kdk-step {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.55rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    font-size: 0.87rem;
    line-height: 1.5;
    color: rgba(218, 218, 218, 0.85);
    opacity: 0;
    transform: translateY(6px);
    animation: kdk-step-in 0.28s ease forwards;
}

@keyframes kdk-step-in {
    to { opacity: 1; transform: translateY(0); }
}

.kdk-step-icon {
    flex-shrink: 0;
    width: 1.15rem;
    height: 1.15rem;
    margin-top: 0.1rem;
    color: rgba(255, 255, 255, 0.6);
}

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

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

@media (prefers-reduced-motion: reduce) {
    .kdk-step { animation: none; opacity: 1; transform: none; }
    .kdk-keycap { transition: none; }
}

/* ── Responsivo ───────────────────────────────────────────────── */

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

    .kdk-device {
        max-width: 30rem;
        margin: 0 auto;
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    .kdk-device {
        padding: 0.7rem;
    }

    .kdk-monitor {
        padding: 1.1rem 1.15rem;
    }

    .kdk-profile {
        padding: 0.35rem 0.75rem;
        font-size: 0.78rem;
    }
}
