/* ========================================
   PÁGINA DE VALIDAÇÃO DE CERTIFICADOS
   ======================================== */

.sp-certificados-page {
    background: linear-gradient(135deg, #2C4C4C 0%, #1a2e2e 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.sp-certificados-container {
    max-width: 600px;
    width: 100%;
}

/* ========================================
   HEADER
   ======================================== */

.sp-cert-header {
    text-align: center;
    margin-bottom: 50px;
    color: white;
}

.sp-cert-icon {
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.sp-cert-header h1 {
    font-size: 36px;
    font-weight: 700;
    margin: 0 0 15px 0;
    color: white;
}

.sp-cert-subtitle {
    font-size: 16px;
    opacity: 0.95;
    margin: 0;
}

/* ========================================
   TEXTO INFORMATIVO
   ======================================== */

.sp-cert-info-texto {
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

.sp-cert-info-texto p {
    font-family: 'Anton', sans-serif;
    font-size: 38px;
    line-height: 1.3;
    margin: 0 0 15px 0;
}

/* ========================================
   FORMULÁRIO
   ======================================== */

.sp-cert-form-container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    margin-bottom: 30px;
}

.sp-cert-input-group {
    display: flex;
    gap: 15px;
}

#sp-cert-codigo {
    flex: 1;
    padding: 18px 24px;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #F9FAFB;
}

#sp-cert-codigo:focus {
    border-color: #2C4C4C;
    background: white;
    box-shadow: 0 0 0 4px rgba(44, 76, 76, 0.1);
    outline: none;
}

