/* Plans Page Styles */

/* Ensure proper mobile layout */
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 100vw;
    margin: 0 auto;
    overflow-x: hidden;
}

/* Workout Main Content */
.main-content {
    padding: 20px 16px;
    background-color: #f8f9fa;
    min-height: calc(100vh - 140px);
    max-width: 100%;
    overflow-x: hidden;
}

/* Quick Stats Section */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.stat-card {
    background: linear-gradient(135deg, #e91e63, #c2185b);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.3);
}

.stat-icon {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-number {
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    font-size: 10px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Coach Plan Section */
.coach-plan-section {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.coach-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
}

.coach-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.coach-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e91e63;
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.2);
}

.coach-details h3 {
    font-size: 18px;
    font-weight: 700;
    color: #000;
    margin: 0 0 4px 0;
}

.coach-specialization {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 6px;
}

.coach-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #28a745;
    font-weight: 500;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: #28a745;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.coach-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 16px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background-color: #f8f9fa;
    color: #e91e63;
}

.action-btn.collapsed i {
    transform: rotate(180deg);
}

/* Plan Tabs */
.plan-tabs {
    display: flex;
    border-bottom: 1px solid #e9ecef;
    background-color: #f8f9fa;
}

.plan-tab {
    flex: 1;
    padding: 16px 20px;
    text-align: center;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.plan-tab i {
    font-size: 16px;
}

.plan-tab:hover {
    background-color: #e9ecef;
}

.plan-tab.active {
    color: #e91e63;
    border-bottom-color: #e91e63;
    background-color: #fff;
}

.plan-tab.active i {
    color: #e91e63;
}

/* Plan Content */
.plan-content {
    padding: 20px;
}

.plan-panel {
    display: none;
}

.plan-panel.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

/* Day Section */
.day-section {
    margin-bottom: 30px;
}

.day-section:last-child {
    margin-bottom: 0;
}

.day-header {
    margin-bottom: 20px;
}

.day-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: #000;
    margin: 0 0 8px 0;
}

.daily-calories {
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
}

/* Meals Grid */
.meals-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.meal-card {
    background-color: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

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

.meal-image {
    width: 100%;
    height: 150px;
    overflow: hidden;
}

.meal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.meal-card:hover .meal-image img {
    transform: scale(1.05);
}

.meal-info {
    padding: 16px;
}

.meal-type {
    font-size: 12px;
    font-weight: 600;
    color: #e91e63;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.meal-info h5 {
    font-size: 16px;
    font-weight: 600;
    color: #000;
    margin: 0 0 4px 0;
}

.meal-info p {
    font-size: 14px;
    color: #6c757d;
    margin: 0 0 12px 0;
}

.meal-calories {
    font-size: 14px;
    font-weight: 600;
    color: #e91e63;
    text-align: right;
}

/* Meal Navigation */
.meal-navigation {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}

.nav-btn {
    background: none;
    border: 1px solid #e9ecef;
    color: #6c757d;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    border-color: #e91e63;
    color: #e91e63;
    background-color: #fff5f8;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background-color: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    max-width: 200px;
}

.progress-fill {
    height: 100%;
    background-color: #e91e63;
    width: 40%;
    transition: width 0.3s ease;
}

/* Workout Section */
.workout-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: #000;
    margin: 0 0 20px 0;
}

