/* =========================
   ATIVE RMA - MODAIS
   Arquivo: modais-landing.css
   Diretório: ativerma\inicio\css\modais-landing.css
   Descrição: Estilos EXCLUSIVOS dos modais
========================= */

/* =========================
   BASE DO MODAL
========================= */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

/* Modal de login tem prioridade quando usado no fluxo de pagamento */
#modal-login {
    z-index: 1100;
}

.modal.show {
    display: flex;
    animation: fadeIn 0.3s ease-out;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

body.modal-open {
    overflow: hidden;
    height: 100%;
    position: fixed;
    width: 100%;
}

/* =========================
   ESTRUTURA DO MODAL
========================= */
.modal-content {
    z-index: 1010; /* Aumentado para ficar acima do overlay */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    width: 90%;
    max-width: 600px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    overflow: hidden;
}

/* Modal de login - maior prioridade */
#modal-login .modal-overlay {
    z-index: 1105; /* Acima de todos os outros overlays */
}

#modal-login .modal-content {
    z-index: 1110; /* Acima do próprio overlay do login */
}

.modal-content-large {
    max-width: 800px;
}

/* =========================
   BODY DO MODAL
========================= */
.modal-body-wrapper {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transform: translate3d(0, 0, 0);
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* Scrollbar customizada azul */
.modal-body-wrapper::-webkit-scrollbar {
    width: 8px;
}

.modal-body-wrapper::-webkit-scrollbar-track {
    background: #e9ecef;
    border-radius: 10px;
}

.modal-body-wrapper::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #1672d8, #1363bd);
    border-radius: 10px;
}

.modal-body-wrapper::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #1363bd, #0d5ca8);
}

.modal-body-wrapper {
    scrollbar-width: thin;
    scrollbar-color: #1672d8 #e9ecef;
}

.modal-body {
    padding: 20px 25px 25px 25px;
}