.sp-cert-btn-validar {
    background: linear-gradient(135deg, #2C4C4C 0%, #1a2e2e 100%);
    color: white;
    border: none;
    padding: 18px 32px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(44, 76, 76, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.sp-cert-btn-validar:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(44, 76, 76, 0.5);
    background: linear-gradient(135deg, #1a2e2e 0%, #0d1717 100%);
}

.sp-cert-btn-validar:active {
    transform: translateY(0);
}

.sp-cert-btn-validar:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ========================================
   RESULTADO
   ======================================== */

.sp-cert-resultado {
    animation: slideUp 0.5s ease;
}

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

.sp-cert-card {
    background: white;
    border-radius: 20px;
    padding: 50px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.sp-cert-icon-resultado {
    width: 120px;
    height: 120px;
    margin: 0 auto 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Certificado VÁLIDO */
.sp-cert-validado .sp-cert-icon-resultado {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    box-shadow: 0 10px 40px rgba(16, 185, 129, 0.4);
}

.sp-cert-validado .sp-cert-icon-resultado svg {
    color: white;
}

.sp-cert-validado .sp-cert-status {
    font-size: 32px;
    font-weight: 700;
    color: #10B981;
    margin: 0 0 15px 0;
}

/* Certificado INVÁLIDO */
.sp-cert-invalido .sp-cert-icon-resultado {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    box-shadow: 0 10px 40px rgba(239, 68, 68, 0.4);
}

.sp-cert-invalido .sp-cert-icon-resultado svg {
    color: white;
}

.sp-cert-invalido .sp-cert-status {
    font-size: 32px;
    font-weight: 700;
    color: #EF4444;
    margin: 0 0 15px 0;
}

/* Código exibido */
.sp-cert-codigo-display {
    background: #F3F4F6;
    padding: 15px 25px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    color: #4B5563;
    margin-top: 20px;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

/* Dados extras (nome e data) */
.sp-cert-dados-extras {
    margin-top: 30px;
    padding: 20px;
    background: #F9FAFB;
    border-radius: 12px;
    border: 2px solid #E5E7EB;
}

.sp-cert-dado {
    padding: 12px 0;
    font-size: 16px;
    color: #374151;
    line-height: 1.6;
}

.sp-cert-dado:not(:last-child) {
    border-bottom: 1px solid #E5E7EB;
}

.sp-cert-dado strong {
    color: #1a1a1a;
    display: inline-block;
    min-width: auto;
    margin-right: 8px;
}

/* Botão nova busca */
.sp-cert-btn-novo {
    margin-top: 30px;
    background: #E5E7EB;
    color: #374151;
    padding: 14px 28px;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sp-cert-btn-novo:hover {
    background: #D1D5DB;
    transform: translateY(-2px);
}

/* ========================================
   LOADING STATE
   ======================================== */

.sp-cert-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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

/* ========================================
   RESPONSIVO
   ======================================== */

@media (max-width: 768px) {
    .sp-certificados-page {
        padding: 20px 15px;
    }

    .sp-cert-header h1 {
        font-size: 28px;
    }

    .sp-cert-icon {
        width: 80px;
        height: 80px;
    }

    .sp-cert-form-container {
        padding: 30px 20px;
    }

    .sp-cert-input-group {
        flex-direction: column;
        gap: 12px;
    }

    .sp-cert-btn-validar {
        justify-content: center;
        width: 100%;
    }

    .sp-cert-card {
        padding: 40px 25px;
    }

    .sp-cert-icon-resultado {
        width: 100px;
        height: 100px;
    }

    .sp-cert-status {
        font-size: 26px !important;
    }

    .sp-cert-codigo-display {
        font-size: 16px;
        padding: 12px 20px;
    }
}

/* ========================================
   BADGES DE VALIDADE
   ======================================== */

.sp-cert-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 16px;
    margin: 20px 0;
    letter-spacing: 1px;
    animation: fadeIn 0.6s ease 0.3s backwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.sp-cert-badge-valido {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.sp-cert-badge-expirado {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
}

.sp-cert-badge-icon {
    font-size: 20px;
    font-weight: bold;
}

.sp-cert-badge-text {
    font-size: 15px;
}

/* Aviso de expiração */
.sp-cert-aviso-expiracao {
    background: #FEF3C7 !important;
    border: 2px solid #F59E0B !important;
    border-radius: 10px;
    padding: 15px !important;
    color: #92400E !important;
    margin-top: 15px;
}

.sp-cert-aviso-expiracao strong {
    color: #92400E !important;
    font-size: 16px;
}

/* Responsivo para badges */
@media (max-width: 768px) {
    .sp-cert-badge {
        font-size: 14px;
        padding: 10px 20px;
    }

    .sp-cert-badge-icon {
        font-size: 18px;
    }

    .sp-cert-badge-text {
        font-size: 13px;
    }
}

/* ========================================
   CAIXA DE AVISO DE EXPIRAÇÃO
   ======================================== */

.sp-cert-aviso-expiracao-box {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    border: 3px solid #F59E0B;
    border-radius: 16px;
    padding: 25px;
    margin-top: 20px;
    text-align: left;
    animation: fadeIn 0.6s ease 0.4s backwards;
}

.sp-cert-aviso-titulo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    color: #92400E;
}

.sp-cert-aviso-titulo svg {
    flex-shrink: 0;
    color: #F59E0B;
}

.sp-cert-aviso-titulo strong {
    font-size: 20px;
    color: #92400E;
}

.sp-cert-aviso-expiracao-box p {
    color: #78350F;
    font-size: 15px;
    line-height: 1.6;
    margin: 10px 0;
}

.sp-cert-contatos {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    border: 2px solid #F59E0B;
}

.sp-cert-contato-titulo {
    color: #92400E;
    margin-bottom: 15px;
    font-size: 16px;
}

.sp-cert-contato-titulo strong {
    color: #92400E;
}

.sp-cert-contato-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    font-size: 15px;
}

.sp-cert-contato-item:not(:last-child) {
    border-bottom: 1px solid #FDE68A;
}

.sp-cert-contato-item svg {
    flex-shrink: 0;
    color: #F59E0B;
}

.sp-cert-contato-item a {
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.sp-cert-contato-item a:hover {
    color: #F59E0B;
    text-decoration: underline;
}

/* Responsivo para caixa de expiração */
@media (max-width: 768px) {
    .sp-cert-aviso-expiracao-box {
        padding: 20px;
    }

    .sp-cert-aviso-titulo strong {
        font-size: 18px;
    }

    .sp-cert-aviso-expiracao-box p {
        font-size: 14px;
    }

    .sp-cert-contatos {
        padding: 15px;
    }

    .sp-cert-contato-item {
        font-size: 14px;
    }
}
