/* Schedule Manager - My Account Classes Styles */

/* My Classes List */
.sm-my-classes {
    padding: 10px 0;
}

.sm-my-classes h3 {
    font-weight: 600;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e2e2;
    color: #222;
}

.sm-no-classes {
    color: #666;
    margin-bottom: 15px;
}

/* Classes Table */
.sm-classes-table {
    width: 100%;
    border-collapse: collapse;
    border: none;
}

.sm-classes-table thead tr {
    border-bottom: 1px solid #e2e2e2;
}

.sm-classes-table th {
    text-align: left;
    padding: 12px 10px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    background: transparent;
    border: none;
}

.sm-classes-table td {
    padding: 16px 10px;
    color: #333;
    border: none;
    vertical-align: middle;
}

.sm-classes-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
}

.sm-classes-table tbody tr:last-child {
    border-bottom: none;
}

.sm-col-name {
    font-weight: 600;
    color: #222;
}

.sm-col-date {
    color: #666;
}

.sm-class-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    width: fit-content;
    letter-spacing: 0.3px;
}

.sm-status-completed,
.sm-status-processing {
    background: #e8f5e9;
    color: #2e7d32;
}

.sm-status-on-hold,
.sm-status-pending {
    background: #fff8e1;
    color: #f57c00;
}

