/**
 * CPM Modal CSS - Estilos do modal de alerta no front-end
 *
 * @package CPT_Publication_Monitor
 * @since 1.0.0
 */

/* Overlay do modal */
.cpm-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 46, 71, 0.85);
    z-index: 999999;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.cpm-modal-overlay.cpm-modal-active {
    display: flex;
    opacity: 1;
}

/* Box do modal */
.cpm-modal-box {
    background: #ffffff;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: cpmModalSlideIn 0.3s ease-out;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

@keyframes cpmModalSlideIn {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Botão de fechar (X) */
.cpm-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 28px;
    color: #7A8987;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
}

.cpm-modal-close:hover {
    background-color: #f0f0f1;
    color: #2A454A;
}

.cpm-modal-close:focus {
    outline: 3px solid #1DC98A;
    outline-offset: 2px;
}

/* Título do modal */
.cpm-modal-title {
    color: #2A454A;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 15px 0;
    padding-right: 40px;
    line-height: 1.3;
}

/* Conteúdo do modal */
.cpm-modal-content {
    color: #7A8987;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 25px;
}

.cpm-modal-content p {
    margin: 0 0 10px 0;
}

.cpm-modal-content p:last-child {
    margin-bottom: 0;
}

/* Botão de ação do modal */
.cpm-modal-button {
    width: 100%;
    background-color: #1DC98A;
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.cpm-modal-button:hover {
    background-color: #25D293;
}

.cpm-modal-button:focus {
    outline: 3px solid #002e47;
    outline-offset: 2px;
}

.cpm-modal-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Container de ações do modal */
.cpm-modal-actions {
    margin: 15px 0;
}

/* Botão de download PDF */
.cpm-download-pdf {
    background-color: #002e47 !important;
    margin-bottom: 10px;
}

.cpm-download-pdf:hover {
    background-color: #003d5c !important;
}

/* Botão de fechar */

/* Responsividade */
@media screen and (max-width: 768px) {
    .cpm-modal-overlay {
        padding: 15px;
    }
    
    .cpm-modal-box {
        padding: 25px 20px;
    }
    
    .cpm-modal-title {
        font-size: 20px;
    }
    
    .cpm-modal-content {
        font-size: 14px;
    }
    
    .cpm-modal-button {
        font-size: 15px;
        padding: 11px 20px;
    }
}

/* Acessibilidade - high contrast mode */
@media (prefers-contrast: high) {
    .cppm-modal-overlay {
        background-color: rgba(0, 0, 0, 0.95);
    }
    
    .cpm-modal-box {
        border: 2px solid #2A454A;
    }
    
    .cpm-modal-close:focus,
    .cpm-modal-button:focus {
        outline-width: 4px;
    }
}

/* Animação de redução de movimento */
@media (prefers-reduced-motion: reduce) {
    .cpm-modal-overlay {
        transition: none;
    }
    
    .cpm-modal-box {
        animation: none;
    }
}
