/**
 * Estilos do Modal de Certificado (Frontend)
 */

/* Botão */
.certificado-botao-wrapper {
    margin: 0 0 24px 0;
}

/* Dentro do card lateral do evento Fundacor */
.evento-fundacor__card-body .certificado-botao-wrapper {
    margin: 16px 0 0 0;
}

.evento-fundacor__card-body .certificado-botao {
    width: 100%;
    justify-content: center;
    padding: 10px 20px;
    font-size: 14px;
}

.certificado-botao {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: #1a6e3e;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.certificado-botao:hover {
    background: #145a32;
}

.certificado-botao:active {
    transform: scale(0.98);
}

.certificado-botao-icon {
    display: flex;
    align-items: center;
}

/* Modal Overlay */
.certificado-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.certificado-modal-overlay[aria-hidden="false"] {
    display: flex;
}

/* Modal Dialog */
.certificado-modal {
    position: relative;
    background: #fff;
    border-radius: 10px;
    max-width: 480px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: certificadoFadeIn 0.25s ease;
}

@keyframes certificadoFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.certificado-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    padding: 0;
    z-index: 1;
}

.certificado-modal-close:hover {
    color: #000;
}

.certificado-modal-content {
    padding: 32px 28px;
}

.certificado-modal-content h2 {
    margin: 0 0 12px 0;
    font-size: 22px;
    color: #1a1a1a;
}

.certificado-modal-content p {
    margin: 0 0 20px 0;
    color: #555;
    font-size: 14px;
    line-height: 1.5;
}

/* Form */
.certificado-form-group {
    margin-bottom: 16px;
}

.certificado-form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.certificado-form-group input[type="email"] {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #ccd0d4;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.certificado-form-group input[type="email"]:focus {
    border-color: #1a6e3e;
    outline: none;
    box-shadow: 0 0 0 2px rgba(26, 110, 62, 0.15);
}

.certificado-form-error {
    display: block;
    color: #d63638;
    font-size: 12px;
    margin-top: 4px;
    min-height: 18px;
}

/* Botão submit */
.certificado-submit-btn {
    display: inline-block;
    width: 100%;
    padding: 12px;
    background: #1a6e3e;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s;
    box-sizing: border-box;
}

.certificado-submit-btn:hover {
    background: #145a32;
    color: #fff;
    text-decoration: none;
}

.certificado-voltar-btn {
    margin-top: 12px;
}

/* Spinner */
.certificado-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 16px auto;
    border: 3px solid #e0e0e0;
    border-top-color: #1a6e3e;
    border-radius: 50%;
    animation: certificadoSpin 0.8s linear infinite;
}

@keyframes certificadoSpin {
    to { transform: rotate(360deg); }
}

#certificado-estado-loading {
    text-align: center;
}

#certificado-estado-loading p {
    font-size: 15px;
    color: #666;
}

/* Mensagens */
.certificado-mensagem {
    padding: 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.certificado-mensagem-erro {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.certificado-mensagem-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.certificado-mensagem a {
    font-weight: 600;
}

/* Sucesso */
.certificado-sucesso {
    text-align: center;
}

.certificado-sucesso-icon {
    margin-bottom: 16px;
}

.certificado-sucesso h3 {
    color: #1a6e3e;
    margin: 0 0 8px 0;
}

.certificado-sucesso p {
    color: #555;
    font-size: 14px;
}

.certificado-sucesso-link {
    margin-top: 20px !important;
}

/* Responsivo */
@media (max-width: 520px) {
    .certificado-modal-content {
        padding: 24px 18px;
    }

    .certificado-modal-content h2 {
        font-size: 19px;
    }
}
