/* ===== EXPORT BUTTONS STYLESHEET ===== */

.export-buttons {
    background: linear-gradient(135deg, rgba(51, 207, 102, 0.1), rgba(55, 178, 77, 0.1));
    border: 2px solid #33cf66;
    border-radius: 12px;
    padding: 16px;
    min-width: 220px;
}

.export-buttons h4 {
    color: #1e3c72;
    margin: 0 0 12px 0;
    font-size: 0.95em;
    font-weight: 600;
}

.export-button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.export-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9em;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    white-space: nowrap;
}

.export-csv {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: #667eea;
}

.export-csv:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.3);
}

.export-pdf {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: white;
    border-color: #f5576c;
}

.export-pdf:hover {
    background: linear-gradient(135deg, #f5576c, #f093fb);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(245, 87, 108, 0.3);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .export-buttons {
        min-width: auto;
        width: 100%;
        margin-top: 20px;
    }
    
    .export-button-group {
        width: 100%;
    }
    
    .export-btn {
        flex: 1;
        min-height: 38px;
    }
}

/* Inline export buttons (smaller variant for tables) */
.export-btn-small {
    padding: 6px 12px;
    font-size: 0.85em;
    border-radius: 6px;
}

/* Alert/Success messages for downloads */
.export-alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-weight: 600;
}

.export-alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.export-alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Loading state */
.export-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.export-btn.loading {
    position: relative;
    color: transparent;
}

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

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

/* Tooltip */
.export-btn[title] {
    position: relative;
}

.export-btn[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.8em;
    white-space: nowrap;
    margin-bottom: 8px;
    font-weight: 400;
}

/* Export buttons in header */
.page-header-with-export {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.page-header-with-export h1,
.page-header-with-export h2 {
    flex: 1;
    min-width: 200px;
}

@media (max-width: 1024px) {
    .page-header-with-export {
        flex-direction: column;
        align-items: stretch;
    }
    
    .export-buttons {
        width: 100%;
    }
}
