/**
 * Programmazione Personalizzata - Stili Frontend
 * Version: 1.2.0
 */

.programma-container {
    margin: 30px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.programma-loading {
    text-align: center;
    padding: 30px;
    font-size: 16px;
    color: #666;
    background: #f9f9f9;
    border-radius: 4px;
}

.programma-error {
    padding: 15px;
    margin: 15px 0;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
}

/* Stili per la pagina dei risultati */
.programma-risultati-page {
    margin: 30px 0;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.programma-risultati-page h1 {
    font-size: 28px;
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 10px;
}

.programma-risultati-page h2 {
    font-size: 24px;
    margin: 30px 0 15px;
    color: #2196F3;
    text-align: center;
}

/* Riepilogo delle scelte */
.programma-riepilogo {
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    padding: 25px;
    margin: 20px 0 40px;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.programma-riepilogo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.programma-riepilogo-col {
    padding: 15px;
    background: white;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.programma-riepilogo-col h3 {
    margin-top: 0;
    font-size: 18px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    color: #333;
}

.programma-riepilogo-col ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.programma-riepilogo-col li {
    margin-bottom: 10px;
    line-height: 1.4;
}

.programma-note {
    margin-top: 20px;
    padding: 15px;
    background: #e8f5e9;
    border-radius: 5px;
    border-left: 4px solid #4CAF50;
}

/* Calendario container */
.programma-calendario-container {
    margin: 40px 0;
}

/* Toggle per vista settimanale/mensile */
.programma-vista-toggle {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.programma-toggle-button {
    background: #e9e9e9;
    border: 2px solid #c0c0c0;
    padding: 10px 20px;
    margin: 0 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.programma-toggle-button.active {
    background: #2196F3;
    color: white;
    border-color: #1976D2;
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.3);
    transform: translateY(-1px);
}

.programma-toggle-button:hover:not(.active) {
    background: #d4d4d4;
    border-color: #a0a0a0;
    color: #000;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Calendario - Vista settimanale */
.programma-calendario {
    margin: 30px 0;
}

.programma-settimana {
    margin-bottom: 30px;
    border: 1px solid #e5e5e5;
    border-radius: 5px;
    overflow: hidden;
}

.programma-settimana h3 {
    padding: 12px 15px;
    margin: 0;
    background: #f5f5f5;
    border-bottom: 2px solid #ddd;
    font-size: 18px;
    color: #333;
}

.programma-settimana h3 span {
    font-size: 14px;
    font-weight: normal;
    color: #666;
    margin-left: 10px;
}

.programma-giorni {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    padding: 15px;
    background: #fafafa;
}

.programma-giorno {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 15px;
    background: #fff;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.programma-giorno.has-workout {
    border-left: 4px solid #4CAF50;
}

.programma-giorno.no-workout {
    border-left: 4px solid #bbb;
    background: #f9f9f9;
}

.programma-giorno:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.programma-data {
    font-weight: bold;
    font-size: 14px;
    text-transform: capitalize;
    color: #666;
    margin-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 8px;
}

/* Stili per giorni passati */
.programma-data span[style*="opacity: 0.6"] {
    opacity: 0.6 !important;
    text-decoration: line-through !important;
}

.programma-data small {
    display: block;
    color: #999 !important;
    font-style: italic !important;
    font-size: 12px;
    margin-top: 4px;
}

/* Link disabilitati per allenamenti passati */
.programma-link-disabled {
    display: inline-block;
    padding: 5px 10px;
    background: #ccc !important;
    color: #666 !important;
    border-radius: 3px;
    text-decoration: none;
    font-size: 13px;
    cursor: not-allowed !important;
    margin-top: 10px;
}

.programma-allenamento {
    margin: 10px 0;
}

.programma-allenamento h4 {
    margin: 0 0 10px 0;
    color: #4CAF50;
    font-size: 16px;
}

.programma-lesson-title {
    margin: 5px 0 10px;
    font-size: 14px;
    color: #555;
}

.programma-riposo {
    font-style: italic;
    color: #888;
    margin: 10px 0;
}

/* Vista mensile */
.programma-giorni-mese {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
    padding: 15px;
    background: #fafafa;
}

.programma-giorno-mese {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #fff;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.programma-giorno-mese.has-workout {
    border-top: 3px solid #4CAF50;
}

.programma-giorno-mese.no-workout {
    border-top: 3px solid #bbb;
    background: #f9f9f9;
}

.programma-data-mese {
    font-weight: bold;
    font-size: 16px;
    text-align: center;
    background: #f5f5f5;
    padding: 5px;
    border-bottom: 1px solid #e0e0e0;
}

.programma-data-mese .giorno-settimana {
    display: block;
    font-size: 12px;
    font-weight: normal;
    color: #777;
}

.programma-contenuto-mese {
    padding: 8px;
    text-align: center;
}

.programma-tipo {
    font-weight: bold;
    color: #4CAF50;
    margin: 0 0 5px;
    font-size: 13px;
}

.programma-riposo-small {
    font-style: italic;
    color: #888;
    margin: 5px 0;
    font-size: 12px;
}

.programma-link-small {
    /*display: inline-block;*/
    display: none;
    background: #4CAF50;
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    text-decoration: none;
    font-size: 12px;
    transition: background 0.2s;
}

.programma-link-small:hover {
    background: #388E3C;
    text-decoration: none;
    color: white;
}

/* Lezioni consigliate */
.programma-lezioni-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.programma-lezione-card {
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    background: white;
}

.programma-lezione-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.programma-lezione-img {
    height: 150px;
    overflow: hidden;
}

.programma-lezione-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.programma-lezione-content {
    padding: 15px;
}

.programma-lezione-content h3 {
    margin: 0 0 10px;
    font-size: 16px;
    color: #333;
}

.programma-lezione-content p {
    color: #666;
    font-size: 14px;
    margin: 10px 0;
}

.programma-lezione-link {
    display: inline-block;
    margin-top: 10px;
    background: #4CAF50;
    color: white;
    padding: 5px 12px;
    border-radius: 3px;
    text-decoration: none;
    font-size: 13px;
    transition: background 0.2s;
}

.programma-lezione-link:hover {
    background: #388E3C;
    text-decoration: none;
    color: white;
}

.programma-link:hover {
    background: #388E3C;
    text-decoration: none;
    color: white;
}

.programma-coaching {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed #e0e0e0;
}

.programma-badge {
    display: inline-block;
    background: #2196F3;
    color: white;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 12px;
    margin-right: 5px;
}

.programma-video {
    display: inline-block;
    color: #2196F3;
    text-decoration: none;
    font-size: 13px;
}

.programma-video:hover {
    text-decoration: underline;
}

/* Pulsanti azione */
.programma-actions {
    margin: 30px 0;
    text-align: center;
}

/* Pulsanti azioni pagina risultati */
.programma-actions-page {
    margin: 30px 0;
    text-align: center;
}

.programma-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    justify-items: center;
    max-width: 800px;
    margin: 0 auto;
}

/* Pulsanti per Stampa, Rigenera e Corso */
.programma-print,
.programma-regenerate,
.programma-course-button,
.programma-generate-course {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.programma-print:hover,
.programma-regenerate:hover,
.programma-course-button:hover,
.programma-generate-course:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Pulsante Accedi al Corso */
.programma-course-button {
    background: linear-gradient(135deg, #6B46C1, #8B5CF6);
    color: white;
    border: 2px solid #6B46C1;
}

.programma-course-button:hover {
    background: linear-gradient(135deg, #553C9A, #7C3AED);
    color: white;
    text-decoration: none;
    border-color: #553C9A;
}

/* Pulsante Genera Corso */
.programma-generate-course {
    background: linear-gradient(135deg, #10B981, #34D399);
    color: white;
    border: 2px solid #10B981;
}

.programma-generate-course:hover {
    background: linear-gradient(135deg, #059669, #10B981);
    border-color: #059669;
}

.programma-generate-course:disabled {
    background: #9CA3AF;
    border-color: #9CA3AF;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ✅ v2.14.53: Stile per pulsante "Modifica programma" disabilitato */
.programma-regenerate.programma-disabled {
    background: #9CA3AF !important;
    border-color: #9CA3AF !important;
    color: #6B7280 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
    opacity: 0.6;
}

.programma-regenerate.programma-disabled:hover {
    background: #9CA3AF !important;
    border-color: #9CA3AF !important;
    color: #6B7280 !important;
    transform: none !important;
    box-shadow: none !important;
}

/* ✅ v2.14.54: Stili per la sezione di notifica */
.programma-modification-notice {
    max-width: 800px;
    margin: 0 auto;
}

.programma-modification-notice p {
    border-radius: 6px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.5;
}

/* Responsive per pulsanti su mobile */
@media (max-width: 768px) {
    .programma-actions-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        max-width: 100%;
    }
    
    .programma-print,
    .programma-regenerate,
    .programma-course-button,
    .programma-generate-course {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .programma-modification-notice {
        max-width: 100%;
        margin: 0;
    }
}

.programma-share {
    background: #2196F3;
}

.programma-share:hover {
    background: #0b7dda;
}

/* Media Queries */
@media print {

    /* Nascondi elementi di navigazione */
    .programma-actions,
    .programma-vista-toggle,
    .programma-user-dashboard .programma-user-filters,
    .programma-card-actions,
    .programma-modal {
        display: none !important;
    }

    /* Rendi i link visibili e cliccabili nella stampa */
    .programma-link,
    .programma-video,
    .programma-lezione-link {
        color: #0066cc !important;
        text-decoration: underline !important;
        font-weight: bold !important;
        display: inline-block !important;
    }

    /* Mostra gli URL dopo i link */
    .programma-link:after,
    .programma-video:after,
    .programma-lezione-link:after {
        content: " (" attr(href) ")";
        font-size: 10px;
        color: #666;
        font-weight: normal;
        word-break: break-all;
    }

    /* Assicurati che i giorni siano stampabili */
    .programma-giorno,
    .programma-settimana {
        page-break-inside: avoid;
        border: 1px solid #ddd !important;
        margin-bottom: 10px !important;
    }

    .programma-calendario,
    .programma-risultati-page {
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .programma-view-mese {
        display: none !important;
    }

    .programma-view-settimana {
        display: block !important;
    }

    .programma-giorno {
        page-break-inside: avoid;
    }

    .programma-link,
    .programma-video,
    .programma-lezione-link,
    .programma-link-small {
        text-decoration: none !important;
        color: #000 !important;
    }
}

@media (max-width: 768px) {
    .programma-giorni {
        grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
    }

    .programma-giorni-mese {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    }

    .programma-lezioni-grid {
        grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
    }

    .programma-riepilogo-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .programma-vista-toggle {
        flex-direction: column;
        align-items: center;
    }

    .programma-toggle-button {
        margin-bottom: 10px;
        width: 100%;
        max-width: 200px;
    }
}

/* Stili per la programmazione personalizzata */

.programma-container {
    max-width: 1200px;
    margin: 0 auto;
    font-family: Arial, sans-serif;
}

.programma-loading {
    text-align: center;
    padding: 30px;
    font-size: 18px;
}

.programma-error {
    color: #d32f2f;
    padding: 15px;
    background-color: #ffebee;
    border-radius: 4px;
    margin-bottom: 20px;
}

.programma-alert {
    color: #e65100;
    padding: 10px;
    background-color: #fff3e0;
    border-radius: 4px;
    margin-bottom: 15px;
    display: inline-block;
    font-weight: bold;
}

.programma-riepilogo {
    background-color: #f5f5f5;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 30px;
}

.programma-riepilogo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.programma-riepilogo-col h3 {
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.programma-note {
    margin-top: 20px;
    padding: 15px;
    background-color: #e8f5e9;
    border-radius: 4px;
}

.programma-calendario-container {
    margin-bottom: 40px;
}

.programma-vista-toggle {
    display: flex;
    margin-bottom: 20px;
}

.programma-toggle-button {
    padding: 10px 15px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    cursor: pointer;
    margin-right: 10px;
}

.programma-toggle-button.active {
    background-color: #2196f3;
    color: white;
}

.programma-settimana {
    margin-bottom: 30px;
}

.programma-giorni {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.programma-giorno {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    background-color: #fff;
}

.programma-giorno.has-workout {
    border-left: 4px solid #4caf50;
}

.programma-giorno.no-workout {
    border-left: 4px solid #9e9e9e;
}

.programma-data {
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.programma-allenamento h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #2196f3;
}

.programma-link {
    /*display: inline-block;*/
    display: none;
    padding: 5px 10px;
    background-color: #2196f3;
    color: white;
    border-radius: 3px;
    text-decoration: none;
    margin-top: 10px;
    font-size: 13px;
}

.programma-link:hover {
    background-color: #0d8aee;
}

.programma-riposo {
    color: #757575;
    font-style: italic;
}

.programma-coaching {
    margin-top: 15px;
}

.programma-badge {
    display: inline-block;
    padding: 3px 8px;
    background-color: #ff9800;
    color: white;
    border-radius: 10px;
    font-size: 12px;
    margin-right: 10px;
}

.programma-video {
    color: #ff5722;
    text-decoration: underline;
}

.programma-actions {
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.programma-actions button {
    padding: 10px 15px;
    background-color: #2196f3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.programma-actions button:hover {
    background-color: #0d8aee;
}

.programma-print {
    background-color: #4caf50 !important;
}

.programma-regenerate {
    background-color: #ff9800 !important;
}

.programma-share {
    background-color: #9c27b0 !important;
}

/* Stili per la vista mensile */
.programma-giorni-mese {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.programma-giorno-mese {
    border: 1px solid #ddd;
    padding: 5px;
    min-height: 80px;
    position: relative;
}

.programma-data-mese {
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 5px;
}

.programma-giorno-mese.has-workout {
    background-color: #e8f5e9;
}

.programma-giorno-mese.no-workout {
    background-color: #f5f5f5;
}

.giorno-settimana {
    display: block;
    font-size: 12px;
    color: #757575;
}

.programma-tipo {
    font-size: 12px;
    margin: 0;
}


.programma-riposo-small {
    font-size: 11px;
    color: #757575;
    font-style: italic;
    margin: 0;
}

/* Stili per la sezione lezioni consigliate */
.programma-lezioni-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.programma-lezione-card {
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}

.programma-lezione-img img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.programma-lezione-content {
    padding: 15px;
}

.programma-lezione-content h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.programma-difficulty {
    display: inline-block;
    padding: 3px 8px;
    background-color: #2196f3;
    color: white;
    border-radius: 10px;
    font-size: 12px;
    margin-bottom: 10px;
}

.programma-lezione-link {
    display: inline-block;
    padding: 5px 10px;
    background-color: #2196f3;
    color: white;
    border-radius: 3px;
    text-decoration: none;
    margin-top: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .programma-riepilogo-grid {
        grid-template-columns: 1fr;
    }

    .programma-giorni {
        grid-template-columns: 1fr;
    }

    .programma-giorni-mese {
        grid-template-columns: repeat(2, 1fr);
    }

    .programma-lezioni-grid {
        grid-template-columns: 1fr;
    }
}

/* Stampa */
@media print {

    .programma-actions,
    .programma-vista-toggle,
    .programma-link,
    .programma-video,
    .programma-lezione-link {
        display: none !important;
    }

    .programma-giorno,
    .programma-giorno-mese {
        break-inside: avoid;
    }
}

/* User Dashboard Styles */
.programma-user-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.programma-user-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.programma-user-header h2 {
    margin: 0;
    color: #333;
}

.programma-user-stats {
    font-size: 14px;
    color: #666;
}

.programs-count {
    background: #f0f0f0;
    padding: 8px 12px;
    border-radius: 4px;
    font-weight: 500;
}

/* Filtri */
.programma-user-filters {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.filter-row {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.programma-filter {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    min-width: 150px;
}

.programma-filter:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

/* Cards Programmi */
.programma-user-programs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.programma-card {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.programma-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.programma-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.program-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: #333;
    flex: 1;
    margin-right: 10px;
}

.program-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}



/* Statistiche Programma */
.program-stats {
    margin-bottom: 15px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.stat-label {
    color: #666;
    font-weight: 500;
}

.stat-value {
    color: #333;
    font-weight: 600;
}

.program-objective,
.program-notes {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.4;
}

/* Azioni Card */
.programma-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.programma-card-actions .button {
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    transition: all 0.2s ease;
}

.programma-card-actions .button:hover {
    background: #f0f0f0;
}

.programma-card-actions .button-primary {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.programma-card-actions .button-primary:hover {
    background: #005a87;
    border-color: #005a87;
}

.programma-card-actions .button-link-delete {
    color: #d63638;
    border-color: #d63638;
}

.programma-card-actions .button-link-delete:hover {
    background: #d63638;
    color: #fff;
}

/* ✅ NUOVO: Stile per il pulsante del corso LearnDash */
.programma-card-actions .button-course {
    background-color: #01c9c4;
    color: white;
    border: 1px solid #01c9c4;
    margin-right: 10px;
	width: 100%;
	text-align: center;
}

.programma-card-actions .button-course:hover {
    background-color: #218838;
    border-color: #1e7e34;
    color: white;
    text-decoration: none;
}



/* No Results */
.programma-no-results {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 2px dashed #ddd;
}

.programma-no-results h3 {
    color: #666;
    margin-bottom: 10px;
}

.programma-no-results p {
    color: #999;
    margin-bottom: 20px;
}

/* Modal */
.programma-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.programma-modal-content {
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    margin: 10% auto;
}

.programma-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
}

.programma-modal-header h3 {
    margin: 0;
    color: #333;
}

.programma-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.programma-modal-close:hover {
    color: #333;
}

.programma-modal-body {
    padding: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.programma-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px 25px;
    border-top: 1px solid #eee;
    background: #f9f9f9;
}

/* Notifiche */
.programma-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 4px;
    color: #fff;
    font-weight: 500;
    z-index: 10001;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease;
}

.programma-notification.success {
    background: #28a745;
}

.programma-notification.error {
    background: #dc3545;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Error State */
.programma-user-error {
    background: #f8d7da;
    color: #721c24;
    padding: 20px;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
    text-align: center;
}

.programma-user-error a {
    color: #721c24;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .programma-user-dashboard {
        padding: 15px;
    }

    .programma-user-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .programma-filter {
        min-width: auto;
        width: 100%;
    }

    .programma-user-programs {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .programma-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .program-title {
        margin-right: 0;
    }

    .programma-card-actions {
        justify-content: center;
    }

    .programma-modal-content {
        width: 95%;
        margin: 20px auto;
    }
}

/* Stili per il loading overlay della rigenerazione */
.programma-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    color: white;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.programma-spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.programma-loading-overlay p {
    font-size: 18px;
    text-align: center;
    margin: 0;
    font-weight: 500;
}

/* Stili per il modal di modifica del programma */
.programma-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.programma-modal-container {
    background: white;
    border-radius: 8px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.programma-modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.programma-modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 20px;
    font-weight: 600;
}

.programma-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.programma-modal-close:hover {
    background: #e9ecef;
    color: #333;
}

.programma-modal-body {
    padding: 25px;
    max-height: 60vh;
    overflow-y: auto;
}

.programma-modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

/* Form groups nel modal */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.form-group-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

/* Checkbox groups */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    max-height: none;
}

.checkbox-group.checkbox-scrollable {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    padding: 10px;
    border-radius: 4px;
    background: #fafafa;
}

.checkbox-label {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    margin: 0;
}

.checkbox-label:hover {
    background: #f0f8ff;
    border-color: #4CAF50;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 8px;
    margin-left: 0;
}

.checkbox-label input[type="checkbox"]:checked+* {
    font-weight: 500;
}

/* Bottoni del modal */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
    text-align: center;
    min-width: 100px;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    color: white;
}

.btn-primary {
    background: #4CAF50;
    color: white;
}

.btn-primary:hover {
    background: #388E3C;
    color: white;
}

/* Responsive per il modal */
@media (max-width: 768px) {
    .programma-modal-backdrop {
        padding: 10px;
    }

    .programma-modal-container {
        max-width: 100%;
        max-height: 95vh;
    }

    .programma-modal-header,
    .programma-modal-body,
    .programma-modal-footer {
        padding: 15px;
    }

    .form-group-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .checkbox-group {
        grid-template-columns: 1fr;
    }

    .programma-modal-footer {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* ✅ POPUP VALIDATORS STYLES v2.0.0 - Stili per validazione popup */

/* Container per i messaggi di validazione */
.validator-messages {
    margin-top: 8px;
    min-height: 0;
    transition: all 0.3s ease;
}

/* Stili base per i messaggi */
.validator-message {
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 5px;
    border-left: 3px solid;
    background: #f8f9fa;
    animation: slideInMessage 0.3s ease-out;
}

/* Tipi di messaggi */
.validator-error {
    background-color: #ffebee;
    border-left-color: #f44336;
    color: #c62828;
}

.validator-info {
    background-color: #e3f2fd;
    border-left-color: #2196f3;
    color: #1565c0;
}

.validator-success {
    background-color: #e8f5e8;
    border-left-color: #4caf50;
    color: #2e7d32;
}

/* Animazione per i messaggi */
@keyframes slideInMessage {
    from {
        opacity: 0;
        transform: translateY(-10px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 100px;
    }
}

/* Opzioni disabilitate */
.disabled-option {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
    background-color: #f5f5f5 !important;
    color: #999 !important;
}

.disabled-option:hover {
    background-color: #f5f5f5 !important;
    border-color: #e0e0e0 !important;
}

/* Opzioni disabilitate nei select */
select option:disabled {
    color: #999;
    background-color: #f5f5f5;
}

/* Checkbox disabilitati */
input[type="checkbox"]:disabled + * {
    color: #999 !important;
}

/* Labels disabilitate */
.checkbox-label.disabled-option input[type="checkbox"] {
    opacity: 0.4;
}

/* Stile specifico per messaggi nei checkbox groups */
.checkbox-group + .validator-messages {
    margin-top: 12px;
}

/* Evidenziazione campi con errori */
.form-group.has-error .form-control {
    border-color: #f44336;
    box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.1);
}

.form-group.has-error label {
    color: #f44336;
}

/* Evidenziazione campi con successo */
.form-group.has-success .form-control {
    border-color: #4caf50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
}

/* Responsive per messaggi di validazione */
@media (max-width: 768px) {
    .validator-message {
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .checkbox-group + .validator-messages {
        margin-top: 8px;
    }
}

/* Notifica nuove lezioni disponibili */
.programma-notifica-nuove-lezioni {
    margin: 20px 0;
    padding: 0;
}

.programma-alert {
    padding: 15px 20px;
    margin: 15px 0;
    border-radius: 8px;
    border-left: 4px solid;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.programma-alert-info {
    background-color: #e3f2fd;
    border-left-color: #2196f3;
    color: #0d47a1;
}

.programma-alert strong {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 600;
}

.programma-alert p {
    margin: 8px 0 12px 0;
    line-height: 1.5;
}

.programma-btn-rigenera-notifica {
    background-color: #2196f3;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    margin-top: 8px;
}

.programma-btn-rigenera-notifica:hover {
    background-color: #1976d2;
    transform: translateY(-1px);
}

.programma-btn-rigenera-notifica:active {
    transform: translateY(0);
}

/* Stili per sabati speciali con lezioni multiple */
.programma-saturday-special {
    margin-top: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #6B46C1;
}

.programma-lesson-cis-ppa,
.programma-lesson-normal {
    margin-bottom: 10px;
    padding: 8px;
    background: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.programma-lesson-cis-ppa:last-child,
.programma-lesson-normal:last-child {
    margin-bottom: 0;
}

.lesson-type {
    display: inline-block;
    font-weight: 600;
    font-size: 12px;
    margin-bottom: 5px;
    color: #333;
}

.programma-link-cis-ppa {
    background: linear-gradient(135deg, #6B46C1, #8B5CF6) !important;
    border: 1px solid #6B46C1;
}

.programma-link-cis-ppa:hover {
    background: linear-gradient(135deg, #553C9A, #7C3AED) !important;
    border-color: #553C9A;
}

.programma-link-normal {
    background: #4CAF50 !important;
    border: 1px solid #4CAF50;
}

.programma-link-normal:hover {
    background: #388E3C !important;
    border-color: #388E3C;
}

/* Stili per vista mensile sabati speciali */
.programma-saturday-special-month {
    font-size: 11px !important;
    line-height: 1.3 !important;
    margin-bottom: 8px !important;
}

.programma-saturday-links-month {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.programma-link-cis {
    background: linear-gradient(135deg, #6B46C1, #8B5CF6) !important;
    color: white !important;
    font-size: 10px !important;
    padding: 2px 6px !important;
}

.programma-link-cis:hover {
    background: linear-gradient(135deg, #553C9A, #7C3AED) !important;
    color: white !important;
}

.programma-link-workout {
    background: #4CAF50 !important;
    color: white !important;
    font-size: 10px !important;
    padding: 2px 6px !important;
}

.programma-link-workout:hover {
    background: #388E3C !important;
    color: white !important;
}

@media (max-width: 768px) {
    .programma-saturday-special {
        padding: 8px;
    }

    .programma-lesson-cis-ppa,
    .programma-lesson-normal {
        padding: 6px;
        margin-bottom: 8px;
    }

    .lesson-type {
        font-size: 11px;
    }

    .programma-saturday-links-month {
        flex-direction: column;
        gap: 2px;
    }

    .programma-link-cis,
    .programma-link-workout {
        font-size: 9px !important;
        padding: 1px 4px !important;
    }
}

.programma-link-small.programma-link-workout:hover {
    background: #059669;
}

/* Stili per giorni con lezioni aggiuntive configurabili */
.programma-additional-lesson-day {
    margin-top: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #6B46C1;
}

.programma-lesson-additional,
.programma-lesson-normal {
    margin-bottom: 10px;
    padding: 8px;
    background: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.programma-lesson-additional:last-child,
.programma-lesson-normal:last-child {
    margin-bottom: 0;
}

.lesson-type {
    display: inline-block;
    font-weight: 600;
    font-size: 12px;
    margin-bottom: 5px;
    color: #333;
}

.programma-link-additional {
    background: linear-gradient(135deg, #6B46C1, #8B5CF6) !important;
    border: 1px solid #6B46C1 !important;
    color: white !important;
}

.programma-link-additional:hover {
    background: linear-gradient(135deg, #553C9A, #7C3AED) !important;
    border-color: #553C9A !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(107, 70, 193, 0.3);
}

.programma-link-normal {
    background: linear-gradient(135deg, #10B981, #34D399) !important;
    border: 1px solid #10B981 !important;
    color: white !important;
}

.programma-link-normal:hover {
    background: linear-gradient(135deg, #059669, #10B981) !important;
    border-color: #059669 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

/* Stili per vista mensile delle lezioni aggiuntive */
.programma-additional-lesson-day-month {
    background: #f8f9fa;
    border-left: 3px solid #6B46C1;
    padding: 5px;
    margin: 5px 0;
    border-radius: 3px;
}

.programma-additional-links-month {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 5px;
}

.programma-link-small.programma-link-additional {
    background: #6B46C1;
    color: white;
    font-size: 11px;
    padding: 3px 8px;
}

.programma-link-small.programma-link-additional:hover {
    background: #553C9A;
}

.programma-link-small.programma-link-normal,
.programma-link-small.programma-link-workout {
    background: #10B981;
    color: white;
    font-size: 11px;
    padding: 3px 8px;
}

.programma-link-small.programma-link-normal:hover,
.programma-link-small.programma-link-workout:hover {
    background: #059669;
}

/* === PAGINAZIONE DASHBOARD UTENTE === */
.programma-pagination {
    margin-top: 30px;
    padding: 20px 0;
    border-top: 1px solid #e1e1e1;
}

.programma-pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pagination-link {
    display: inline-block;
    padding: 8px 12px;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #555;
    background-color: #fff;
    transition: all 0.3s ease;
    font-size: 14px;
    line-height: 1.4;
}

.pagination-link:hover {
    background-color: #f8f9fa;
    border-color: #007cba;
    color: #007cba;
    text-decoration: none;
}

.pagination-link.current {
    background-color: #007cba;
    border-color: #007cba;
    color: #fff;
    font-weight: bold;
}

.pagination-link.disabled {
    color: #ccc;
    background-color: #f9f9f9;
    border-color: #e1e1e1;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 5px;
}

.pagination-ellipsis {
    padding: 8px 4px;
    color: #999;
    font-size: 14px;
}

.pagination-prev,
.pagination-next {
    font-weight: 500;
}

/* Stili specifici per numeri di pagina */
.pagination-number {
    min-width: 40px;
    text-align: center;
}

/* Responsive design per paginazione */
@media (max-width: 768px) {
    .programma-pagination-controls {
        gap: 5px;
    }

    .pagination-link {
        padding: 6px 8px;
        font-size: 13px;
        min-width: 35px;
    }

    .pagination-prev,
    .pagination-next {
        font-size: 12px;
        padding: 6px 10px;
    }

    .pagination-ellipsis {
        padding: 6px 2px;
        font-size: 13px;
    }
}

/* Miglioramenti header dashboard con info paginazione */
.programma-user-stats {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.pagination-info {
    font-size: 14px;
    color: #666;
    background-color: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #e1e1e1;
}
