/**
 * Liftosaur Workouts - Frontend Styles
 */

/* Single Workout Styles */
.workout-single {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.workout-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.workout-title {
    margin: 0 0 15px 0;
    font-size: 2em;
    color: #333;
}

.workout-meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    color: #666;
    font-size: 0.95em;
}

.workout-meta-info span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.workout-meta-info strong {
    color: #333;
}

.workout-thumbnail {
    margin-bottom: 25px;
}

.workout-thumbnail img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.workout-content {
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Workout Summary (in post content) */
.workout-summary {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.workout-summary .workout-header {
    border-bottom: 1px solid #ddd;
    margin-bottom: 15px;
    padding-bottom: 15px;
}

.workout-summary .workout-header p {
    margin: 5px 0;
}

/* Exercise Tables */
.workout-exercises-table,
.workout-exercises table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.workout-exercises-table thead,
.workout-exercises table thead {
    background: #4a90a4;
    color: #fff;
}

.workout-exercises-table th,
.workout-exercises-table td,
.workout-exercises table th,
.workout-exercises table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.workout-exercises-table tbody tr:last-child td,
.workout-exercises table tbody tr:last-child td {
    border-bottom: none;
}

.workout-exercises-table tbody tr:hover,
.workout-exercises table tbody tr:hover {
    background: #f5f5f5;
}

.exercise-name {
    font-weight: 600;
    color: #333;
}

.exercise-equipment {
    font-weight: normal;
    color: #888;
    font-size: 0.9em;
}

.exercise-sets-details {
    font-size: 0.95em;
}

.set-completed {
    color: #2e7d32;
}

.set-incomplete {
    color: #c62828;
    text-decoration: line-through;
}

.workout-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.workout-source a {
    color: #4a90a4;
    text-decoration: none;
}

.workout-source a:hover {
    text-decoration: underline;
}

/* Archive Styles */
.workout-archive {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.workout-archive-header {
    margin-bottom: 30px;
    text-align: center;
}

.workout-archive-title {
    font-size: 2.5em;
    color: #333;
    margin: 0;
}

.workout-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.workout-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.workout-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.workout-card-thumbnail {
    height: 180px;
    overflow: hidden;
}

.workout-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.workout-card-content {
    padding: 20px;
}

.workout-card-title {
    margin: 0 0 10px 0;
    font-size: 1.3em;
}

.workout-card-title a {
    color: #333;
    text-decoration: none;
}

.workout-card-title a:hover {
    color: #4a90a4;
}

.workout-card-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
    font-size: 0.9em;
    color: #666;
}

.workout-card-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.85em;
    color: #888;
}

.workout-card-stats span {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: #f0f0f0;
    border-radius: 15px;
}

.workout-card-exercise-list {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.9em;
    color: #555;
}

.workout-card-exercise-list li {
    display: inline-block;
    padding: 3px 8px;
    margin: 2px;
    background: #e8f4f8;
    border-radius: 4px;
}

.workout-card-exercise-list .more-exercises {
    background: #ddd;
    color: #666;
}

.workout-pagination {
    margin-top: 40px;
    text-align: center;
}

.workout-pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 5px;
}

.workout-pagination a,
.workout-pagination span {
    display: inline-block;
    padding: 8px 14px;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
}

.workout-pagination a:hover {
    background: #4a90a4;
    color: #fff;
}

.workout-pagination .current {
    background: #4a90a4;
    color: #fff;
}

.no-workouts {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 1.2em;
}

/* Responsive */
@media (max-width: 768px) {
    .workout-meta-info {
        flex-direction: column;
        gap: 10px;
    }

    .workout-cards {
        grid-template-columns: 1fr;
    }

    .workout-exercises-table,
    .workout-exercises table {
        display: block;
        overflow-x: auto;
    }
}
