/* ============================================
   MODAL MANUAL - NOVO E LIMPO
   Versão: 2.0 - Refatorado do Zero
   ============================================ */

/* Botão de ajuda */
.ajuda-container {
    position: fixed;
    bottom: 10px;
    right: 10px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Garantir que o botão seja sempre circular em todas as telas */
.ajuda-container .btn-ajuda,
button.btn-ajuda,
.btn-ajuda {
    background: linear-gradient(135deg, #C41E3A 0%, #003366 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    width: 50px !important;
    height: 50px !important;
    font-size: 24px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.4) !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    z-index: 1 !important;
    min-width: 50px !important;
    max-width: 50px !important;
    min-height: 50px !important;
    max-height: 50px !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.btn-ajuda:hover {
    background: linear-gradient(135deg, #003366 0%, #C41E3A 100%) !important;
    transform: scale(1.1) !important;
    box-shadow: 0 6px 18px rgba(196, 30, 58, 0.6) !important;
    border-radius: 50% !important;
}

.texto-ajuda {
    margin-top: 3px;
    font-size: 11px;
    color: #050505;
    font-weight: 500;
}

/* Overlay de fundo escuro */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    backdrop-filter: blur(3px);
}

.modal-overlay.show {
    display: block;
}

/* Modal - CENTRALIZADO E MENOR */
.modal-manual {
    display: none;
    position: fixed;
    z-index: 10000;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 700px;
    max-width: calc(100vw - 40px);
    max-height: 85vh;
    overflow-y: auto;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    box-shadow: 0 20px 80px rgba(0,0,0,0.5);
    padding: 40px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #2c3e50;
    border: 4px solid #C41E3A;
    animation: slideUp 0.4s ease-out;
}

.modal-manual.show {
    display: block;
    animation: slideUp 0.4s ease-out;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Conteúdo do modal */
.modal-conteudo {
    position: relative;
}

.modal-conteudo h2 {
    margin-top: 0;
    color: #C41E3A;
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 25px;
    text-align: center;
    border-bottom: 4px solid #C41E3A;
    padding-bottom: 18px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    letter-spacing: 0.5px;
}

.modal-conteudo h3 {
    margin-top: 30px;
    color: #003366;
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 18px;
    padding-left: 20px;
    border-left: 5px solid #C41E3A;
    background: linear-gradient(90deg, rgba(196, 30, 58, 0.05) 0%, transparent 100%);
    padding-top: 8px;
    padding-bottom: 8px;
    padding-right: 12px;
    border-radius: 0 8px 8px 0;
}

.modal-conteudo p {
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 20px;
    color: #2c3e50;
    text-align: justify;
    padding: 0 5px;
}

.modal-conteudo ul,
.modal-conteudo ol {
    margin-left: 25px;
    margin-bottom: 20px;
    font-size: 15px;
    line-height: 1.8;
    color: #2c3e50;
    padding-right: 10px;
}

.modal-conteudo ul li,
.modal-conteudo ol li {
    margin-bottom: 15px;
    padding-left: 10px;
}

.modal-conteudo ul li {
    list-style-type: disc;
}

.modal-conteudo ol li {
    list-style-type: decimal;
}

.modal-conteudo strong {
    color: #C41E3A;
    font-weight: 800;
    font-size: 16px;
}

/* Botão fechar - MENOR */
.fechar {
    position: absolute;
    top: 12px;
    right: 12px;
    color: #C41E3A;
    font-size: 20px;
    font-weight: 900;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(248,249,250,0.9) 100%);
    border: 2px solid #C41E3A;
    transition: all 0.4s ease;
    z-index: 10001;
    box-shadow: 0 2px 8px rgba(196, 30, 58, 0.3);
}

.fechar:hover {
    color: white;
    background: linear-gradient(135deg, #C41E3A 0%, #003366 100%);
    transform: scale(1.25) rotate(90deg);
    box-shadow: 0 8px 25px rgba(196, 30, 58, 0.6);
    border-color: #003366;
}

/* Responsividade */
@media (max-width: 1024px) {
    .modal-manual {
        width: 600px;
        padding: 35px;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
}

@media (max-width: 768px) {
    .modal-manual {
        width: calc(100vw - 30px);
        padding: 30px;
        max-height: 85vh;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
    
    .modal-conteudo h2 {
        font-size: 24px;
    }
    
    .modal-conteudo h3 {
        font-size: 18px;
    }
    
    .modal-conteudo p,
    .modal-conteudo ul,
    .modal-conteudo ol {
        font-size: 14px;
    }
    
    .fechar {
        width: 24px;
        height: 24px;
        font-size: 18px;
        top: 10px;
        right: 10px;
    }
}
