/**
 * Training Management Styles
 * Styles for training drills, diagrams, videos, templates, and progress tracking
 */

/* === General Styles === */
.training-container {
    margin-bottom: 2rem;
}

.training-header {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 1rem;
}

.training-section {
    margin-bottom: 2rem;
}

.training-section-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

/* === Drill List and Cards === */
.drill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.drill-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.drill-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.drill-card-header {
    background-color: #f5f5f5;
    padding: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.drill-card-title {
    margin: 0;
    font-size: 1.1rem;
}

.drill-card-body {
    padding: 1rem;
}

.drill-card-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.drill-card-actions {
    padding: 1rem;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
}

/* === Drill Details === */
.drill-detail-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.drill-main-content {
    padding-right: 1rem;
}

.drill-sidebar {
    border-left: 1px solid #e0e0e0;
    padding-left: 1rem;
}

.drill-description {
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.drill-meta-info {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.drill-meta-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed #e0e0e0;
}

.drill-meta-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.drill-meta-label {
    font-weight: bold;
    color: #555;
}

.drill-instructions {
    margin-bottom: 1.5rem;
}

.drill-instructions h3,
.drill-variations h3,
.drill-coaching-points h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.drill-coaching-points {
    background-color: #f9f9f9;
    border-left: 4px solid #3498db;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

/* === Drill Tags === */
.drill-tags {
    margin-bottom: 1rem;
}

.drill-tag {
    display: inline-block;
    background-color: #e0e0e0;
    border-radius: 16px;
    padding: 0.25rem 0.75rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: #333;
    transition: background-color 0.2s;
}

.drill-tag:hover {
    background-color: #d0d0d0;
}

/* === Court Diagram Editor === */
.court-editor-container {
    display: flex;
    flex-direction: column;
    margin-bottom: 2rem;
}

.court-editor-toolbar {
    display: flex;
    margin-bottom: 1rem;
    background-color: #f5f5f5;
    padding: 0.5rem;
    border-radius: 4px;
}

.court-editor-tool {
    margin-right: 0.5rem;
    padding: 0.5rem 0.75rem;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
}

.court-editor-tool:hover {
    background-color: #f0f0f0;
}

.court-editor-tool.active {
    background-color: #3498db;
    color: white;
}

.court-editor-tool i {
    margin-right: 0.25rem;
}

.court-editor-canvas-container {
    position: relative;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.court-editor-canvas {
    width: 100%;
    max-width: 100%;
    background-color: #fff;
}

.court-editor-actions {
    display: flex;
    margin-top: 1rem;
    justify-content: space-between;
}

/* === Video Player === */
.video-container {
    margin-bottom: 1.5rem;
}

.video-js {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
}

.video-playlist {
    margin-top: 1rem;
}

.video-playlist-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    transition: background-color 0.2s;
}

.video-playlist-item:hover {
    background-color: #f5f5f5;
}

.video-playlist-item.active {
    background-color: #e8f4fc;
}

.video-playlist-thumbnail {
    width: 80px;
    height: 45px;
    object-fit: cover;
    margin-right: 0.75rem;
    border-radius: 4px;
}

.video-playlist-info {
    flex-grow: 1;
}

.video-playlist-title {
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.video-playlist-duration {
    font-size: 0.85rem;
    color: #666;
}

/* === Training Templates === */
.template-builder {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.template-builder-section {
    padding: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.template-builder-header {
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.template-builder-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.drill-list {
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.drill-item {
    padding: 1rem;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
}

.drill-info {
    flex-grow: 1;
}

.drill-info h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
}

.drill-info p {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    color: #666;
}

.drill-meta {
    font-size: 0.85rem;
    color: #888;
    display: flex;
    gap: 1rem;
}

.add-drill-btn, 
.remove-drill-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.add-drill-btn {
    background-color: #3498db;
    color: white;
}

.add-drill-btn:hover {
    background-color: #2980b9;
}

.remove-drill-btn {
    background-color: #e74c3c;
    color: white;
}

.remove-drill-btn:hover {
    background-color: #c0392b;
}

.selected-drills {
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.selected-drill-item {
    padding: 1rem;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: flex-start;
}

.drill-order {
    background-color: #3498db;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.drill-controls {
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group {
    margin-bottom: 0.5rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    color: #555;
}

.duration-input {
    width: 60px;
    padding: 0.25rem;
}

.notes-input {
    width: 100%;
    min-height: 60px;
    padding: 0.5rem;
}

.template-summary {
    background-color: #f9f9f9;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.template-total-duration {
    font-size: 1.1rem;
    font-weight: bold;
    color: #2c3e50;
}

/* === Progress Tracking === */
.progress-container {
    margin-bottom: 2rem;
}

.progress-chart-container {
    height: 400px;
    margin-bottom: 1.5rem;
}

.current-level {
    background-color: #f9f9f9;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.current-level h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.level-indicator {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.recorded-date {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.notes {
    font-style: italic;
    color: #555;
}

.level-1 { color: #e74c3c; } /* Red */
.level-2 { color: #f39c12; } /* Orange */
.level-3 { color: #2ecc71; } /* Green */
.level-4 { color: #3498db; } /* Blue */
.level-5 { color: #9b59b6; } /* Purple */

.level-fill.level-1 { background-color: #e74c3c; }
.level-fill.level-2 { background-color: #f39c12; }
.level-fill.level-3 { background-color: #2ecc71; }
.level-fill.level-4 { background-color: #3498db; }
.level-fill.level-5 { background-color: #9b59b6; }

.proficiency-visual {
    background-color: #f9f9f9;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.level-bar {
    height: 10px;
    background-color: #e0e0e0;
    border-radius: 5px;
    margin: 0.5rem 0;
    overflow: hidden;
}

.level-fill {
    height: 100%;
    border-radius: 5px;
}

.level-description {
    font-size: 0.9rem;
    color: #555;
}

.drill-stats-container {
    background-color: #f9f9f9;
    padding: 1rem;
    border-radius: 8px;
}

.drill-stats-container h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.stat-summary {
    display: flex;
    margin-bottom: 1rem;
    gap: 1.5rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: bold;
}

.level-distribution h4 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.level-stat {
    margin-bottom: 0.5rem;
}

.level-name {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

/* === Responsive Styles === */
@media (max-width: 768px) {
    .drill-detail-container {
        grid-template-columns: 1fr;
    }
    
    .drill-sidebar {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid #e0e0e0;
        padding-top: 1rem;
    }
    
    .template-builder {
        grid-template-columns: 1fr;
    }
}