/* Scuola Illustrata Core - Public General Styles */

/* Reset e Base */
.si-user-downloads,
.si-user-dashboard,
.si-top-downloads {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.6;
}

/* Utility Classes */
.si-text-center {
    text-align: center;
}

.si-text-muted {
    color: #666;
}

.si-mb-0 { margin-bottom: 0; }
.si-mb-1 { margin-bottom: 10px; }
.si-mb-2 { margin-bottom: 20px; }
.si-mb-3 { margin-bottom: 30px; }

.si-mt-0 { margin-top: 0; }
.si-mt-1 { margin-top: 10px; }
.si-mt-2 { margin-top: 20px; }
.si-mt-3 { margin-top: 30px; }

/* No Downloads State */
.si-no-downloads {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border: 2px dashed #ddd;
    border-radius: 12px;
    color: #999;
    font-size: 16px;
}

.si-no-downloads::before {
    content: "📥";
    display: block;
    font-size: 64px;
    margin-bottom: 15px;
}

/* Loading State */
.si-loading {
    text-align: center;
    padding: 40px;
}

.si-loading::after {
    content: "";
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    animation: si-spin 1s linear infinite;
}

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

/* Buttons */
.si-button,
.si-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #0073aa;
    color: #fff !important;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s;
}

.si-button:hover,
.si-btn:hover {
    background: #005177;
    color: #fff !important;
}

.si-button-secondary,
.si-btn-secondary {
    background: #f0f0f0;
    color: #333 !important;
}

.si-button-secondary:hover,
.si-btn-secondary:hover {
    background: #e0e0e0;
    color: #333 !important;
}

/* Cards */
.si-card-simple {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Badges */
.si-badge-primary { background: #0073aa; color: #fff; }
.si-badge-success { background: #46b450; color: #fff; }
.si-badge-warning { background: #f0b849; color: #000; }
.si-badge-danger { background: #dc3232; color: #fff; }
.si-badge-info { background: #00a0d2; color: #fff; }

.si-badge-primary,
.si-badge-success,
.si-badge-warning,
.si-badge-danger,
.si-badge-info {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
}

/* Alerts */
.si-alert {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.si-alert-info {
    background: #e5f5ff;
    border-left: 4px solid #00a0d2;
    color: #00668c;
}

.si-alert-success {
    background: #ecf7ed;
    border-left: 4px solid #46b450;
    color: #2e7d32;
}

.si-alert-warning {
    background: #fff8e1;
    border-left: 4px solid #f0b849;
    color: #8a6d3b;
}

.si-alert-danger {
    background: #fef0f0;
    border-left: 4px solid #dc3232;
    color: #a94442;
}

/* Responsive Grid */
.si-grid {
    display: grid;
    gap: 20px;
}

.si-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.si-grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.si-grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

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

/* Print Styles */
@media print {
    .si-button,
    .si-btn,
    .si-dashboard-actions {
        display: none !important;
    }
    
    .si-card-simple,
    .download-item {
        break-inside: avoid;
    }
}

/* Dark Mode Support (Futuro) */
@media (prefers-color-scheme: dark) {
    /* Placeholder per supporto dark mode futuro */
}

/* Responsive Breakpoints */
@media (max-width: 1200px) {
    /* Large tablets */
}

@media (max-width: 992px) {
    /* Tablets */
}

@media (max-width: 768px) {
    /* Mobile */
    .si-grid-2,
    .si-grid-3,
    .si-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    /* Small mobile */
    .si-button,
    .si-btn {
        width: 100%;
        text-align: center;
    }
}
