@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

/* Schedule Manager Timetable Styles */
.schedule-wrapper {
    font-family: "Inter", sans-serif;
    max-width: 950px;
    margin: 60px auto;
    border: 1px solid #e2e2e2;
    border-radius: 6px;
    padding: 30px 40px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    background: #fff;
    color: #222;
}

.schedule-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 10px;
}

.schedule-header h2 {
    font-size: 22px;
    font-weight: 600;
    margin: 0;
}

.date-picker {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 4px;
}

.date-picker input {
    border: none;
    outline: none;
    font-size: 15px;
    background: transparent;
}

.nav-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0 25px;
    gap: 10px;
}

.nav-buttons button {
    border: 1px solid #333;
    background: transparent;
    padding: 6px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.3s;
}

.nav-buttons button:hover {
    background: #333;
    color: #fff;
}

.class-day {
    font-weight: 600;
    font-size: 18px;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    padding: 25px 0;
    margin-top: 10px;
    color: #333;
}

.class-item {
    display: flex;
    justify-content: space-between;
    padding: 25px 0;
    border-bottom: 1px solid #f1f1f1;
    align-items: center;
    font-size: 15px;
}

.class-item .class-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    width: 100%;
}

.class-item span {
    display: block;
    font-size: 16px;
    font-weight: 400;
    color: #666;
}

.class-item span.class-time {
    font-size: 20px;
    font-weight: 600;
    color: #222;
    min-width: 220px;
}

.class-item span.class-desc {
    font-size: 18px;
    font-weight: 500;
    color: #222;
    flex: 1;
    text-align: center;
}

.class-item a.ctb-book-btn {
    border: 1px solid #333;
    background: transparent;
    text-decoration: none;
    text-align: center;
    padding: 10px 44px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 16px;
    line-height: 26px;
    font-weight: 600;
    color: #222;
    transition: 0.3s;
}

.class-item a.ctb-book-btn:hover {
    background: #333;
    color: #fff;
}

/* Popup Overlay */
.ctb-popup-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
    z-index: 999999;
}

/* When popup is shown */
.ctb-popup-overlay[style*="flex"] {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* Popup Box */
.ctb-popup-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 700px;
    max-width: 95vw;
    max-height: 85vh;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    animation: popupFade 0.3s ease;
    z-index: 1000000;
}

@keyframes popupFade {
    from { transform: translate(-50%, -50%) scale(0.9); opacity: 0; }
    to   { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* Header */
.ctb-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: #fff;
    border-bottom: none;
}

.ctb-popup-header h2 {
    font-size: 28px;
    font-weight: 600;
    line-height: 1.4;
    color: #222;
    margin: 0;
    padding: 0;
}

.ctb-popup-header #ctb-popup-close {
    font-size: 28px;
    cursor: pointer;
    color: #fff;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000;
    border-radius: 50%;
    line-height: 1;
}

/* Content */
.ctb-popup-content {
    padding: 10px 0px;
    max-height: 60vh;
    overflow-y: auto;
    padding-bottom: 20px;
}

.ctb-popup-content h3 {
    font-size: 18px;
    font-weight: 700;
    color: #000000;
    padding-left: 20px;
}

.ctb-pass-item label {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px;
    border-top: 1px solid #f1f1f1;
    border-bottom: 1px solid #f1f1f1;
    cursor: pointer;
    transition: 0.25s ease;
}

.ctb-pass-item label::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    inset: 0;
    width: 1%;
    background: #000000;
    opacity: 0;
    transition: 0.25s ease;
    z-index: 1;
}

.ctb-pass-item label:has(input[type="radio"]:checked)::before {
    opacity: 1;
}

.ctb-pass-item label * {
    position: relative;
    z-index: 2;
}

.ctb-pass-item label span {
    font-size: 18px;
    font-weight: 400;
    color: #757575;
}

.ctb-pass-item label .ctb-pass-item-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ctb-pass-item label .ctb-pass-item-input span {
    font-size: 16px;
    font-weight: 600;
    color: #222;
}

.ctb-pass-item .ctb-pass-item-input input {
    transform: scale(1.2);
}

input[type="radio"] {
    accent-color: #000000;
}

.ctb-pass-button {
    margin-top: 20px;
    padding: 20px;
    text-align: center;
}

