/**
 * MEO Energia - PDF Export Styles v2.0
 * Estilos para sistema de exportação PDF
 * Janeiro 2026
 */

/* ========================================
   1. CONTAINER DO BOTÃO
   ======================================== */
.meo-pdf-container {
    margin: 20px 0;
    padding: 15px;
    background: linear-gradient(135deg, #f5f5f5 0%, #ffffff 100%);
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

.meo-pdf-align-direita {
    text-align: right;
}

.meo-pdf-align-esquerda {
    text-align: left;
}

.meo-pdf-align-centro {
    text-align: center;
}


/* ========================================
   2. BOTÃO PDF
   ======================================== */
.meo-btn-pdf {
    background: linear-gradient(135deg, #00B0CA 0%, #0098B3 100%);
    color: white;
    border: none;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 176, 202, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    letter-spacing: 0.3px;
}

/* Efeito ripple ao clicar */
.meo-btn-pdf::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.meo-btn-pdf:active::before {
    width: 300px;
    height: 300px;
}

/* Hover */
.meo-btn-pdf:hover:not(:disabled) {
    background: linear-gradient(135deg, #0098B3 0%, #00B0CA 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 176, 202, 0.4);
}

/* Active/Click */
.meo-btn-pdf:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 176, 202, 0.3);
}

/* Estado desativado */
.meo-btn-pdf:disabled {
    background: linear-gradient(135deg, #cccccc 0%, #b3b3b3 100%);
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.6;
    transform: none !important;
}

/* Estado ativo (após simulação) */
.meo-btn-pdf.active {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(0, 176, 202, 0.3);
    }
    50% {
        box-shadow: 0 4px 25px rgba(0, 176, 202, 0.6);
    }
}

/* Estado de loading */
.meo-btn-pdf.loading {
    pointer-events: none;
    opacity: 0.7;
}

.meo-btn-pdf.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spinner 0.6s linear infinite;
}

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


/* ========================================
   3. MENSAGENS DE FEEDBACK
   ======================================== */
.meo-feedback-msg {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    z-index: 99999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 250px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.meo-msg-success {
    background: #73b535;
    color: white;
}

.meo-msg-error {
    background: #d32f2f;
    color: white;
}

.meo-msg-info {
    background: #00B0CA;
    color: white;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}


/* ========================================
   4. ÍCONES
   ======================================== */
.meo-btn-pdf .icon {
    font-size: 18px;
    line-height: 1;
}


/* ========================================
   5. TOOLTIP (OPCIONAL)
   ======================================== */
.meo-btn-pdf[data-tooltip] {
    position: relative;
}

.meo-btn-pdf[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    padding: 8px 12px;
    background: #333;
    color: white;
    font-size: 12px;
    font-weight: normal;
    white-space: nowrap;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.meo-btn-pdf[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #333;
    z-index: 1000;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(5px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}


/* ========================================
   6. RESPONSIVO
   ======================================== */
@media (max-width: 768px) {
    .meo-btn-pdf {
        padding: 12px 24px;
        font-size: 14px;
        width: 100%;
        max-width: 300px;
    }

    .meo-pdf-container {
        text-align: center !important;
        padding: 10px;
    }

    .meo-feedback-msg {
        right: 10px;
        left: 10px;
        min-width: auto;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .meo-btn-pdf {
        padding: 10px 20px;
        font-size: 13px;
    }

    .meo-pdf-container {
        margin: 15px 0;
    }
}


/* ========================================
   7. ACESSIBILIDADE
   ======================================== */
.meo-btn-pdf:focus {
    outline: 3px solid #00B0CA;
    outline-offset: 2px;
}

.meo-btn-pdf:focus:not(:focus-visible) {
    outline: none;
}

/* Modo alto contraste */
@media (prefers-contrast: high) {
    .meo-btn-pdf {
        border: 2px solid currentColor;
    }
}

/* Redução de movimento */
@media (prefers-reduced-motion: reduce) {
    .meo-btn-pdf,
    .meo-feedback-msg {
        animation: none;
        transition: none;
    }

    .meo-btn-pdf:hover {
        transform: none;
    }
}


/* ========================================
   8. DARK MODE (OPCIONAL)
   ======================================== */
@media (prefers-color-scheme: dark) {
    .meo-pdf-container {
        background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
        border-color: #444;
    }

    .meo-feedback-msg {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    }
}


/* ========================================
   9. ANIMAÇÕES EXTRAS
   ======================================== */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.meo-btn-pdf.bounce {
    animation: bounce 1s ease infinite;
}


/* ========================================
   10. PRINT (ESCONDER BOTÃO AO IMPRIMIR)
   ======================================== */
@media print {
    .meo-pdf-container,
    .meo-btn-pdf,
    .meo-feedback-msg {
        display: none !important;
    }
}
