/**
 * FitTime Plugin Styles
 * Comprehensive stylesheet for FitTime WordPress plugin
 */

/* General Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazir', 'Arial', sans-serif;
    direction: rtl;
    background-color: #f5f5f5;
    color: #333;
    font-size: 16px;
    line-height: 1.6;
}

/* Container Styles */
.fittime-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Dashboard Styles */
.fittime-dashboard {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #3b82f6, #2dd4bf);
    color: white;
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.hero p {
    font-size: 1.2rem;
}

/* Card Styles */
.card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    background: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: #3b82f6;
}

.card-body {
    padding: 10px;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 16px;
    text-align: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
    cursor: pointer;
}

.btn-primary {
    background-color: #3b82f6;
    color: white;
    border: none;
}

.btn-primary:hover {
    background-color: #2b6cb0;
    transform: scale(1.05);
}

.btn-secondary {
    background-color: #6b7280;
    color: white;
    border: none;
}

.btn-secondary:hover {
    background-color: #4b5563;
}

.btn-danger {
    background-color: #ef4444;
    color: white;
    border: none;
}

.btn-danger:hover {
    background-color: #dc2626;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-control {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    width: 100%;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 5px rgba(59, 130, 246, 0.3);
}

.form-control-file {
    padding: 5px;
}

.form-label {
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
}

/* Navigation Styles */
.nav-link {
    padding: 10px 15px;
    color: #3b82f6;
    text-decoration: none;
    display: block;
    transition: background-color 0.3s ease;
}

.nav-link:hover {
    background-color: #e9ecef;
    border-radius: 5px;
}

.nav-link.active {
    background-color: #e9ecef;
    font-weight: bold;
    border-right: 3px solid #3b82f6;
}

/* Sidebar Styles */
.sidebar {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sidebar h4 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #333;
}

/* Profile Header */
.profile-header {
    display: flex;
    align-items: center;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.profile-header img {
    border-radius: 50%;
    margin-left: 20px;
}

/* QR Code Styles */
.qr-code-card {
    text-align: center;
}

.qr-code-card img {
    max-width: 200px;
    margin: 0 auto;
    display: block;
    border: 1px solid #ddd;
    padding: 10px;
    background: #fff;
}

.validate-qr-form {
    max-width: 300px;
    margin: 20px 0;
}

.validate-qr-form .form-control {
    text-align: center;
}

/* Nutrition Plan Styles */
.nutrition-plan-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #e5e7eb;
}

.nutrition-plan-card h5 {
    font-size: 1.2rem;
    color: #1f2937;
    margin-bottom: 10px;
}

.nutrition-plan-card p {
    font-size: 1rem;
    color: #4b5563;
}

/* Points and Gamification Styles */
.points-card {
    background: #e9ecef;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.points-card h5 {
    font-size: 1.3rem;
    color: #3b82f6;
}

.challenge {
    border-bottom: 1px solid #ddd;
    padding: 10px 0;
}

.challenge:last-child {
    border-bottom: none;
}

/* Social Feed Styles */
.follow-feed {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.workout-update {
    border-bottom: 1px solid #ddd;
    padding: 10px 0;
}

.workout-update:last-child {
    border-bottom: none;
}

.workout-update h5 {
    font-size: 1.1rem;
    color: #1f2937;
}

.workout-update p {
    font-size: 0.95rem;
    color: #4b5563;
}

/* Video Card Styles */
.video-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.video-card iframe {
    width: 100%;
    height: 200px;
    border: none;
    border-radius: 8px;
}

.video-card h5 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.video-card p {
    font-size: 0.95rem;
    color: #4b5563;
}

/* Table Styles */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.table th,
.table td {
    padding: 12px;
    text-align: right;
    border-bottom: 1px solid #ddd;
}

.table th {
    background: #f8f9fa;
    font-weight: bold;
}

.table-striped tbody tr:nth-child(odd) {
    background: #f9fafb;
}

/* Calendar Styles */
#calendar {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Search Results */
#search-results .card {
    margin-bottom: 15px;
}

/* Notifications */
#notifications-list .notification {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

#notifications-list .notification:last-child {
    border-bottom: none;
}

/* Favorites List */
#favorites-list .favorite {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

#favorites-list .favorite:last-child {
    border-bottom: none;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .fittime-dashboard {
        padding: 10px;
    }

    .hero {
        padding: 20px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .profile-header img {
        margin-left: 0;
        margin-bottom: 10px;
    }

    .sidebar {
        margin-bottom: 20px;
    }

    .nav-link {
        padding: 8px 10px;
        font-size: 14px;
    }

    .card {
        padding: 10px;
    }

    .btn {
        padding: 8px 15px;
        font-size: 14px;
    }

    .form-control {
        font-size: 14px;
        padding: 8px;
    }

    .qr-code-card img {
        max-width: 150px;
    }

    .video-card iframe {
        height: 150px;
    }
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .card-title {
        font-size: 1.1rem;
    }

    .table th,
    .table td {
        padding: 8px;
        font-size: 14px;
    }

    .video-card iframe {
        height: 120px;
    }
}

/* Additional Utility Classes */
.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.p-4 {
    padding: 1.5rem;
}

.shadow-sm {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.rounded-circle {
    border-radius: 50%;
}

.d-flex {
    display: flex;
}

.align-items-center {
    align-items: center;
}

.justify-content-between {
    justify-content: space-between;
}

.bg-light {
    background-color: #f8f9fa;
}

.bg-white {
    background-color: #fff;
}

/* Animation for Buttons */
@keyframes buttonHover {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

.btn:hover {
    animation: buttonHover 0.2s ease forwards;
}

/* Accessibility Improvements */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Custom Styles for Specific Components */
.edit-field {
    margin-top: 5px;
    font-size: 0.9rem;
}

.validate-qr-form .btn {
    width: 100%;
}

.nutrition-plan-list .nutrition-plan-card {
    transition: background-color 0.3s ease;
}

.nutrition-plan-list .nutrition-plan-card:hover {
    background-color: #e5e7eb;
}

.points-card .challenge {
    margin-bottom: 10px;
}

.follow-feed .workout-update {
    transition: background-color 0.3s ease;
}

.follow-feed .workout-update:hover {
    background-color: #e5e7eb;
}

.video-list .video-card {
    max-width: 100%;
}

/* Admin-Specific Styles */
.wp-list-table {
    border: 1px solid #ddd;
}

.wp-list-table th,
.wp-list-table td {
    padding: 12px;
}

.edit-plan,
.delete-plan,
.edit-challenge,
.delete-challenge {
    color: #3b82f6;
    text-decoration: none;
    margin-right: 10px;
}

.edit-plan:hover,
.delete-plan:hover,
.edit-challenge:hover,
.delete-challenge:hover {
    color: #2b6cb0;
}

/* Ensure RTL compatibility */
[dir="rtl"] .form-group label {
    text-align: right;
}

[dir="rtl"] .nav-link.active {
    border-right: none;
    border-left: 3px solid #3b82f6;
}

[dir="rtl"] .profile-header img {
    margin-left: 0;
    margin-right: 20px;
}

@media (max-width: 768px) {
    [dir="rtl"] .profile-header img {
        margin-right: 0;
    }
}