.workout-header-section {
    background: linear-gradient(135deg, #e91e63, #c2185b);
    color: white !important;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.workout-header-section h4 {
    color: white !important;
    margin-bottom: 16px;
    font-size: 18px;
}

/* Ensure all workout header text is white */
.workout-header-section * {
    color: white !important;
}

.workout-header-section h4,
.workout-header-section span {
    color: white !important;
}

.workout-stats {
    display: flex;
    justify-content: space-around;
    gap: 16px;
}

.workout-header-section .workout-stats .stat-item {
    text-align: center;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.workout-header-section .workout-stats .stat-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: white !important;
    margin-bottom: 4px;
}

.workout-header-section .workout-stats .stat-label {
    font-size: 10px;
    color: white !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.workout-header-section .workout-stats .level-stat .stat-value,
.workout-header-section .workout-stats .level-stat .stat-label {
    color: #e91e63 !important;
}

.workout-focus {
    background-color: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.workout-plan-text-block {
    white-space: pre-wrap;
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    margin-top: 8px;
}

.workout-structure-hint {
    font-size: 13px;
    color: #6c757d;
    margin-top: 12px;
    margin-bottom: 0;
}

.workout-empty-card {
    margin-bottom: 16px;
}

.workout-focus h5 {
    font-size: 20px;
    font-weight: 700;
    color: #000;
    margin: 0 0 8px 0;
}

.workout-focus p {
    color: #6c757d;
    font-size: 14px;
    margin: 0;
}

.exercises-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.exercise-group {
    background-color: #fff;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.exercise-group h6 {
    font-size: 14px;
    font-weight: 600;
    color: #e91e63;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.exercise-item {
    display: flex;
    align-items: center;
    padding: 16px;
    background-color: #fff;
    border-radius: 12px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 16px;
    position: relative;
}

.exercise-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.exercise-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    cursor: pointer;
}

.exercise-details:hover {
    background-color: rgba(233, 30, 99, 0.05);
    border-radius: 8px;
    padding: 4px;
    margin: -4px;
}

.exercise-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.exercise-thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.exercise-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.exercise-thumbnail video.exercise-thumbnail-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
    pointer-events: none;
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.exercise-item:hover .play-overlay {
    opacity: 1;
}

.exercise-item:hover .exercise-thumbnail img,
.exercise-item:hover .exercise-thumbnail video.exercise-thumbnail-video {
    transform: scale(1.05);
}

.exercise-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.exercise-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.exercise-name {
    font-size: 16px;
    font-weight: 600;
    color: #000;
    margin: 0;
}

.exercise-muscle {
    font-size: 12px;
    color: #e91e63;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.exercise-sets {
    font-size: 14px;
    font-weight: 600;
    color: #6c757d;
    background-color: #f8f9fa;
    padding: 6px 12px;
    border-radius: 20px;
    align-self: flex-start;
}

.exercise-arrow {
    color: #6c757d;
    font-size: 28px;
    flex-shrink: 0;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border: 2px solid #e91e63;
    margin-left: 8px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(233, 30, 99, 0.1);
}

.exercise-arrow:hover {
    color: #e91e63;
    transform: scale(1.05);
    background: linear-gradient(135deg, #fff5f8, #ffe8f0);
    border-color: #c2185b;
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.2);
}

.exercise-arrow i {
    transition: all 0.3s ease;
}

/* Unchecked state - empty circle */
.exercise-arrow i.fa-circle {
    color: #e91e63;
    font-size: 24px;
    opacity: 0.3;
}

/* Checked state - filled circle with checkmark */
.exercise-arrow.checked {
    background-color: #4CAF50;
    border-color: #4CAF50;
    color: white;
}

.exercise-arrow.checked i {
    color: #4CAF50 !important;
    font-size: 26px;
    filter: drop-shadow(0 2px 4px rgba(76, 175, 80, 0.3));
}

.exercise-arrow.checked i.fa-check-circle {
    color: #4CAF50 !important;
}

.exercise-arrow.checked:hover {
    background-color: #45a049;
    border-color: #45a049;
    transform: scale(1.1);
}

/* Legacy workout schedule styles (for weekly view if needed) */
.workout-schedule {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.workout-day {
    display: flex;
    align-items: center;
    padding: 16px;
    background-color: #f8f9fa;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.workout-day:hover {
    background-color: #e9ecef;
}

.day-name {
    font-size: 14px;
    font-weight: 600;
    color: #000;
    width: 80px;
    flex-shrink: 0;
}

.workout-type {
    font-size: 14px;
    color: #6c757d;
    flex: 1;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile-specific styles for iPhone */
@media (max-width: 480px) {
    body {
        overflow-x: hidden;
    }
    
    .container {
        max-width: 100vw;
        overflow-x: hidden;
    }
    
     .main-content {
         padding: 16px 12px;
         box-sizing: border-box;
     }
    
    .quick-stats {
        grid-template-columns: 1fr;
        gap: 8px;
        margin-bottom: 16px;
    }
    
    .stat-card {
        padding: 12px;
    }
    
    .stat-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .stat-number {
        font-size: 16px;
    }
    
    .stat-label {
        font-size: 9px;
    }
    
    .coach-header {
        padding: 16px;
    }
    
    .coach-avatar {
        width: 50px;
        height: 50px;
    }
    
    .coach-details h3 {
        font-size: 16px;
    }
    
    .meals-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .exercise-item {
        padding: 8px 0;
        gap: 8px;
    }
    
    .exercise-thumbnail {
        width: 50px;
        height: 50px;
    }
    
    .exercise-name {
        font-size: 13px;
    }
    
    .exercise-sets {
        font-size: 11px;
        padding: 3px 6px;
    }
    
    .meal-image {
        height: 120px;
    }
    
    .plan-content {
        padding: 16px;
    }
    
    .workout-day {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .day-name {
        width: auto;
    }
    
    .workout-duration {
        width: auto;
        text-align: left;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .main-content {
        background-color: #1a1a1a;
    }
    
    .coaches-section,
    .coach-plan-section {
        background-color: #2a2a2a;
    }
    
    .coaches-section h2,
    .coach-details h3,
    .day-header h4,
    .meal-info h5,
    .day-name {
        color: #fff;
    }
    
    .meal-card {
        background-color: #333;
    }
    
    .workout-day {
        background-color: #333;
    }
    
    .workout-day:hover {
        background-color: #444;
    }
}

/* Workout Progress Counter */
.workout-progress {
    margin-bottom: 20px;
    text-align: center;
}

.progress-counter {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 12px 20px;
    display: inline-block;
    backdrop-filter: blur(10px);
    color: white;
}

.progress-counter #completed-count {
    font-size: 24px;
    font-weight: 700;
    color: #4CAF50;
}

.progress-counter #total-exercises {
    font-size: 24px;
    font-weight: 700;
    color: white;
}

.progress-counter #textwhite {
    font-size: 24px;
    font-weight: 700;
    color: white;
}
.progress-counter {
    color: white;
}

.progress-label {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* Workout Timer Row Styles */
.workout-timer-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 20px 0;
    padding: 16px 20px;
    background: linear-gradient(135deg, #e91e63, #c2185b);
    border-radius: 12px;
    color: white;
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.3);
}

.timer-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    flex-shrink: 0;
}

.timer-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.timer-content h6 {
    font-size: 16px;
    font-weight: 600;
    color: white !important;
    margin: 0;
}

.timer-display {
    font-size: 28px;
    font-weight: 700;
    color: white !important;
    font-family: 'Courier New', monospace;
    margin: 0;
}

/* Ensure all timer text is white */
.workout-timer-row * {
    color: white !important;
}

.workout-timer-row h6,
.workout-timer-row .timer-display {
    color: white !important;
}

.timer-controls {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.timer-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.timer-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.timer-btn:active {
    transform: translateY(0);
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .workout-timer-row {
        padding: 12px 16px;
        gap: 12px;
    }
    
    .timer-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .timer-content h6 {
        font-size: 14px;
    }
    
    .timer-display {
        font-size: 24px;
    }
    
    .timer-btn {
        width: 36px;
        height: 36px;
        font-size: 12px;
    }
}
