/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

/* Trainer Dashboard Styles */

.trainer-order-detail {
    max-width: 1200px;
    margin: 0 auto;
}

.trainer-order-detail h2 {
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.trainer-order-detail h3 {
    color: #555;
    margin-top: 30px;
    margin-bottom: 15px;
}

.order-info,
.order-products,
.plan-assignment {
    background: #f9f9f9;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 5px;
    border-left: 4px solid #0073aa;
}

.order-info p,
.order-products p {
    margin: 8px 0;
}

.order-products ul {
    margin: 10px 0;
    padding-left: 20px;
}

.order-products li {
    margin: 5px 0;
}

.plan-assignment h4 {
    color: #0073aa;
    margin-bottom: 15px;
}

.current-plan {
    background: #e7f3ff;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid #b3d9ff;
}

.plan-template-selection {
    background: #fff;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.plan-template-selection select {
    width: 100%;
    max-width: 400px;
    margin-bottom: 10px;
}

.plan-template-selection button {
    margin-top: 10px;
}

/* Plan Editor Styles */
.plan-editor {
    max-width: 1000px;
    margin: 0 auto;
}

.plan-editor h2 {
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.plan-editor form {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
}

.plan-editor label {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

.plan-editor input[type="text"],
.plan-editor textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    margin-bottom: 15px;
}

.plan-editor button {
    margin-right: 10px;
}

/* Training Cards Styles */
#training-cards-container {
    margin-top: 20px;
}

.training-cards-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.training-cards-header h3 {
    margin: 0;
}

.training-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.card-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.card-header:hover {
    background: #e9ecef;
}

.card-header h4 {
    margin: 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.card-content {
    padding: 20px;
    display: none;
}

.training-card:not(.collapsed) .card-content {
    display: block;
}

.card-content p {
    margin-bottom: 15px;
}

.exercises-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.exercises-section h5 {
    margin-bottom: 15px;
    color: #555;
}

.exercises-container {
    margin-top: 15px;
}

.exercise-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    margin-bottom: 15px;
    overflow: hidden;
}

.exercise-header {
    background: #e9ecef;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.exercise-header:hover {
    background: #dee2e6;
}

.exercise-header h6 {
    margin: 0;
    color: #495057;
    font-size: 13px;
    font-weight: 600;
}

.exercise-content {
    padding: 15px;
    display: none;
}

.exercise-item:not(.collapsed) .exercise-content {
    display: block;
}

.exercise-content p {
    margin: 10px 0;
}

.exercise-content label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
    font-size: 12px;
}

.exercise-content input,
.exercise-content select,
.exercise-content textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
}

.exercise-content input:focus,
.exercise-content select:focus,
.exercise-content textarea:focus {
    border-color: #007cba;
    outline: none;
    box-shadow: 0 0 0 1px #007cba;
}

.exercise-content input[type="number"] {
    width: 100px;
}

/* Exercise Info Display */
.exercise-info {
    background: #f9f9f9;
    padding: 12px;
    margin: 10px 0;
    border-radius: 6px;
    border-left: 3px solid #0073aa;
    font-size: 13px;
    line-height: 1.4;
}

.exercise-description-display {
    margin-bottom: 8px;
    color: #333;
}

.exercise-duration-display {
    font-weight: bold;
    color: #0073aa;
}

/* Button Styles */
.button {
    background: #0073aa;
    color: #fff;
    padding: 8px 16px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
}

.button:hover {
    background: #005a87;
    color: #fff;
}

.button-secondary {
    background: #f7f7f7;
    color: #555;
    border: 1px solid #ccc;
}

.button-secondary:hover {
    background: #eee;
    color: #333;
}

/* Add/Remove Button Styles */
.add-exercise,
.remove-exercise,
.remove-card {
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.add-exercise {
    background: #28a745;
    border-color: #28a745;
    color: white;
}

.add-exercise:hover {
    background: #218838;
    border-color: #1e7e34;
}

.remove-exercise,
.remove-card {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
}

.remove-exercise:hover,
.remove-card:hover {
    background: #c82333;
    border-color: #bd2130;
}

/* Add Section Styles */
.add-card-section,
.add-exercise-section {
    padding: 15px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 6px;
    margin-top: 15px;
}

.add-card-section:hover,
.add-exercise-section:hover {
    border-color: #007cba;
    background: #e7f3ff;
}

#add-training-card {
    background: #007cba;
    border-color: #007cba;
    color: white;
    font-weight: 500;
    padding: 10px 20px;
    font-size: 14px;
}

#add-training-card:hover {
    background: #005a87;
    border-color: #005a87;
}

