/* Dashboard Layout */
.dashboard-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.user-details {
    margin-left: 1.5rem;
}

.user-details h2 {
    margin-top: 0;
    color: #333;
}

/* Bookings Section */
.bookings-section {
    margin-bottom: 2rem;
}

.bookings-section h2 {
    color: #333;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.booking-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.booking-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.booking-card:hover {
    transform: translateY(-5px);
}

.booking-card.pending {
    border-left: 5px solid #ffc107;
}

.booking-card.confirmed {
    border-left: 5px solid #28a745;
}

.booking-card.cancelled {
    border-left: 5px solid #dc3545;
    opacity: 0.7;
}

.booking-header {
    padding: 1rem;
    background-color: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.booking-status {
    font-weight: bold;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-confirmed {
    background-color: #d4edda;
    color: #155724;
}

.status-cancelled {
    background-color: #f8d7da;
    color: #721c24;
}

.booking-body {
    padding: 1rem;
}

.booking-trainer {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.trainer-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 1rem;
}

.booking-details {
    margin-bottom: 1rem;
}

.booking-details p {
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
}

.booking-details i {
    width: 20px;
    margin-right: 0.5rem;
    color: #6c757d;
}

.booking-actions {
    padding: 1rem;
    background-color: #f8f9fa;
    text-align: right;
}

.cancel-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

.cancel-btn:hover {
    background-color: #c82333;
}

.cancel-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.payment-status {
    font-weight: bold;
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.payment-paid {
    background-color: #d4edda;
    color: #155724;
}

.payment-unpaid {
    background-color: #f8d7da;
    color: #721c24;
}

.no-bookings {
    text-align: center;
    padding: 2rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    color: #6c757d;
}

/* Countdown timer styles */
.cancel-timer-container {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cancel-progress-bar {
    width: 100%;
    height: 6px;
    background-color: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 5px;
}

.cancel-progress {
    height: 100%;
    background-color: #dc3545;
    transition: width 1s linear;
}

.cancel-timer-text {
    font-size: 12px;
    color: #6c757d;
}

/* BMI Tracker Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    width: 80%;
    max-width: 600px;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
}

.bmi-form {
    margin: 20px 0;
}

.bmi-form form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.bmi-form form div {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.bmi-form input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.bmi-form button {
    margin: 10px 0;
}

.bmi-result {
    margin: 20px 0;
    padding: 15px;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: bold;
}

.weight-history {
    max-height: 300px;
    overflow-y: auto;
}

.weight-entry {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.weight-entry:last-child {
    border-bottom: none;
}

/* Responsive */
@media (max-width: 768px) {
    .user-info {
        flex-direction: column;
        text-align: center;
    }
    
    .user-details {
        margin-left: 0;
        margin-top: 1rem;
    }
    
    .booking-cards {
        grid-template-columns: 1fr;
    }
}