.ctb-pass-button a {
    padding: 10px 35px;
    background: #000000;
    border: 1px solid #000000;
    text-align: center;
    text-decoration: none;
    border-radius: 5px;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.5;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fff;
    transition: all 0.4s ease;
}

.ctb-pass-button a:hover {
    background-color: transparent;
    color: #000;
}

/* ================= AUTH SECTION ================= */
.ctb-auth {
    padding: 10px 0px;
}

/* Tabs */
.ctb-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
}

.ctb-tab {
    flex: 1;
    padding: 16px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 18px;
    font-weight: 500;
    color: #9a9a9a;
    position: relative;
    overflow: hidden;
    transition: color 0.35s cubic-bezier(.4,0,.2,1), transform 0.25s ease;
}

.ctb-tab:hover,
.ctb-tab:focus,
.ctb-tab:active {
    color: #000;
    background: transparent !important;
    background-color: transparent !important;
    outline: none !important;
    box-shadow: none !important;
}

.ctb-tab::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 0;
    height: 2px;
    background: #000;
    border-radius: 2px;
    transform: translateX(-50%);
    transition: width 0.35s cubic-bezier(.4,0,.2,1);
}

.ctb-tab.active {
    color: #000;
    font-weight: 600;
}

.ctb-tab.active::after {
    width: 100%;
}

.ctb-tab:active {
    transform: scale(0.97);
}

/* Tab Content */
.ctb-tab-content {
    display: none;
}

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

/* Forms */
.ctb-form {
    padding: 25px 40px !important;
}

/* Form Row - 2 columns */
.ctb-form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 0;
}

.ctb-form-col {
    flex: 1;
}

/* Password warning messages */
.sm-password-warning {
    font-size: 12px;
    padding: 8px 12px;
    border-radius: 4px;
    margin-top: -12px;
    margin-bottom: 15px;
}

.sm-warning-error {
    background: #fff5f5;
    color: #dc3545;
    border: 1px solid #f5c6cb;
}

.sm-warning-success {
    background: #f0fff4;
    color: #28a745;
    border: 1px solid #c3e6cb;
}

.ctb-form label {
    display: block !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #333 !important;
    margin-bottom: 6px !important;
    margin-top: 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

.ctb-form input,
.ctb-form input[type="text"],
.ctb-form input[type="email"],
.ctb-form input[type="password"] {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 14px !important;
    margin-bottom: 18px !important;
    margin-top: 0 !important;
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-family: inherit !important;
    color: #333 !important;
    background: #fff !important;
    box-sizing: border-box !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    height: auto !important;
    line-height: 1.5 !important;
}

.ctb-form input::placeholder {
    color: #999 !important;
    opacity: 1 !important;
}

.ctb-form input:focus,
.ctb-form input[type="text"]:focus,
.ctb-form input[type="email"]:focus,
.ctb-form input[type="password"]:focus {
    outline: none !important;
    border-color: #000 !important;
    box-shadow: none !important;
    background: #fff !important;
}

.ctb-form input:hover {
    border-color: #bbb !important;
}

/* Password field */
.ctb-password {
    position: relative !important;
    overflow-x: hidden !important;
}

.ctb-password input {
    padding-right: 45px !important;
}

.ctb-password .toggle-pass {
    position: absolute !important;
    right: 14px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin-top: -9px !important;
    font-size: 16px !important;
    cursor: pointer !important;
    user-select: none !important;
    z-index: 2 !important;
}

/* Buttons */
.ctb-btn-primary {
    width: 100%;
    padding: 14px;
    background: #000;
    color: #fff;
    border: 1px solid #000;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ctb-btn-primary:hover {
    background: transparent;
    color: #000;
}

.ctb-btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Links */
.ctb-link {
    text-align: center;
    margin-top: 12px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
}

.ctb-link:hover {
    color: #000;
}

/* Messages */
.sm-message {
    padding: 12px 15px;
    margin-bottom: 15px;
    border-radius: 6px;
    font-size: 14px;
}

.sm-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.sm-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Utility */
.hidden {
    display: none !important;
}

.fade {
    animation: fadeIn 0.4s ease;
}

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

/* Off day message */
.off-day {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 18px;
}

/* Responsive */
@media (max-width: 768px) {
    .schedule-wrapper {
        padding: 20px;
        margin: 20px auto;
    }

    .class-item {
        flex-direction: column;
        gap: 15px;
    }

    .class-item .class-flex {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .class-item span.class-time {
        min-width: auto;
    }

    .class-item a.ctb-book-btn {
        width: 100%;
        padding: 10px 20px;
    }

    .ctb-popup-box {
        max-width: 90%;
    }

    .ctb-popup-header {
        padding: 0px 20px;
    }

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

    .ctb-popup-header #ctb-popup-close {
        font-size: 25px;
        padding: 12px;
        padding-top: 3px !important;
        padding-bottom: 6px !important;
    }

    .ctb-form {
        padding: 25px 20px;
    }

    .ctb-form input {
        width: 90%;
    }

    .ctb-password .toggle-pass {
        right: 14px;
    }

    .ctb-pass-item label span {
        font-size: 15px;
    }

    .ctb-pass-item label .ctb-pass-item-input span {
        font-size: 14px;
    }
}

/* Enrolled User Section */
#sm-enrolled-section.hidden {
    display: none;
}

