/* ===============================================
   VREYA - CSS I MIEI CORSI
   Dashboard cliente per visualizzazione corsi
   =============================================== */

/* TAB NAVIGATION */
.tabs-navigation {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--color-border);
    padding-bottom: 0;
}

.tab-btn {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    bottom: -2px;
}

.tab-btn:hover {
    color: var(--color-primary);
    background: rgba(105, 109, 216, 0.05);
}

.tab-btn.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* TAB CONTENT */
.tabs-content {
    min-height: 400px;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-pane.active {
    display: block;
}

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

/* CORSI LIST */
.corsi-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.corso-card {
    background: white;
    border: 2px solid var(--color-border);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.corso-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
    border-color: var(--color-primary);
}

.corso-header {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.corso-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.corso-icon svg {
    color: white;
}

.corso-info {
    flex: 1;
}

.corso-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 4px 0;
}

.corso-professionista {
    font-size: 14px;
    color: var(--color-secondary);
    margin: 0;
}

.corso-progress {
    margin: 16px 0;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-secondary);
    margin-bottom: 8px;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.corso-stats {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 16px;
}

.corso-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.corso-stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text);
}

.corso-stat-label {
    font-size: 12px;
    color: var(--color-secondary);
    text-transform: uppercase;
}

.corso-footer {
    margin-top: auto;
    display: flex;
    gap: 8px;
}

.btn-corso {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-corso:hover {
    background: #f9fafb;
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-corso-primary {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.btn-corso-primary:hover {
    background: #52a373;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(82, 163, 115, 0.3);
}

/* MODAL DETTAGLI CORSO */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

.modal-large {
    max-width: 800px;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text);
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--color-secondary);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f3f4f6;
    color: var(--color-text);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

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

/* DETTAGLI SECTION */
.dettagli-section {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--color-border);
}

.dettagli-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.dettagli-section h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 16px 0;
}

.dettagli-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.dettaglio-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dettaglio-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-secondary);
    text-transform: uppercase;
}

.dettaglio-value {
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text);
}

/* CALENDARIO LEZIONI */
.calendario-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lezione-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f9fafb;
    border: 1px solid var(--color-border);
    border-radius: 8px;
}

.lezione-data {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: white;
    border-radius: 6px;
    min-width: 56px;
}

.lezione-giorno {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1;
}

.lezione-mese {
    font-size: 12px;
    color: var(--color-secondary);
    text-transform: uppercase;
}

.lezione-info {
    flex: 1;
}

.lezione-ora {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
}

.lezione-titolo {
    font-size: 13px;
    color: var(--color-secondary);
    margin-top: 2px;
}

/* MATERIALI */
.materiali-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.materiale-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f9fafb;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.materiale-item:hover {
    background: #f3f4f6;
}

.materiale-item.locked {
    opacity: 0.6;
    pointer-events: none;
}

.materiale-icon {
    flex-shrink: 0;
    color: var(--color-primary);
}

.materiale-info {
    flex: 1;
}

.materiale-nome {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
}

.materiale-status {
    font-size: 12px;
    color: var(--color-secondary);
    margin-top: 2px;
}

.btn-download {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-download:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

/* BOTTONI */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background: #52a373;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(82, 163, 115, 0.3);
}

.dashboard-content .btn-secondary,
.content-card .btn-secondary,
.modal .btn-secondary {
    background: white;
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.dashboard-content .btn-secondary:hover,
.content-card .btn-secondary:hover,
.modal .btn-secondary:hover {
    background: #f9fafb;
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* EMPTY STATE */
.empty-state {
    padding: 60px 20px;
    text-align: center;
    color: var(--color-secondary);
}

.empty-state svg {
    opacity: 0.3;
    margin-bottom: 16px;
}

.empty-state p {
    margin: 8px 0;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .corsi-list {
        grid-template-columns: 1fr;
    }

    .dettagli-grid {
        grid-template-columns: 1fr;
    }

    .corso-stats {
        flex-wrap: wrap;
    }

    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
}
