/* Scadenzario Global Styles - Applicato a tutte le pagine del plugin */

/* ===== VARIABILI CSS GLOBALI ===== */
:root {
    /* Colori principali - basati sull'immagine */
    --primary-color: #286090;
    --primary-hover: #1e4a6b;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    
    /* Gradienti */
    --primary-gradient: linear-gradient(135deg, #286090 0%, #1e4a6b 100%);
    --success-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --warning-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --danger-gradient: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    
    /* Colori di sfondo - basati sull'immagine */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-card: #ffffff;
    --bg-modal: rgba(0, 0, 0, 0.5);
    
    /* Colori testo */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-white: #ffffff;
    
    /* Bordi e ombre - basati sull'immagine */
    --border-color: #e2e8f0;
    --border-radius: 8px;
    --border-radius-sm: 6px;
    --border-radius-lg: 12px;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    
    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-size-xs: 12px;
    --font-size-sm: 14px;
    --font-size-base: 16px;
    --font-size-lg: 18px;
    --font-size-xl: 20px;
    --font-size-2xl: 24px;
    --font-size-3xl: 30px;
    
    /* Transizioni */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ===== STILI GLOBALI PER TUTTE LE PAGINE ===== */

/* Applica font family a tutto il plugin */
.scadenzario-container,
.scadenzario-admin-container,
[class*="scadenzario"] {
    font-family: var(--font-family) !important;
}

/* Stili per i bottoni globali */
.scadenzario-container .btn,
.scadenzario-admin-container .btn,
[class*="scadenzario"] .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    border: none;
    border-radius: var(--border-radius);
    font-size: var(--font-size-sm);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-base);
    text-align: center;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    min-height: 44px;
}

.scadenzario-container .btn-primary,
.scadenzario-admin-container .btn-primary,
[class*="scadenzario"] .btn-primary {
    background: var(--primary-color);
    color: var(--text-white);
    box-shadow: var(--shadow-md);
}

.scadenzario-container .btn-primary:hover,
.scadenzario-admin-container .btn-primary:hover,
[class*="scadenzario"] .btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Stili per i form globali */
.scadenzario-container .form-group,
.scadenzario-admin-container .form-group,
[class*="scadenzario"] .form-group {
    margin-bottom: var(--spacing-lg);
}

.scadenzario-container .form-group label,
.scadenzario-admin-container .form-group label,
[class*="scadenzario"] .form-group label {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
    color: var(--text-primary);
    font-size: var(--font-size-sm);
}

.scadenzario-container .form-group input,
.scadenzario-container .form-group select,
.scadenzario-container .form-group textarea,
.scadenzario-admin-container .form-group input,
.scadenzario-admin-container .form-group select,
.scadenzario-admin-container .form-group textarea,
[class*="scadenzario"] .form-group input,
[class*="scadenzario"] .form-group select,
[class*="scadenzario"] .form-group textarea {
    width: 100%;
    padding: var(--spacing-md);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: var(--font-size-sm);
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all var(--transition-base);
    box-sizing: border-box;
}

.scadenzario-container .form-group input:focus,
.scadenzario-container .form-group select:focus,
.scadenzario-container .form-group textarea:focus,
.scadenzario-admin-container .form-group input:focus,
.scadenzario-admin-container .form-group select:focus,
.scadenzario-admin-container .form-group textarea:focus,
[class*="scadenzario"] .form-group input:focus,
[class*="scadenzario"] .form-group select:focus,
[class*="scadenzario"] .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(40, 96, 144, 0.1);
    transform: scale(1.02);
}

/* Stili per i modal globali */
.scadenzario-container .modal,
.scadenzario-admin-container .modal,
[class*="scadenzario"] .modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-modal);
    backdrop-filter: blur(4px);
    animation: fadeIn var(--transition-base);
}