.sm-class-action {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.sm-btn-start {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #000 !important;
    color: #fff !important;
    border: 1px solid #000 !important;
    padding: 10px 22px !important;
    border-radius: 4px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    transition: all 0.25s ease !important;
    text-decoration: none !important;
    cursor: pointer !important;
    line-height: 1 !important;
    height: auto !important;
    min-height: 38px !important;
}

.sm-btn-start:hover {
    background: #fff !important;
    color: #000 !important;
}

.sm-btn-start-large {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #000 !important;
    color: #fff !important;
    border: 1px solid #000 !important;
    padding: 12px 30px !important;
    border-radius: 4px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    transition: all 0.25s ease !important;
    text-decoration: none !important;
    cursor: pointer !important;
    line-height: 1 !important;
    height: auto !important;
    min-height: 44px !important;
}

.sm-btn-start-large:hover {
    background: #fff !important;
    color: #000 !important;
}

.sm-btn-disabled {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #f5f5f5 !important;
    color: #999 !important;
    border: 1px solid #ddd !important;
    padding: 10px 22px !important;
    border-radius: 4px !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    cursor: not-allowed !important;
    line-height: 1 !important;
    height: auto !important;
    min-height: 38px !important;
}

/* Class Detail Page */
.sm-class-detail {
    /* padding: 10px 0; */
}

.sm-back-link {
    display: inline-block;
    color: #888;
    text-decoration: none;
    margin-bottom: 15px;
    transition: color 0.2s ease;
}

.sm-back-link:hover {
    color: #000;
}

.sm-class-detail h3 {
    font-weight: 600;
    margin: 0 0 25px 0;
    color: #222;
}

.sm-class-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.sm-stat-item {
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 15px 12px;
    text-align: center;
}

.sm-stat-label {
    display: block;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.sm-stat-value {
    display: block;
    font-weight: 600;
    color: #222;
    line-height: 1.3;
}

.sm-stat-value small {
    font-weight: 400;
    color: #666;
}

.sm-stat-value.sm-warning {
    color: #e53935;
}

.sm-class-actions {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid #eee;
}

/* Thank You Page */
.sm-thankyou-button {
    text-align: center;
    margin: 25px 0;
    padding: 25px;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 6px;
}

/* Responsive */
@media (max-width: 768px) {
    .sm-classes-table {
        display: block;
        overflow-x: auto;
    }

    .sm-classes-table th,
    .sm-classes-table td {
        padding: 10px 8px;
    }

    .sm-btn-start,
    .sm-btn-disabled {
        padding: 8px 14px !important;
    }
}

@media (max-width: 480px) {
    .sm-class-stats {
        grid-template-columns: 1fr;
    }
    
    .sm-stat-item {
        padding: 12px 10px;
    }
}

/* ===============================================
   BOOKING TIMETABLE STYLES
   =============================================== */

/* Tabs Navigation */
.csm-tabs {
    display: flex;
    gap: 0;
    margin-top: 20px;
    border-bottom: 2px solid #eee;
}

.csm-tab {
    padding: 12px 20px;
    border: none;
    background: none;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.csm-tab:hover {
    color: #fff;
}

.csm-tab.active {
    color: #e63946;
    border-bottom-color: #e63946;
}

.csm-tab-count {
    background: #e63946;
    color: #fff;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
}

/* Completed tab - green color */
.csm-tab[data-tab="completed"].active {
    color: #22c55e;
    border-bottom-color: #22c55e;
}

.csm-tab[data-tab="completed"] .csm-tab-count {
    background: #22c55e;
}

/* Tab Contents */
.csm-tab-contents {
    margin-top: 0;
}

.csm-tab-content {
    display: none;
    padding: 20px 0;
}

.csm-tab-content.active {
    display: block;
}

/* Legacy section styles - keep for backwards compatibility */
.csm-completed-section,
.csm-upcoming-section,
.csm-booking-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.csm-completed-section h4,
.csm-upcoming-section h4,
.csm-booking-section h4 {
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #222;
}

/* Booked Classes List */
.csm-booked-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.csm-booked-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
}

.csm-booked-completed {
    background: #dcfce7;
    opacity: 1;
}

.csm-booked-date {
    font-weight: 600;
    color: #333;
    min-width: 100px;
}

.csm-booked-time {
    color: #666;
    flex: 1;
}

.csm-booked-status {
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 600;
    text-transform: uppercase;
    background: #e0e0e0;
    color: #666;
}

.csm-status-upcoming {
    background: #e3f2fd;
    color: #1565c0;
}

/* Completed item - green badge */
.csm-booked-completed .csm-booked-status {
    background: #dcfce7;
    color: #22c55e;
}

/* Cancelled item */
.csm-booked-cancelled {
    background: #fef2f2;
    border-color: #fecaca;
    flex-direction: column;
    align-items: stretch;
}

.csm-cancelled-main {
    display: flex;
    align-items: center;
    gap: 10px;
}

.csm-status-cancelled {
    background: #fee2e2 !important;
    color: #dc2626 !important;
}

.csm-cancellation-note {
    margin-top: 8px;
    padding: 8px 12px;
    background: #fff;
    border-radius: 4px;
    border-left: 3px solid #dc2626;
    font-size: 13px;
}

.csm-note-label {
    font-weight: 600;
    color: #666;
    margin-right: 5px;
}

.csm-note-text {
    color: #333;
}

/* Cancelled tab count badge */
.csm-cancelled-count {
    background: #fee2e2 !important;
    color: #dc2626 !important;
}

/* Booking Timetable */
#csm-booking-timetable {
    margin-top: 5px;
}

/* Title row with date picker */
.csm-timetable-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.csm-timetable-top h4 {
    font-weight: 600;
    margin: 0;
    color: #222;
}

.csm-date-input {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Navigation buttons row */
.csm-timetable-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.csm-prev-day,
.csm-next-day {
    padding: 6px 14px;
    border: 1px solid #333;
    background: #fff;
    color: #333;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.csm-prev-day:hover,
.csm-next-day:hover {
    background: #333;
    color: #fff;
}

.csm-prev-day:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.csm-prev-day:disabled:hover {
    background: #fff;
    color: #333;
}

.csm-day-header {
    font-weight: 500;
    color: #666;
    padding: 5px 0;
    margin-bottom: 0;
}

/* Time Slots */
.csm-slots-container {
    display: flex;
    flex-direction: column;
}

.csm-slot-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    gap: 15px;
}

.csm-slot-item:last-child {
    border-bottom: none;
}

.csm-slot-time {
    font-weight: 500;
    color: #222;
    min-width: 180px;
}

.csm-slot-status {
    color: #888;
    flex: 1;
}

.csm-slot-action {
    flex-shrink: 0;
}

/* Booking Buttons */
.csm-btn {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 15px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid;
    text-decoration: none;
    white-space: nowrap;
}

.csm-btn-book {
    background: #fff;
    color: #333;
    border-color: #333;
}

.csm-btn-book:hover {
    background: #333;
    color: #fff;
}

.csm-btn-unbook {
    background: #fff;
    color: #e53935;
    border-color: #e53935;
}

.csm-btn-unbook:hover {
    background: #e53935;
    color: #fff;
}

.csm-btn-booked {
    background: #e8f5e9;
    color: #2e7d32;
    border-color: #2e7d32;
    cursor: default;
}

.csm-btn-disabled {
    background: #f5f5f5;
    color: #999;
    border-color: #ddd;
    cursor: not-allowed;
}

.csm-no-classes {
    text-align: center;
    color: #888;
    padding: 30px;
    font-style: italic;
}

/* Payment Pending */
.csm-payment-pending {
    margin-top: 30px;
    padding: 25px;
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 6px;
    text-align: center;
}

.csm-payment-pending p {
    margin: 0;
    color: #f57c00;
    font-weight: 500;
}

/* Responsive for Booking */
@media (max-width: 768px) {
    .csm-timetable-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .csm-slot-item {
        flex-wrap: wrap;
    }

    .csm-slot-time {
        min-width: 100%;
        margin-bottom: 5px;
    }

    .csm-booked-item {
        flex-wrap: wrap;
    }

    .csm-booked-date {
        min-width: auto;
    }
}

/* Unavailable Slots - Button Only */
.csm-btn-unavailable {
    background: #e5e5e5;
    color: #999;
    border: 1px solid #ddd;
    cursor: not-allowed;
}

/* Full Slot */
.csm-btn-full {
    background: #fecaca;
    color: #dc2626;
    border: 1px solid #fca5a5;
    cursor: not-allowed;
}

/* Closed Slot - booking cutoff passed (less than 1 hour before class) */
.csm-btn-closed {
    background: #e5e5e5;
    color: #999;
    border: 1px solid #ddd;
    cursor: not-allowed;
}

.csm-slot-closed {
    opacity: 0.7;
}

/* Loading state */
.csm-loading {
    text-align: center;
    color: #666;
    padding: 20px;
}

/* Slot Info Container */
.csm-slot-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

/* Slot Meta - Instructor & Level */
.csm-slot-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.csm-meta-instructor,
.csm-meta-level {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.csm-meta-instructor svg,
.csm-meta-level svg {
    flex-shrink: 0;
}

.csm-meta-instructor {
    background: #dbeafe;
    color: #1d4ed8;
}

/* Level-wise colors */
.csm-meta-level.level-beginner {
    background: #dcfce7;
    color: #15803d;
}

.csm-meta-level.level-intermediate {
    background: #fef3c7;
    color: #b45309;
}

.csm-meta-level.level-advance {
    background: #fee2e2;
    color: #dc2626;
}
