
/* =========================================================
   ARTFIGHT — CERTIFICADOS
   Botões e modal de visualização
   Compartilhado entre modalidades
   ========================================================= */


/* =========================================================
   MODAL
   ========================================================= */

.modal-certificado {
    position: fixed;
    inset: 0;
    z-index: 10000;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px;

    visibility: hidden;
    opacity: 0;
    pointer-events: none;

    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(5px);

    transition:
        opacity 0.2s ease,
        visibility 0.2s ease;
}

.modal-certificado.ativo,
.modal-certificado.aberto,
.modal-certificado[aria-hidden="false"] {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}


/* =========================================================
   CAMADA DE FUNDO
   ========================================================= */

.modal-certificado-overlay {
    position: absolute;
    inset: 0;
    z-index: 0;

    background: transparent;
}


/* =========================================================
   CONTEÚDO DO MODAL
   ========================================================= */

.modal-certificado-conteudo {
    position: relative;
    z-index: 1;

    display: flex;
    flex-direction: column;
    align-items: center;

    width: 100%;
    max-width: 1100px;
    max-height: 100%;

    padding: 24px;

    overflow: auto;

    background: #0d0d0d;
    border: 1px solid #333333;
}


/* =========================================================
   CABEÇALHO E TÍTULO
   ========================================================= */

.modal-certificado-cabecalho {
    display: flex;
    align-items: center;

    width: 100%;

    margin-bottom: 20px;
    padding-right: 50px;

    color: #ffffff;
}

.modal-certificado-cabecalho span,
.modal-certificado-titulo {
    display: block;

    width: 100%;
    margin: 0;

    color: #ffffff;

    font-size: 20px;
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: 0.5px;

    overflow-wrap: anywhere;
}


/* =========================================================
   IMAGEM DO CERTIFICADO
   ========================================================= */

.modal-certificado-imagem {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 0;
}

.modal-certificado-imagem img,
.modal-certificado-conteudo img {
    display: block;

    width: auto;
    max-width: 100%;
    max-height: calc(100vh - 180px);

    height: auto;

    object-fit: contain;

    background: #050505;
}


/* =========================================================
   BOTÃO FECHAR
   ========================================================= */

.modal-certificado-fechar {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    padding: 0;

    border: 1px solid #555555;
    border-radius: 3px;

    background: #151515;
    color: #ffffff;

    font-family: inherit;
    font-size: 26px;
    line-height: 1;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}

.modal-certificado-fechar:hover {
    background: #ff6600;
    border-color: #ff6600;
    color: #050505;
}

.modal-certificado-fechar:focus-visible {
    outline: 2px solid #ff6600;
    outline-offset: 3px;
}


/* =========================================================
   BLOQUEIO DA ROLAGEM DA PÁGINA
   ========================================================= */

body.modal-certificado-aberto {
    overflow: hidden;
}


/* =========================================================
   BOTÃO DE CERTIFICADO — BASE
   ========================================================= */

.certificado-botao {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 42px;
    padding: 11px 15px;

    border: 1px solid #ff6600;
    border-radius: 3px;

    background: transparent;
    color: #ffffff;

    font-family: inherit;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: 0.5px;

    text-align: center;
    text-decoration: none;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}

.certificado-botao:hover {
    background: #ff6600;
    border-color: #ff6600;
    color: #050505;
}

.certificado-botao:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}


/* =========================================================
   CERTIFICADO DE GRADUAÇÃO
   A cor acompanha a faixa do instrutor
   ========================================================= */

.certificado-botao--graduacao {
    color: #ffffff;
}


/* Faixa branca */

.certificado-botao--branca {
    background: #f5f5f5;
    border-color: #d0d0d0;
    color: #050505;
}

.certificado-botao--branca:hover {
    background: #dddddd;
    border-color: #bbbbbb;
    color: #050505;
}


/* Faixa amarela */

.certificado-botao--amarela {
    background: #f2d21b;
    border-color: #f2d21b;
    color: #050505;
}

.certificado-botao--amarela:hover {
    background: #ffe34d;
    border-color: #ffe34d;
    color: #050505;
}


/* Faixa laranja */

.certificado-botao--laranja {
    background: #ff6600;
    border-color: #ff6600;
    color: #ffffff;
}

.certificado-botao--laranja:hover {
    background: #ff8533;
    border-color: #ff8533;
    color: #ffffff;
}


/* Faixa verde */

.certificado-botao--verde {
    background: #16803c;
    border-color: #16803c;
    color: #ffffff;
}

.certificado-botao--verde:hover {
    background: #219b4d;
    border-color: #219b4d;
    color: #ffffff;
}


/* Faixa azul */

.certificado-botao--azul {
    background: #1769aa;
    border-color: #1769aa;
    color: #ffffff;
}

.certificado-botao--azul:hover {
    background: #2584ca;
    border-color: #2584ca;
    color: #ffffff;
}


/* Faixa roxa */

.certificado-botao--roxa {
    background: #7030a0;
    border-color: #7030a0;
    color: #ffffff;
}

.certificado-botao--roxa:hover {
    background: #8846bb;
    border-color: #8846bb;
    color: #ffffff;
}


/* Faixa marrom */

.certificado-botao--marrom {
    background: #754323;
    border-color: #754323;
    color: #ffffff;
}

.certificado-botao--marrom:hover {
    background: #925a34;
    border-color: #925a34;
    color: #ffffff;
}


/* Faixa preta */

.certificado-botao--preta {
    background: #050505;
    border-color: #444444;
    color: #ffffff;
}

.certificado-botao--preta:hover {
    background: #222222;
    border-color: #666666;
    color: #ffffff;
}


/* =========================================================
   CERTIFICADO DE INSTRUTOR
   Fundo preto e texto branco em todos os estados
   ========================================================= */

.certificado-botao--instrutor {
    background: #050505;
    border-color: #444444;
    color: #ffffff;
}

.certificado-botao--instrutor:hover {
    background: #222222;
    border-color: #666666;
    color: #ffffff;
}


/* =========================================================
   DOCUMENTO SEM IMAGEM
   ========================================================= */

.modal-certificado-erro {
    width: 100%;
    padding: 30px;

    color: #b5b5b5;

    font-size: 15px;
    line-height: 1.7;

    text-align: center;
}


/* =========================================================
   RESPONSIVIDADE
   ========================================================= */

@media (max-width: 700px) {
    .modal-certificado {
        padding: 12px;
    }

    .modal-certificado-conteudo {
        padding: 18px 12px;
    }

    .modal-certificado-cabecalho {
        margin-bottom: 16px;
        padding-right: 42px;
    }

    .modal-certificado-cabecalho span,
    .modal-certificado-titulo {
        font-size: 16px;
    }

    .modal-certificado-imagem img,
    .modal-certificado-conteudo img {
        max-height: calc(100vh - 150px);
    }

    .modal-certificado-fechar {
        top: 8px;
        right: 8px;

        width: 36px;
        height: 36px;

        font-size: 24px;
    }
}


/* =========================================================
   ACESSIBILIDADE — MOVIMENTO REDUZIDO
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
    .modal-certificado,
    .modal-certificado-fechar,
    .certificado-botao {
        transition: none;
    }
}