/* Botão grande quadrado (icone + texto) - composite crm:botaoGrande */

.btn-card-link {
    /* inline-flex + line-height 0 evitam o gap de baseline abaixo do card */
    display: inline-flex;
    vertical-align: top;
    line-height: 0;
    text-decoration: none !important;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.btn-card {
    /* mantem o quadrado 150x150 do layout original */
    box-sizing: border-box;
    width: 150px;
    height: 150px;
    min-height: 150px;
    max-height: 150px;
    padding: 12px 10px;
    line-height: 1.2;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    overflow: hidden;
    user-select: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

/* no hover o card inteiro assume a cor; texto e icone viram branco */
.btn-card:hover {
    transform: translateY(-3px);
    background: var(--btn-card-cor, #0091EA);
    border-color: var(--btn-card-cor, #0091EA);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 10px 22px rgba(0, 0, 0, 0.13);
}

.btn-card:hover .btn-card-title {
    color: #ffffff;
}

.btn-card:active {
    transform: translateY(-1px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 10px rgba(0, 0, 0, 0.10);
}

/* anel de foco so no teclado; :focus e o fallback para navegadores antigos */
.btn-card-link:focus .btn-card {
    outline: 2px solid var(--btn-card-cor, #0091EA);
    outline-offset: 2px;
}

.btn-card-link:focus:not(:focus-visible) .btn-card {
    outline: none;
}

.btn-card-link:focus-visible .btn-card {
    outline: 2px solid var(--btn-card-cor, #0091EA);
    outline-offset: 2px;
}

/* pastilha circular do icone: fundo = cor do botao com baixa opacidade,
   feito via pseudo-elemento para nao depender de rgba/color-mix da cor recebida */
.btn-card-icon {
    position: relative;
    box-sizing: border-box;
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    color: var(--btn-card-cor, #0091EA);
    transition: transform 0.2s ease;
}

.btn-card-icon::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.12;
    transition: opacity 0.2s ease;
}

.btn-card:hover .btn-card-icon {
    transform: scale(1.06);
}

/* sobre o card colorido a pastilha vira um veu branco translucido */
.btn-card:hover .btn-card-icon::before {
    background: #ffffff;
    opacity: 0.2;
}

.btn-card-icon .iconeBotaoQuadrado {
    position: relative;
    z-index: 1;
    font-size: 24px;
    color: inherit;
    line-height: 1;
    transition: color 0.2s ease;
}

/* no hover a pastilha fica solida, entao o icone vira branco */
.btn-card:hover .iconeBotaoQuadrado {
    color: #ffffff;
}

.btn-card-text {
    display: flex;
    flex: 0 1 auto;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 0;
    margin-top: 10px;
}

.btn-card-title {
    margin: 0;
    width: 100%;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: 0.1px;
    text-align: center;
    color: #333333;
    overflow-wrap: anywhere;
    transition: color 0.2s ease;
    /* limita em 3 linhas para nao estourar o quadrado */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {

    .btn-card,
    .btn-card-icon,
    .btn-card-icon::before,
    .btn-card-title,
    .btn-card-icon .iconeBotaoQuadrado {
        transition: none;
    }

    .btn-card:hover,
    .btn-card:active,
    .btn-card:hover .btn-card-icon {
        transform: none;
    }
}