/* =========================
   MODAL DETALHES - Cabeçalho do App
========================= */
.app-detail-header {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    padding: 1.5rem;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.app-detail-logo {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(22, 114, 216, 0.1), rgba(59, 130, 246, 0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.app-detail-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.app-detail-logo i {
    font-size: 3rem;
    color: #1672d8;
}

.app-detail-info {
    flex: 1;
}

.app-detail-info h3 {
    font-size: 1.5rem;
    color: #374151;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.app-detail-info .app-price {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    color: #6B7280;
}

.app-detail-info .app-price strong {
    font-size: 1.8rem;
    color: #1672d8;
    font-weight: 700;
}

/* =========================
   MODAL DETALHES - Screenshots
========================= */
.app-screenshots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Quando houver apenas 1 screenshot: centralizar e limitar tamanho */
.app-screenshots.single-screenshot {
    grid-template-columns: 1fr;
    justify-items: center;
}

.app-screenshots.single-screenshot .screenshot-item {
    max-width: 400px;
    width: 100%;
}

.screenshot-item {
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.screenshot-item img {
    width: 100%;
    height: auto;
    display: block;
}

.screenshot-placeholder {
    aspect-ratio: 16/9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(22, 114, 216, 0.05), rgba(59, 130, 246, 0.02));
    color: #6B7280;
}

.screenshot-placeholder i {
    font-size: 3rem;
    color: #1672d8;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.screenshot-placeholder p {
    font-size: 0.9rem;
    color: #6B7280;
}

/* =========================
   MODAL DETALHES - FAQ
========================= */
.app-faq-modal {
    background: #ffffff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.app-faq-modal h4 {
    color: #1672d8;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.faq-modal-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.faq-modal-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.faq-modal-question {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.75rem;
    color: #374151;
}

.faq-modal-question i {
    color: #1672d8;
    font-size: 1.1rem;
}

.faq-modal-question strong {
    font-size: 1rem;
}

.faq-modal-answer {
    color: #6B7280;
    line-height: 1.7;
    padding-left: 30px;
}

.faq-modal-answer strong {
    color: #1672d8;
}

/* =========================
   MODAL DETALHES - Aviso
========================= */
.app-notice {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border-top: 4px solid #ffc107;
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.2);
    text-align: center;
}

.notice-icon {
    flex-shrink: 0;
}

.notice-icon i {
    font-size: 2rem;
    color: #f59e0b;
}

.notice-content {
    text-align: center;
}

.notice-content h5 {
    color: #92400e;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.notice-content p {
    color: #78350f;
    line-height: 1.6;
    margin: 0;
}

/* =========================
   MODAL ATIVAR - Info do App
========================= */
.ativar-app-info {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    padding: 1.5rem;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.ativar-logo {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(22, 114, 216, 0.1), rgba(59, 130, 246, 0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ativar-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ativar-logo i {
    font-size: 2.5rem;
    color: #1672d8;
}

.ativar-details {
    flex: 1;
}

.ativar-details h4 {
    font-size: 1.3rem;
    color: #374151;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.ativar-price {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: #6B7280;
}

.ativar-price strong {
    font-size: 1.5rem;
    color: #1672d8;
    font-weight: 700;
}

/* =========================
   MODAL ATIVAR - Título Seção
========================= */
.ativar-section-title {
    font-size: 1.1rem;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e5e7eb;
}

.ativar-section-title i {
    color: #1672d8;
    font-size: 1.2rem;
}

/* =========================
   MODAL ATIVAR - Formulário
========================= */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group label i {
    color: #1672d8;
}

.form-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    font-family: 'Courier New', monospace;
    font-weight: 500;
    letter-spacing: 1px;
    transition: all 0.2s ease;
    background: #ffffff;
}

.form-group input::placeholder {
    color: #9ca3af;
    letter-spacing: normal;
}

/* =========================
   MODAL ATIVAR - Aviso
========================= */
.ativar-notice {
    background: linear-gradient(135deg, #d6e9fb, #cbe2fb);
    border-top: 4px solid #1672d8;
    border-radius: 8px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(22, 114, 216, 0.15);
    text-align: center;
}

.ativar-notice p {
    color: #0b4c91;
    line-height: 1.6;
    margin: 0;
}

/* =========================
   ANIMAÇÕES
========================= */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================
   RESPONSIVIDADE
========================= */

/* Tablet */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .modal-title {
        font-size: 1.2rem;
    }

    .app-detail-header,
    .ativar-app-info {
        flex-direction: column;
        text-align: center;
    }

    .app-screenshots {
        grid-template-columns: 1fr;
    }

    .modal-buttons {
        flex-direction: column;
    }

    .btn-cancelar,
    .btn-salvar {
        width: 100%;
        justify-content: center;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .modal-body {
        padding: 1.5rem;
    }

    .modal-header {
        padding: 1.25rem 1.5rem;
    }

    .modal-footer {
        padding: 1.25rem 1.5rem;
    }

    .modal-title-wrapper i {
        font-size: 1.2rem;
    }

    .modal-title {
        font-size: 1.1rem;
    }

    .app-detail-logo,
    .ativar-logo {
        width: 80px;
        height: 80px;
    }

    .app-detail-info h3,
    .ativar-details h4 {
        font-size: 1.2rem;
    }
}

.modal-content-small {
    max-width: 450px;
}

/* Texto de confirmação */
.texto-confirmacao {
    display: flex;
    flex-direction: column; /* Ícone acima, texto abaixo */
    align-items: center;    /* Centraliza tudo horizontalmente */
    justify-content: center;
    text-align: center;     /* Centraliza o texto */
    gap: 10px;
    font-size: 1.05rem;
    color: #374151;
    line-height: 1.6;
    padding: 1rem 0;
}

.texto-confirmacao i {
    font-size: 2.5rem;
    color: #f59e0b;
}

/* =========================
   VALIDAÇÃO DE ERRO
========================= */
.input-error:focus {
    outline: none;
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 38, 38, 0.25) !important;
}

/* Erro no checkbox */
.checkmark-error {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 38, 38, 0.25) !important;
    animation: shakeError 0.4s ease-in-out;
}