.scadenzario-container .modal.show,
.scadenzario-admin-container .modal.show,
[class*="scadenzario"] .modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.scadenzario-container .modal-content,
.scadenzario-admin-container .modal-content,
[class*="scadenzario"] .modal-content {
    background: var(--bg-card);
    margin: auto;
    padding: 0;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideInDown var(--transition-base);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Stili per le card globali */
.scadenzario-container .card,
.scadenzario-admin-container .card,
[class*="scadenzario"] .card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.scadenzario-container .card:hover,
.scadenzario-admin-container .card:hover,
[class*="scadenzario"] .card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Stili per i badge di status globali */
.scadenzario-container .status-badge,
.scadenzario-admin-container .status-badge,
[class*="scadenzario"] .status-badge {
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius);
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: fadeInUp 0.6s ease;
}

.scadenzario-container .status-attiva,
.scadenzario-admin-container .status-attiva,
[class*="scadenzario"] .status-attiva {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fbbf24;
}

.scadenzario-container .status-pagata,
.scadenzario-admin-container .status-pagata,
[class*="scadenzario"] .status-pagata {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #34d399;
}

.scadenzario-container .status-scaduta,
.scadenzario-admin-container .status-scaduta,
[class*="scadenzario"] .status-scaduta {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #f87171;
}

/* Stili per le priorità globali */
.scadenzario-container .priority-alta,
.scadenzario-admin-container .priority-alta,
[class*="scadenzario"] .priority-alta {
    color: var(--danger-color);
    font-weight: 600;
}

.scadenzario-container .priority-media,
.scadenzario-admin-container .priority-media,
[class*="scadenzario"] .priority-media {
    color: var(--warning-color);
    font-weight: 600;
}

.scadenzario-container .priority-bassa,
.scadenzario-admin-container .priority-bassa,
[class*="scadenzario"] .priority-bassa {
    color: var(--success-color);
    font-weight: 600;
}

/* Stili per gli importi globali */
.scadenzario-container .importo,
.scadenzario-admin-container .importo,
[class*="scadenzario"] .importo {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--primary-color);
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Animazioni globali */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Utility classes globali */
.scadenzario-container .text-center,
.scadenzario-admin-container .text-center,
[class*="scadenzario"] .text-center {
    text-align: center;
}

.scadenzario-container .text-right,
.scadenzario-admin-container .text-right,
[class*="scadenzario"] .text-right {
    text-align: right;
}

.scadenzario-container .mb-20,
.scadenzario-admin-container .mb-20,
[class*="scadenzario"] .mb-20 {
    margin-bottom: var(--spacing-lg);
}

.scadenzario-container .mt-20,
.scadenzario-admin-container .mt-20,
[class*="scadenzario"] .mt-20 {
    margin-top: var(--spacing-lg);
}

.scadenzario-container .hidden,
.scadenzario-admin-container .hidden,
[class*="scadenzario"] .hidden {
    display: none;
}

.scadenzario-container .visible,
.scadenzario-admin-container .visible,
[class*="scadenzario"] .visible {
    display: block;
}

/* Responsive design globale */
@media (max-width: 768px) {
    .scadenzario-container .btn,
    .scadenzario-admin-container .btn,
    [class*="scadenzario"] .btn {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: var(--font-size-xs);
    }
    
    .scadenzario-container .modal-content,
    .scadenzario-admin-container .modal-content,
    [class*="scadenzario"] .modal-content {
        width: 95%;
        margin: var(--spacing-md);
    }
}

@media (max-width: 480px) {
    .scadenzario-container .card,
    .scadenzario-admin-container .card,
    [class*="scadenzario"] .card {
        padding: var(--spacing-lg);
    }
}

/* ===== FORZA DESIGN CHIARO GLOBALE ===== */
/* Assicuriamo che il design rimanga chiaro su tutte le pagine */
.scadenzario-container,
.scadenzario-admin-container,
[class*="scadenzario"] {
    background: #ffffff !important;
    color: #1e293b !important;
}

/* Focus visible per accessibilità */
.scadenzario-container .btn:focus,
.scadenzario-container input:focus,
.scadenzario-container select:focus,
.scadenzario-container textarea:focus,
.scadenzario-admin-container .btn:focus,
.scadenzario-admin-container input:focus,
.scadenzario-admin-container select:focus,
.scadenzario-admin-container textarea:focus,
[class*="scadenzario"] .btn:focus,
[class*="scadenzario"] input:focus,
[class*="scadenzario"] select:focus,
[class*="scadenzario"] textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
} 