#sm-product-section.hidden {
    display: none;
}

.sm-enrolled-content {
    text-align: center;
    padding: 30px 20px;
}

.sm-enrolled-icon {
    width: 60px;
    height: 60px;
    background: #22c55e;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
    margin: 0 auto 20px;
}

.sm-enrolled-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
}

.sm-enrolled-package {
    font-size: 14px;
    color: #666;
    margin: 0 0 20px 0;
}

.sm-enrolled-stats {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 25px;
}

.sm-enrolled-stat {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 15px 25px;
    min-width: 140px;
}

.sm-enrolled-label {
    display: block;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 5px;
}

.sm-enrolled-value {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #111;
}

.sm-start-learning-btn {
    display: inline-block;
    background: #22c55e !important;
    color: #fff !important;
    padding: 14px 40px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.sm-start-learning-btn:hover {
    background: #16a34a !important;
    transform: translateY(-1px);
}

/* Unavailable/Disabled Slots - Button Only */
.ctb-book-btn.disabled {
    background: #e0e0e0 !important;
    color: #999 !important;
    border-color: #e0e0e0 !important;
    cursor: not-allowed !important;
    pointer-events: none;
}

.ctb-book-btn.disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* Full Slot */
.ctb-book-btn.full {
    background: #fecaca !important;
    color: #dc2626 !important;
    border-color: #fca5a5 !important;
    cursor: not-allowed !important;
    pointer-events: none;
}

.ctb-book-btn.full:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* Closed Slot - booking cutoff passed (less than 1 hour before class) */
.ctb-book-btn.closed {
    background: #e5e5e5 !important;
    color: #999 !important;
    border-color: #ddd !important;
    cursor: not-allowed !important;
    pointer-events: none;
}

.ctb-book-btn.closed:hover {
    transform: none !important;
    box-shadow: none !important;
}

.slot-closed {
    opacity: 0.7;
}

/* Instructor and Level Display - Override existing .class-desc styles */
.class-item .class-desc {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 15px !important;
    flex-wrap: nowrap !important;
    flex: 1 !important;
    text-align: center !important;
}

.slot-instructor,
.slot-level {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 6px 16px !important;
    border-radius: 20px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
}

.slot-instructor {
    background: #dbeafe !important;
    color: #1d4ed8 !important;
}

.slot-instructor svg {
    flex-shrink: 0;
}

/* Level-wise colors */
.slot-level.level-beginner {
    background: #dcfce7 !important;
    color: #15803d !important;
}

.slot-level.level-intermediate {
    background: #fef3c7 !important;
    color: #b45309 !important;
}

.slot-level.level-advance {
    background: #fee2e2 !important;
    color: #dc2626 !important;
}

.slot-level svg {
    flex-shrink: 0;
}

/* Capacity badge */
.slot-capacity {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 6px 14px !important;
    border-radius: 20px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    background: linear-gradient(135deg, #06b6d4, #3b82f6) !important;
    color: #fff !important;
    border: none;
    box-shadow: 0 2px 8px rgba(6, 182, 212, 0.3);
}

.slot-capacity svg {
    flex-shrink: 0;
    opacity: 0.8;
}

.slot-capacity.capacity-full {
    background: linear-gradient(135deg, #fee2e2, #fecaca) !important;
    color: #dc2626 !important;
    border-color: rgba(220, 38, 38, 0.15);
}

.slot-unavailable .slot-capacity {
    background: #f3f4f6 !important;
    color: #9ca3af !important;
    border-color: transparent;
}
