@use '@/styles/breakpoints' as *;

.hubBlock {
    margin-bottom: 24px;

    /**
     * Clearance acima da `bottomBarProjeto` (fixed, z-index 700, ~48–56px + safe-area).
     * Evita que o CTA «Abrir requisitos» fique com hit-target sob a barra em xs.
     */
    @include max-mobile {
        padding-bottom: calc(56px + env(safe-area-inset-bottom, 0));
        margin-bottom: calc(16px + env(safe-area-inset-bottom, 0));
    }
}

.cardSubtitle {
    display: block;
    margin-top: -4px;
    margin-bottom: 12px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--text-secondary, #8c8c8c);
}

.checklistList {
    margin: 0;
    padding: 0;
    list-style: none;
}

.checklistItem {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light, #f0f0f0);

    &:last-child {
        border-bottom: none;
    }
}

.checklistBody {
    flex: 1;
    min-width: 0;
}

.checklistLabel {
    font-weight: 500;
    font-size: 14px;
    color: var(--text-primary, #262626);
}

.checklistDetail {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: var(--text-secondary, #8c8c8c);
}

.ctaRow {
    margin-top: 16px;

    /**
     * scroll-margin: ao trazer o CTA à vista (scrollIntoView / âncora),
     * deixa clearance acima da bottom bar fixed do ProjetoLayout (~48–56px).
     */
    @include max-mobile {
        scroll-margin-bottom: calc(72px + env(safe-area-inset-bottom, 0));
    }
}

.ctaButton {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 40px;

    /**
     * Em xs a bottom bar do ProjetoLayout usa z-index 700 e pode cobrir o
     * hit-target do CTA no fim do scroll. Empilhar o botão acima da barra
     * (fundo sólido do Ant Button) mantém o clique utilizável.
     */
    @include max-mobile {
        z-index: 710;
        scroll-margin-bottom: calc(72px + env(safe-area-inset-bottom, 0));
    }

    @media (min-width: 768px) {
        width: auto;
        min-height: 32px;
    }
}

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.healthList {
    max-height: 280px;
    overflow-y: auto;
    margin: 0;
    padding: 0;
    list-style: none;
}

.healthItem {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light, #f0f0f0);

    &:last-child {
        border-bottom: none;
    }
}

.healthText {
    flex: 1;
    min-width: 0;
}

.healthId {
    font-weight: 600;
    font-size: 13px;
    margin-right: 6px;
}

.healthSummary {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: var(--text-secondary, #8c8c8c);
}

.mappedNote {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    color: var(--text-muted, #bfbfbf);
}
