/**
 * Skooly Downloads Manager - Additional Styles
 * Estilos adicionais e overrides para melhor compatibilidade
 */

/* Garantir que não haja conflitos com tema */
.skooly-downloads-container * {
    box-sizing: border-box;
}

/* Smooth transitions */
.skooly-download-card,
.skooly-download-btn,
.skooly-search-input,
.skooly-category-filter {
    transition: all 0.3s ease;
}

/* Focus states melhorados */
.skooly-search-input:focus,
.skooly-category-filter:focus {
    outline: none;
    border-color: #1976D2;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

/* Hover effects */
.skooly-download-card:hover .skooly-card-title {
    color: #1976D2;
}

/* Loading state */
.skooly-download-btn.loading {
    position: relative;
    color: transparent;
}

.skooly-download-btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Tooltips */
.skooly-tooltip {
    position: relative;
}

.skooly-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    margin-bottom: 5px;
}

.skooly-tooltip:hover::after {
    opacity: 1;
}

/* Empty state */
.skooly-no-downloads {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Print styles */
@media print {
    .skooly-downloads-controls,
    .skooly-download-btn {
        display: none !important;
    }
    
    .skooly-download-card {
        page-break-inside: avoid;
    }
}

/* Accessibility */
.skooly-download-btn:focus {
    outline: 2px solid #1976D2;
    outline-offset: 2px;
}

.skooly-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Dark mode support (opcional) */
@media (prefers-color-scheme: dark) {
    .skooly-download-card {
        background: #2c2c2c;
        color: #e0e0e0;
    }
    
    .skooly-card-title {
        color: #ffffff;
    }
    
    .skooly-card-excerpt {
        color: #b0b0b0;
    }
    
    .skooly-search-input,
    .skooly-category-filter {
        background: #1a1a1a;
        color: #ffffff;
        border-color: #404040;
    }
}

/* Customização para Elementor */
.elementor-widget-text-editor .skooly-downloads-container,
.elementor-widget-shortcode .skooly-downloads-container {
    margin: 0;
}

/* RTL Support */
[dir="rtl"] .skooly-downloads-controls {
    direction: rtl;
}

[dir="rtl"] .skooly-card-categories {
    flex-direction: row-reverse;
}