/* Customer Fitness Plans Styles */
.customer-fitness-plans {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

.customer-fitness-plans h2 {
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
    margin-bottom: 30px;
    text-align: center;
}

/* Plans Grid */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Plan Card */
.plan-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.plan-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.plan-card-header {
    background: linear-gradient(135deg, #0073aa, #005a87);
    color: white;
    padding: 20px;
    text-align: center;
}

.plan-card-header h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
}

.order-number {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.plan-card-content {
    padding: 20px;
}

/* Plan Stats */
.plan-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat {
    text-align: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #0073aa;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    font-weight: 500;
}

.stat-value {
    display: block;
    font-size: 14px;
    color: #333;
    font-weight: 500;
    margin-top: 5px;
}

.plan-card-actions {
    text-align: center;
}

/* No Plans State */
.no-plans {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px dashed #ddd;
}

.no-plans-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.no-plans h3 {
    color: #333;
    margin-bottom: 15px;
}

.no-plans p {
    color: #666;
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Fitness Plan Detail */
.fitness-plan-detail {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 0;
}

.plan-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px;
    background: linear-gradient(135deg, #0073aa, #005a87);
    color: white;
    border-radius: 12px;
}

.plan-header h2 {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 600;
}

.trainer-info {
    margin: 0;
    font-size: 16px;
    opacity: 0.9;
}

.plan-description {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 4px solid #0073aa;
}

.plan-description p {
    margin: 0;
    color: #333;
    line-height: 1.6;
}

/* Customer Training Cards */
.training-cards-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.training-card.customer-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.training-card.customer-card .card-header {
    background: #f8f9fa;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
}

.training-card.customer-card .card-header h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 20px;
    font-weight: 600;
}

.card-description {
    margin: 0;
    color: #666;
    line-height: 1.5;
}

/* Exercises Grid */
.exercises-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px;
}

/* Customer Exercise Items */
.exercise-item.customer-exercise {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.exercise-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #f8f9fa;
}

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

.exercise-item.customer-exercise:hover .exercise-image img {
    transform: scale(1.05);
}

.exercise-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 48px;
    background: #f8f9fa;
    color: #ccc;
}

.exercise-content {
    padding: 15px;
}

.exercise-content h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.exercise-details {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.exercise-type {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

.exercise-type.strength {
    background: #e3f2fd;
    color: #1976d2;
}

.exercise-type.cardio {
    background: #e8f5e8;
    color: #388e3c;
}

.exercise-type.flexibility {
    background: #fff3e0;
    color: #f57c00;
}

.exercise-type.balance {
    background: #f3e5f5;
    color: #7b1fa2;
}

.exercise-duration {
    padding: 4px 8px;
    background: #f5f5f5;
    border-radius: 12px;
    font-size: 11px;
    color: #666;
}

.exercise-sets {
    margin-bottom: 8px;
    font-size: 14px;
    color: #333;
}

.exercise-notes {
    margin-bottom: 12px;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.exercise-description {
    margin-bottom: 12px;
    font-size: 13px;
    color: #333;
    line-height: 1.5;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    border-left: 3px solid #0073aa;
}

.exercise-video {
    margin-top: 10px;
}

.video-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.video-link:hover {
    background: #005a87;
    color: white;
    text-decoration: none;
}

.video-icon {
    font-size: 14px;
}

.no-cards {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #666;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {

    .customer-fitness-plans,
    .fitness-plan-detail {
        padding: 15px;
    }

    .plans-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .plan-card-header {
        padding: 15px;
    }

    .plan-card-header h3 {
        font-size: 16px;
    }

    .plan-card-content {
        padding: 15px;
    }

    .plan-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat {
        padding: 8px;
    }

    .stat-number {
        font-size: 20px;
    }

    .plan-header {
        padding: 20px 15px;
        margin-bottom: 20px;
    }

    .plan-header h2 {
        font-size: 24px;
    }

    .exercises-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px;
    }

    .exercise-image {
        height: 180px;
    }

    .exercise-content {
        padding: 12px;
    }

    .exercise-details {
        gap: 8px;
    }

    .exercise-type,
    .exercise-duration {
        font-size: 10px;
        padding: 3px 6px;
    }
}

@media (max-width: 480px) {
    .plan-stats {
        grid-template-columns: 1fr;
    }

    .exercise-image {
        height: 160px;
    }

    .plan-header h2 {
        font-size: 20px;
    }

    .training-card.customer-card .card-header h3 {
        font-size: 18px;
    }
}

.button-small {
    padding: 4px 8px;
    font-size: 12px;
}

.button-primary {
    background: #0073aa;
    color: #fff;
}

.button-primary:hover {
    background: #005a87;
}

/* Table Styles */
.woocommerce-orders-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.woocommerce-orders-table th,
.woocommerce-orders-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.woocommerce-orders-table th {
    background: #f5f5f5;
    font-weight: bold;
}

.woocommerce-orders-table tr:hover {
    background: #f9f9f9;
}

/* Responsive Design */
@media (max-width: 768px) {

    .trainer-order-detail,
    .plan-editor {
        padding: 10px;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .card-header button {
        margin-top: 10px;
    }

    .exercise-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .exercise-header button {
        margin-top: 10px;
    }

    .woocommerce-orders-table {
        font-size: 14px;
    }

    .woocommerce-orders-table th,
    .woocommerce-orders-table td {
        padding: 8px;
    }
}

/* Success/Error Messages */
.woocommerce-message {
    background: #d4edda;
    color: #155724;
    padding: 12px 20px;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    margin-bottom: 20px;
}

.woocommerce-error {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 20px;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin-bottom: 20px;
}