/* Banco de Questões — overrides específicos */

/* Compensa navbar sticky do site (que tem margem negativa) + header sticky da prova */
html { scroll-padding-top: 180px; }

/* Garante espaço pro conteúdo principal não ficar atrás do navbar do site */
body > main {
    padding-top: 8rem !important;  /* 128px — compensa navbar + -mb-20 */
}
@media (min-width: 768px) {
    body > main {
        padding-top: 9rem !important;  /* 144px — compensa navbar + -mb-24 */
    }
}

[data-md] p:first-child { margin-top: 0; }
[data-md] p:last-child { margin-bottom: 0; }
[data-md] img { display: inline-block; margin: 0; }

.alt-btn {
    cursor: pointer;
    user-select: text;
}
.alt-btn:disabled {
    cursor: not-allowed;
}
.alt-btn:hover .alt-letter {
    background: #dbeafe;
    color: #1e40af;
}

/* Imagens dentro de alternativas */
.alt-btn img {
    max-width: 100%;
    max-height: 220px;
    height: auto;
    display: inline-block;
    margin: 4px 0;
    border-radius: 4px;
    background: white;
}

/* Quando todas as 5 alternativas são imagens, usar grid 2 colunas */
#alternativas.alts-image-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
#alternativas.alts-image-grid .alt-btn:nth-child(5) {
    grid-column: 1 / -1;
}
@media (min-width: 768px) {
    #alternativas.alts-image-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    #alternativas.alts-image-grid .alt-btn:nth-child(5) {
        grid-column: auto;
    }
}

.alt-letter {
    transition: background 0.15s, color 0.15s;
}

/* Animação suave para feedback */
#feedback {
    animation: slideDown 0.3s ease-out;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* CTA flutuante */
.floating-cta {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Mobile tweaks */
@media (max-width: 640px) {
    .alt-btn { padding: 12px; }
    .alt-letter { width: 32px; height: 32px; font-size: 14px; }
}
