/* 
 * Estilos para Botões de Exportação
 * Sistema BC - Relatórios
 */

.export-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.export-btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 0.375rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s ease-in-out;
    border: 1px solid transparent;
}

.export-btn i {
    margin-right: 0.5rem;
}

.export-btn-pdf {
    background-color: #dc3545;
    color: white;
    border-color: #dc3545;
}

.export-btn-pdf:hover {
    background-color: #c82333;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.export-btn-excel {
    background-color: #198754;
    color: white;
    border-color: #198754;
}

.export-btn-excel:hover {
    background-color: #157347;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.export-btn-csv {
    background-color: #0dcaf0;
    color: white;
    border-color: #0dcaf0;
}

.export-btn-csv:hover {
    background-color: #0bb5d3;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Dropdown de exportação */
.export-dropdown {
    position: relative;
    display: inline-block;
}

.export-dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    z-index: 1000;
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
    top: 100%;
    right: 0;
    margin-top: 0.25rem;
}

.export-dropdown:hover .export-dropdown-content {
    display: block;
}

.export-dropdown-content a {
    color: #212529;
    padding: 0.5rem 1rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: background-color 0.2s;
}

.export-dropdown-content a:hover {
    background-color: #f8f9fa;
}

.export-dropdown-content a i {
    margin-right: 0.5rem;
    width: 1rem;
}

/* Loading animation */
.export-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.export-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1rem;
    height: 1rem;
    margin: -0.5rem 0 0 -0.5rem;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: export-spin 1s linear infinite;
}

@keyframes export-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile responsivo */
@media (max-width: 768px) {
    .export-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .export-btn {
        justify-content: center;
        margin-bottom: 0.5rem;
    }
    
    .export-dropdown-content {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        min-width: auto;
        border-radius: 0.375rem 0.375rem 0 0;
    }
}

/* Tooltip personalizado */
.export-tooltip {
    position: relative;
    display: inline-block;
}

.export-tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #555;
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1001;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.75rem;
}

.export-tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #555 transparent transparent transparent;
}

.export-tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Card de exportação rápida */
.quick-export-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.quick-export-card h6 {
    margin-bottom: 1rem;
    font-weight: 600;
}

.quick-export-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
}

.quick-export-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.375rem;
    padding: 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.quick-export-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.quick-export-item i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

.quick-export-item span {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Animação de sucesso */
.export-success {
    animation: export-success-pulse 0.6s ease-out;
}

@keyframes export-success-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(25, 135, 84, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(25, 135, 84, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(25, 135, 84, 0);
    }
}
