/* ========================================
   COURSES PURCHASED PAGE STYLES
   (Same design as Classes for Sale)
======================================== */

#courses-purchased-page {
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
    display: none !important;
    width: 100% !important;
    min-height: 100vh;
}

#courses-purchased-page.active {
    display: block !important;
}

#courses-purchased-page > * {
    width: 100%;
    display: block;
}

/* Header Section */
#courses-purchased-page .courses-section-title {
    text-align: center;
    font-family: 'Poppins', serif;
    font-size: 26px;
    color: #4a5568;
    margin: 20px auto 40px;
    font-weight: 700;
    letter-spacing: 2px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 20px;
}

#courses-purchased-page .courses-section-title:before,
#courses-purchased-page .courses-section-title:after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(to right, transparent, #667eea, transparent);
    margin: 0 20px;
}

#courses-purchased-page .courses-section-title span {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

/* Filter Tabs */
#courses-purchased-page .courses-filter-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    padding: 0 20px 30px;
    max-width: 1200px;
    margin: 0 auto;
}

#courses-purchased-page .filter-tab {
    background: rgba(255, 255, 255, 0.8);
    color: #667eea;
    border: 2px solid #667eea;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

#courses-purchased-page .filter-tab:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

#courses-purchased-page .filter-tab.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: #667eea;
}

/* Loading State */
#courses-purchased-page .loader {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #667eea;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 40px auto;
}

#courses-purchased-page .loading {
    text-align: center;
    color: #667eea;
    font-size: 18px;
    font-weight: 600;
    margin-top: 20px;
}

/* Course Cards (Same as Class Cards) */
#courses-purchased-page .course-card {
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.1);
    position: relative;
    transition: all 0.4s ease;
    border: 1px solid rgba(102, 126, 234, 0.1);
    overflow: hidden;
}

#courses-purchased-page .course-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
}

#courses-purchased-page .course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.2);
}

/* Card Header */
#courses-purchased-page .card-header {
    padding: 25px 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
}

#courses-purchased-page .card-header h2 {
    font-family: 'Poppins', serif;
    color: #4a5568;
    margin: 0;
    font-size: 18px;
    transition: color 0.3s ease;
    font-weight: 600;
    letter-spacing: 0.5px;
    flex: 1;
}

#courses-purchased-page .card-header .course-category {
    font-size: 13px;
    color: #718096;
    font-weight: 500;
    margin-top: 5px;
}

#courses-purchased-page .card-header:hover h2 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#courses-purchased-page .toggle-icon {
    color: #667eea;
    font-size: 18px;
    transition: transform 0.4s ease;
    margin-left: 15px;
}

#courses-purchased-page .card-expanded .toggle-icon {
    transform: rotate(180deg);
}

/* Card Body */
#courses-purchased-page .card-body {
    display: none;
    padding: 30px 35px;
    background: rgba(255,255,255,0.7);
}

#courses-purchased-page .card-expanded .card-body {
    display: block;
    animation: slideDown 0.4s ease;
}

/* Course Description */
#courses-purchased-page .course-description {
    background: rgba(102, 126, 234, 0.05);
    padding: 15px 20px;
    border-radius: 12px;
    border-left: 4px solid #667eea;
    margin-bottom: 25px;
    color: #4a5568;
    font-size: 14px;
    line-height: 1.6;
}

/* Day Buttons Grid */
#courses-purchased-page .course-days-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

#courses-purchased-page .day-button {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 18px 15px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}

#courses-purchased-page .day-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

#courses-purchased-page .day-button:active {
    transform: translateY(-1px);
}

#courses-purchased-page .day-button .day-number {
    font-size: 13px;
    opacity: 0.9;
    font-weight: 500;
}

#courses-purchased-page .day-button .day-title {
    font-size: 12px;
    opacity: 0.85;
    text-align: center;
    line-height: 1.3;
}

/* Coming Soon Status */
#courses-purchased-page .course-status-badge {
    display: inline-block;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#courses-purchased-page .status-active {
    background: #d4edda;
    color: #155724;
}

