/* ======= WORKOUT TRACKER =======
   Workout screen, set rows, tick buttons, progress
*/

#back-to-program-from-workout-btn {
    background: none;
    border: none;
    color: var(--accent-gold);
    font-size: 14px;
    padding: 0;
    margin-bottom: 16px;
    display: inline-block;
}

#finish-workout-btn {
    width: 100%;
    padding: 13px;
    background: var(--accent-gold);
    color: var(--text-primary);
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    margin-top: 16px;
    transition: background 0.2s;
}

#finish-workout-btn:hover {
    background: var(--accent-red-hover);
}

#workout-progress {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 4px 0 16px;
}

.workout-exercise-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
}

.workout-exercise-card h3 {
    margin: 0 0 12px 0;
}

.set-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 0.5px solid var(--border-color);
    font-size: 14px;
    color: var(--text-primary);
}

.set-row:last-child {
    border-bottom: none;
}

.set-row.completed {
    color: var(--text-secondary);
    text-decoration: line-through;
}

.tick-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1.5px solid var(--border-color);
    background: none;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--text-primary);
}

.tick-btn.done {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    color: var(--text-on-gold);
}

/* Workout settings */
#workout-settings {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.workout-setting-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

/* Toggle switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--border-color);
    border-radius: 20px;
    transition: 0.3s;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background: var(--text-primary);
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--accent-gold);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(16px);
}

/* Rest timer */
#rest-timer-container {
    position: fixed;
    bottom: 80px;
    left: 20px;
    right: 20px;
    background: var(--bg-card);
    border: 1px solid var(--accent-gold);
    border-radius: 16px;
    padding: 16px 20px;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#rest-timer-display {
    font-size: 32px;
    font-weight: 600;
    color: var(--accent-gold);
    font-variant-numeric: tabular-nums;
}

#rest-timer-stop {
    padding: 8px 16px;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
}

#rest-timer-stop:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

/* Rest timer input on exercise cards */
.rest-timer-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 0.5px solid var(--border-color);
}

.rest-timer-row label {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
    white-space: nowrap;
}

.rest-timer-input {
    width: 60px;
    padding: 4px 8px;
    font-size: 13px;
    text-align: center;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-page);
    color: var(--text-primary);
}

.rest-timer-unit {
    font-size: 12px;
    color: var(--text-secondary);
}

.start-rest-btn {
    margin-left: auto;
    padding: 5px 12px;
    background: var(--accent-gold);
    color: var(--text-on-gold);
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}

/* Exercise info modal */
#exercise-info-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    display: flex;
    align-items: flex-end;
}

#exercise-info-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
}

#exercise-info-content {
    position: relative;
    background: var(--bg-card);
    border-radius: 20px 20px 0 0;
    padding: 24px 20px;
    width: 100%;
    max-height: 70vh;
    overflow-y: auto;
    border-top: 1px solid var(--border-color);
    z-index: 201;
}

#exercise-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

#exercise-info-header h3 {
    font-size: 17px;
    font-weight: 600;
    text-transform: capitalize;
}

#exercise-info-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
}

#exercise-info-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

#exercise-info-muscle {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(201, 168, 76, 0.15);
    color: var(--accent-gold);
    font-weight: 500;
    text-transform: capitalize;
}

#exercise-info-difficulty {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(138, 157, 181, 0.15);
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: capitalize;
}

#exercise-info-instructions {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

/* Info button on exercise cards */
.exercise-info-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 26px;
    height: 26px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.exercise-info-btn:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

/* Rest timer visual alert */
#rest-timer-alert {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: alert-fade-in 0.3s ease;
}

@keyframes alert-fade-in {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

#rest-timer-alert-content {
    background: var(--bg-card);
    border: 2px solid var(--accent-gold);
    border-radius: 20px;
    padding: 32px 24px;
    text-align: center;
    width: 85%;
    max-width: 320px;
    animation: alert-pop 0.4s ease;
}

@keyframes alert-pop {
    0% { transform: scale(0.8); opacity: 0; }
    70% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

#rest-timer-alert-icon {
    font-size: 48px;
    margin-bottom: 12px;
    animation: alert-pulse 0.6s ease infinite alternate;
}

@keyframes alert-pulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.15); }
}

#rest-timer-alert-content h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--accent-gold);
    margin-bottom: 8px;
}

#rest-timer-alert-content p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

#rest-timer-alert-close {
    width: 100%;
    padding: 14px;
    background: var(--accent-gold);
    color: var(--text-on-gold);
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

#rest-timer-alert-close:hover {
    background: var(--accent-gold-hover);
}