/* styles/routines.css */

.routine-container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    color: var(--text-main, #f8fafc);
}

.routine-header {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    backdrop-filter: blur(10px);
}

.routine-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary, #06b6d4);
    margin-bottom: 10px;
}

.routine-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.routine-tag {
    background: rgba(255,255,255,0.1);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(255,255,255,0.05);
}

.tag-level { border-color: #f59e0b; color: #fcd34d; }
.tag-type { border-color: #8b5cf6; color: #c4b5fd; }

.routine-goal {
    font-style: italic;
    color: var(--text-muted, #94a3b8);
    font-size: 0.95rem;
}

/* Day Tabs / Navigation */
.days-nav {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-bottom: 20px;
    -webkit-overflow-scrolling: touch;
}

.days-nav::-webkit-scrollbar { height: 4px; }
.days-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 4px; }

.day-tab {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 120px;
    text-align: center;
}

.day-tab:hover {
    background: rgba(255, 255, 255, 0.1);
}

.day-tab.active {
    background: rgba(6, 182, 212, 0.15);
    border-color: var(--primary, #06b6d4);
    color: var(--primary, #06b6d4);
}

/* Exercises Layout */
.exercises-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.exercise-card {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.exercise-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary, #06b6d4);
    border-radius: 4px 0 0 4px;
}

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

.ex-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

.ex-muscle {
    font-size: 0.85rem;
    color: #94a3b8;
    background: rgba(0,0,0,0.3);
    padding: 3px 8px;
    border-radius: 4px;
}

.ex-order {
    font-size: 1.5rem;
    font-weight: bold;
    color: rgba(255,255,255,0.1);
}

.ex-details-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    background: rgba(0,0,0,0.2);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.detail-box {
    text-align: center;
}

.db-label {
    display: block;
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.db-val {
    font-size: 1.1rem;
    font-weight: bold;
    color: #fff;
}

.ex-notes {
    background: rgba(245, 158, 11, 0.1);
    border-left: 3px solid #f59e0b;
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #fcd34d;
    margin-bottom: 15px;
}

.ex-variations {
    font-size: 0.85rem;
    color: #c4b5fd;
    margin-bottom: 10px;
    font-style: italic;
}

/* Forms for Admin */
.routine-builder {
    background: rgba(30, 41, 59, 0.5);
    padding: 20px;
    border-radius: 12px;
    border: 1px dashed rgba(255,255,255,0.2);
}

.builder-day-section {
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.builder-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 10px;
}

.builder-ex-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
    align-items: end;
}

@media (max-width: 768px) {
    .ex-details-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    .builder-ex-row {
        grid-template-columns: 1fr;
        background: rgba(255,255,255,0.05);
        padding: 10px;
        border-radius: 8px;
    }
}
