/**
 * Sistema Me Avise - Estilos
 * Blue Concursos - VERSÃO CORRIGIDA
 */

/* ========================================
   BOTÃO ME AVISE
======================================== */
.btn-me-avise {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.2);
    position: relative;
    overflow: hidden;
}

.btn-me-avise:hover {
    background: linear-gradient(135deg, #005a87 0%, #004666 100%);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
    transform: translateY(-2px);
}

.btn-me-avise:active {
    transform: translateY(0);
}

.btn-me-avise svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

/* ========================================
   ESTADO ATIVO (Notificação Ativada)
======================================== */
.btn-me-avise.ativo {
    background: linear-gradient(135deg, #004666 0%, #003349 100%);
    box-shadow: 0 2px 8px rgba(0, 70, 102, 0.3);
}

.btn-me-avise.ativo:hover {
    background: linear-gradient(135deg, #003349 0%, #00242e 100%);
    box-shadow: 0 4px 12px rgba(0, 70, 102, 0.4);
}

/* Animação do sininho tocando */
.btn-me-avise.ativo svg,
.btn-me-avise svg.bell-animate {
    animation: bellRing 0.6s ease;
}

@keyframes bellRing {
    0%, 100% { 
        transform: rotate(0deg); 
    }
    10%, 30% { 
        transform: rotate(-15deg); 
    }
    20%, 40% { 
        transform: rotate(15deg); 
    }
    50% { 
        transform: rotate(-10deg); 
    }
    60% { 
        transform: rotate(10deg); 
    }
    70% { 
        transform: rotate(-5deg); 
    }
    80% { 
        transform: rotate(5deg); 
    }
}

/* Ondas do sininho (SVG paths) */
.bell-wave-left,
.bell-wave-right {
    animation: bellWave 0.8s ease infinite;
}

.bell-wave-right {
    animation-delay: 0.1s;
}

@keyframes bellWave {
    0%, 100% { 
        opacity: 0;
        transform: translateX(0);
    }
    50% { 
        opacity: 1;
        transform: translateX(2px);
    }
}

/* ========================================
   VARIAÇÕES DO BOTÃO
======================================== */

/* Nos cards da página Editais Abertos */
.btn-me-avise.card-button {
    width: 100%;
    justify-content: center;
    padding: 12px 20px;
    font-size: 15px;
}

/* No single (dentro do artigo) */
.btn-me-avise.bc-btn-me-avise-single {
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: #FFFFFF;
    font-weight: 700;
    font-size: 15px;
    padding: 15px 20px;
}

.btn-me-avise.bc-btn-me-avise-single.ativo {
    background: linear-gradient(135deg, #004666 0%, #003349 100%);
}

/* ========================================
   MODAL CONTAINER
======================================== */
.modal-me-avise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Overlay */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

/* Content Box */
.modal-content {
    position: relative;
    background: #fff;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    border-radius: 12px;
    padding: 40px 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    animation: modalSlideIn 0.3s ease;
    overflow-y: auto;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Botão Fechar */
.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    color: #999;
    padding: 5px 10px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    color: #333;
    transform: rotate(90deg);
}

/* ========================================
   MODAL BODY
======================================== */
.modal-icon {
    font-size: 60px;
    margin-bottom: 20px;
    animation: iconBounce 0.6s ease;
}

@keyframes iconBounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.modal-content h2 {
    font-size: 26px;
    margin-bottom: 10px;
    color: #333;
    font-weight: 700;
}

.modal-content p {
    color: #666;
    margin-bottom: 20px;
    font-size: 15px;
    line-height: 1.6;
}

/* ========================================
   INFO DO CONCURSO
======================================== */
.concurso-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    text-align: left;
    margin-bottom: 25px;
    border: 1px solid #e9ecef;
}

.concurso-info p {
    margin: 8px 0;
    font-size: 14px;
    color: #495057;
}

.concurso-info strong {
    color: #212529;
}

.concurso-info span {
    color: #0073aa;
    font-weight: 600;
}

/* ========================================
   FORMULÁRIO
======================================== */
#form-me-avise {
    text-align: left;
}

#form-me-avise input[type="email"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 18px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

#form-me-avise input[type="email"]:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

/* Checkbox Label */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    text-align: left;
    margin-bottom: 25px;
    cursor: pointer;
    color: #495057;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-label a {
    color: #0073aa;
    text-decoration: underline;
}

.checkbox-label a:hover {
    color: #005a87;
}

/* Botão Confirmar */
.btn-confirmar {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-confirmar:hover {
    background: linear-gradient(135deg, #005a87 0%, #004666 100%);
    box-shadow: 0 6px 16px rgba(0, 115, 170, 0.4);
    transform: translateY(-2px);
}

.btn-confirmar:active {
    transform: translateY(0);
}

.btn-confirmar:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

/* Loading Spinner */
.btn-loading .spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Footer Text */
.modal-footer-text {
    font-size: 13px;
    color: #999;
    margin-top: 20px;
    margin-bottom: 0;
}

/* ========================================
   TELA DE SUCESSO
======================================== */
.modal-sucesso .modal-icon {
    color: #28a745;
    font-size: 80px;
}

.modal-sucesso h2 {
    color: #28a745;
}

/* ========================================
   TELA DE ERRO
======================================== */
.modal-erro .modal-icon {
    color: #dc3545;
    font-size: 70px;
}

.modal-erro h2 {
    color: #dc3545;
}

#erro-message {
    color: #721c24;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 15px;
    border-radius: 6px;
}

/* ========================================
   RESPONSIVIDADE
======================================== */
@media (max-width: 600px) {
    .modal-content {
        width: 95%;
        padding: 30px 20px;
        max-height: 95vh;
    }
    
    .modal-content h2 {
        font-size: 22px;
    }
    
    .modal-icon {
        font-size: 50px;
    }
    
    .btn-me-avise {
        font-size: 13px;
        padding: 8px 14px;
    }
}

@media (max-width: 400px) {
    .modal-content {
        padding: 25px 15px;
    }
    
    #form-me-avise input[type="email"] {
        padding: 12px 14px;
        font-size: 15px;
    }
    
    .checkbox-label {
        font-size: 13px;
    }
}

/* ========================================
   ACESSIBILIDADE
======================================== */
.modal-content:focus {
    outline: none;
}

.btn-confirmar:focus,
.btn-me-avise:focus,
.modal-close:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

input[type="email"]:focus {
    outline: none;
}

/* ========================================
   ANIMAÇÕES ADICIONAIS
======================================== */
.modal-body {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Hover effect no botão me avise */
.btn-me-avise::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-me-avise:hover::before {
    left: 100%;
}