/* Coach Workout Manager - Frontend Styles */

.cwm-frontend-container,
.cwm-athlete-view {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.cwm-frontend-container h2,
.cwm-athlete-view h2 {
    margin-top: 0;
    color: #333;
    font-size: 28px;
    margin-bottom: 30px;
}

/* Tabs */
.cwm-frontend-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
}

.cwm-frontend-tab {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    transition: all 0.3s;
}

.cwm-frontend-tab:hover {
    color: #333;
    border-bottom-color: #ddd;
}

.cwm-frontend-tab.active {
    color: #2271b1;
    border-bottom-color: #2271b1;
}

.cwm-frontend-pane {
    display: none;
}

.cwm-frontend-pane.active {
    display: block;
}

/* Athlete Selector */
.cwm-athlete-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    align-items: center;
}

.cwm-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.cwm-input:focus {
    outline: none;
    border-color: #2271b1;
}

.cwm-button {
    padding: 12px 24px;
    background: #2271b1;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.cwm-button:hover {
    background: #135e96;
}

/* Workout Cards */
.cwm-workout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.cwm-workout-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s;
}

.cwm-workout-card:hover {
    border-color: #2271b1;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

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

.cwm-workout-date {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.cwm-workout-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0 0 10px 0;
}

.cwm-workout-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.cwm-workout-badge.running {
    background: #e3f2fd;
    color: #1976d2;
}

.cwm-workout-badge.strength {
    background: #f3e5f5;
    color: #7b1fa2;
}

.cwm-workout-badge.recovery {
    background: #e8f5e9;
    color: #388e3c;
}

.cwm-workout-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 12px;
}

.cwm-workout-details {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
}

.cwm-workout-notes {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 12px;
    margin-top: 12px;
    border-radius: 4px;
}

.cwm-workout-notes strong {
    display: block;
    margin-bottom: 5px;
    color: #856404;
}

.cwm-workout-notes p {
    margin: 0;
    color: #856404;
    font-size: 14px;
}

/* Status Badge */
.cwm-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.cwm-status-badge.assigned {
    background: #e3f2fd;
    color: #1976d2;
}

.cwm-status-badge.completed {
    background: #e8f5e9;
    color: #388e3c;
}

/* Empty State */
.cwm-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.cwm-empty-state-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.cwm-empty-state p {
    font-size: 18px;
    color: #666;
}

/* Loading */
.cwm-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px;
}

.cwm-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2271b1;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* Error Message */
.cwm-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 15px;
    border-radius: 6px;
    margin: 20px 0;
}

/* Success Message */
.cwm-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px;
    border-radius: 6px;
    margin: 20px 0;
}

/* List View */
.cwm-list-view {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cwm-list-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s;
}

.cwm-list-item:hover {
    border-color: #2271b1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .cwm-frontend-container,
    .cwm-athlete-view {
        padding: 15px;
        margin: 20px 10px;
    }
    
    .cwm-workout-grid {
        grid-template-columns: 1fr;
    }
    
    .cwm-athlete-selector {
        flex-direction: column;
    }
    
    .cwm-input {
        width: 100%;
    }
    
    .cwm-button {
        width: 100%;
    }
    
    .cwm-frontend-tabs {
        flex-wrap: wrap;
    }
}