#courses-purchased-page .status-coming-soon {
    background: #fff3cd;
    color: #856404;
}

#courses-purchased-page .status-inactive {
    background: #f8d7da;
    color: #721c24;
}

/* No Courses Message */
#courses-purchased-page .no-courses {
    text-align: center;
    padding: 60px 20px;
    color: #718096;
    font-size: 18px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin: 20px;
}

#courses-purchased-page .no-courses i {
    font-size: 60px;
    color: #667eea;
    margin-bottom: 20px;
    display: block;
}

#courses-purchased-page .no-courses h3 {
    color: #4a5568;
    margin-bottom: 15px;
    font-size: 24px;
}

#courses-purchased-page .no-courses p {
    color: #718096;
    font-size: 16px;
    line-height: 1.6;
}

/* Course Progress Info */
#courses-purchased-page .course-progress {
    background: rgba(102, 126, 234, 0.07);
    padding: 12px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#courses-purchased-page .progress-text {
    color: #4a5568;
    font-size: 14px;
    font-weight: 600;
}

#courses-purchased-page .progress-days {
    color: #667eea;
    font-size: 14px;
    font-weight: 700;
}

/* Collapsible content for grouped courses */
#courses-purchased-page .collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

#courses-purchased-page .collapsible-content.show {
    max-height: 3000px;
    overflow: visible;
}

#courses-purchased-page .dropdown-icon {
    transition: transform 0.3s ease;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #courses-purchased-page .courses-section-title {
        font-size: 20px;
        padding: 15px 10px;
    }
    
    #courses-purchased-page .courses-section-title:before,
    #courses-purchased-page .courses-section-title:after {
        margin: 0 10px;
    }
    
    #courses-purchased-page .course-days-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 10px;
    }
    
    #courses-purchased-page .day-button {
        padding: 15px 10px;
        font-size: 13px;
    }
    
    #courses-purchased-page .card-header {
        padding: 20px 15px;
    }
    
    #courses-purchased-page .card-header h2 {
        font-size: 16px;
    }
    
    #courses-purchased-page .card-body {
        padding: 20px 15px;
    }
    
    #courses-purchased-page .courses-filter-tabs {
        padding: 0 10px 20px;
    }
    
    #courses-purchased-page .filter-tab {
        padding: 8px 15px;
        font-size: 12px;
    }
    
    /* Mobile styles for grouped courses */
    #courses-purchased-page .class-card {
        margin-bottom: 20px;
    }
    
    #courses-purchased-page .card-header h2 {
        font-size: 15px;
    }
    
    /* Course count badge mobile */
    #courses-purchased-page .card-header > div:last-of-type {
        font-size: 11px;
        padding: 5px 10px;
    }
    
    /* Individual course items in group - mobile */
    #courses-purchased-page .collapsible-content {
        font-size: 13px;
    }
    
    /* Course title in group - mobile */
    #courses-purchased-page .card-body h3 {
        font-size: 15px;
    }
    
    /* Quick info icons - mobile */
    #courses-purchased-page .card-body .quick-info {
        flex-direction: column;
        gap: 8px;
        font-size: 12px;
    }
    
    /* Day buttons in collapsed courses - mobile */
    #courses-purchased-page .card-body button {
        font-size: 12px;
        padding: 10px 8px;
    }
    
    /* Course item in group - mobile specific */
    #courses-purchased-page .course-item-in-group {
        padding: 15px;
        margin-bottom: 12px;
    }
    
    /* Course item title - stack on mobile */
    #courses-purchased-page .course-item-in-group h3 {
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    /* Quick info - stack vertically on mobile */
    #courses-purchased-page .course-item-in-group > div:first-child > div:first-child > div:last-child {
        display: flex;
        flex-direction: column;
        gap: 6px;
        font-size: 11px;
    }
    
    /* Days grid in course item - 2 columns on mobile */
    #courses-purchased-page .collapsible-content > div:last-child {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
    
    /* Expiry info box - mobile */
    #courses-purchased-page .collapsible-content > div:first-child {
        padding: 10px 12px;
        font-size: 12px;
    }
}
