/* Schedule Page Styles */

/* Filter Section */
.schedule-filter-area {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8eef5 100%);
    padding: 40px 0;
    position: relative;
    z-index: 1;
}

.filter-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: visible;
    position: relative;
    z-index: 10;
}

.filter-header {
    background: linear-gradient(135deg, #002147 0%, #003d7a 100%);
    color: #ffffff;
    padding: 20px 30px;
    text-align: center;
    border-radius: 20px 20px 0 0;
}

.filter-header h3 {
    margin: 0 0 5px;
    font-size: 24px;
    font-weight: 700;
}

.filter-header h3 i {
    margin-right: 10px;
    color: #FFB707;
}

.filter-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
}

.filter-body {
    padding: 30px;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group label {
    display: block;
    font-weight: 600;
    color: #002147;
    margin-bottom: 8px;
    font-size: 14px;
}

.filter-group label i {
    margin-right: 8px;
    color: #FFB707;
    width: 16px;
}

.filter-group select,
.filter-group input[type="text"] {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #e8eef5;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #ffffff;
    position: relative;
    z-index: 1;
}

.filter-group select:focus,
.filter-group input[type="text"]:focus {
    border-color: #FFB707;
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 183, 7, 0.1);
}

/* iOS-style Toggle Switch */
.checkbox-group {
    display: block;
    padding-top: 28px;
}

.toggle-label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    margin: 0;
    font-weight: 600;
    color: #002147;
    gap: 12px;
    position: relative;
}

/* Hide the default checkbox */
.toggle-label input[type="checkbox"] {
    position: absolute;
    left: -9999px;
    opacity: 0;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    background-color: #e0e0e0;
    border-radius: 13px;
    transition: background-color 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.toggle-slider {
    position: absolute;
    width: 22px;
    height: 22px;
    background-color: #ffffff;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-text {
    font-size: 14px;
    color: #333;
    white-space: normal;
    flex: 1;
}

/* Checked state - using attribute selector for reliability */
.toggle-label input[type="checkbox"]:checked ~ .toggle-switch {
    background: linear-gradient(to right, #FFB707, #FBDD95) !important;
}

.toggle-label input[type="checkbox"]:checked ~ .toggle-switch .toggle-slider {
    left: 26px !important;
}

/* Alternative class-based approach for JavaScript */
.toggle-switch.active {
    background: linear-gradient(to right, #FFB707, #FBDD95) !important;
}

.toggle-switch.active .toggle-slider {
    left: 26px !important;
}

.filter-footer {
    padding: 0 30px 25px;
    text-align: center;
}

.filter-footer .btn {
    padding: 12px 40px;
    font-size: 15px;
}

/* Lesson Cards */
.schedule-grid-area {
    padding: 60px 0;
}

.schedule-grid-area .row {
    display: flex;
    flex-wrap: wrap;
}

.schedule-grid-area .row > [class*='col-'] {
    display: flex;
    flex-direction: column;
}

.lesson-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

/* Subject Badge on lesson card */
.lesson-subject-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
}

.lesson-card:hover .lesson-subject-badge {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.lesson-subject-badge i {
    font-size: 18px;
    color: #ffffff;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.lesson-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    border-color: #FFB707;
}

.lesson-card.no-seats {
    opacity: 0.7;
    background: #f8f9fa;
}

.lesson-header {
    background: linear-gradient(135deg, #002147 0%, #003d7a 100%);
    color: #ffffff;
    padding: 25px;
    flex-shrink: 0;
}

.lesson-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.lesson-badges .badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.badge-success {
    background: #28a745;
    color: #ffffff;
}

.badge-danger {
    background: #dc3545;
    color: #ffffff;
}

.badge-info {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.lesson-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 12px;
    color: #ffffff;
}

.lesson-time {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    opacity: 0.95;
}

.lesson-time i {
    color: #FFB707;
}

.lesson-body {
    padding: 25px;
    flex-grow: 1;
}

.lesson-info-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #555;
}

.lesson-info-row i {
    color: #FFB707;
    width: 16px;
    margin-top: 2px;
    flex-shrink: 0;
}

.lesson-info-row a {
    color: #002147;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.lesson-info-row a:hover {
    color: #FFB707;
}

.lesson-description {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e8eef5;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.lesson-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    background: #f8f9fa;
    border-top: 1px solid #e8eef5;
    flex-shrink: 0;
    margin-top: auto;
}

.lesson-price {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.price-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.price-value {
    font-size: 24px;
    font-weight: 700;
    color: #002147;
}

.price-value small {
    font-size: 14px;
    font-weight: 400;
    color: #666;
}

.lesson-action .btn {
    white-space: nowrap;
}

/* Pagination Styles */
.pagination-wrapper {
    margin-top: 50px;
    margin-bottom: 30px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-bottom: 20px;
}

.pagination .page-item {
    list-style: none;
}

.pagination .page-link {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 2px solid #e8eef5;
    background: #ffffff;
    color: #002147;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    padding: 8px 12px;
}

.pagination .page-link:hover {
    background: linear-gradient(to right, #FFB707, #FBDD95);
    border-color: #FFB707;
    color: #002147;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 183, 7, 0.3);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(to right, #002147, #003d7a);
    border-color: #002147;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 33, 71, 0.3);
}

.pagination .page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    margin-top: 15px;
}

.pagination-info p {
    color: #666;
    font-size: 14px;
    margin: 0;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 991px) {
    .filter-body {
        padding: 25px 20px;
    }
    
    .filter-group {
        margin-bottom: 18px;
    }
}

@media (max-width: 767px) {
    .schedule-filter-area {
        padding: 30px 0;
    }
    
    .filter-header {
        padding: 18px 20px;
    }
    
    .filter-header h3 {
        font-size: 20px;
    }
    
    .filter-body {
        padding: 20px 15px;
    }
    
    .checkbox-group {
        padding-top: 0;
        margin-top: 15px;
        width: 100%;
    }
    
    .toggle-label {
        width: 100%;
        justify-content: flex-start;
    }
    
    .toggle-text {
        flex: 1;
        word-wrap: break-word;
    }
    
    /* Mobile lesson cards - full width */
    .schedule-grid-area {
        padding: 40px 0;
    }
    
    .schedule-grid-area .row > [class*='col-'] {
        width: 100%;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .lesson-card {
        margin-bottom: 20px;
        width: 100%;
    }
    
    /* Subject badge on mobile */
    .lesson-subject-badge {
        width: 35px;
        height: 35px;
        top: 12px;
        right: 12px;
        border-radius: 8px;
    }
    
    .lesson-subject-badge i {
        font-size: 16px;
    }
    
    .lesson-header {
        padding: 20px;
    }
    
    .lesson-title {
        font-size: 18px;
    }
    
    .lesson-body {
        padding: 20px;
    }
    
    .lesson-footer {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .lesson-price {
        align-items: center;
    }
    
    .lesson-action {
        width: 100%;
    }
    
    .lesson-action .btn {
        width: 100%;
    }
    
    /* Mobile pagination */
    .pagination-wrapper {
        margin-top: 30px;
    }
    
    .pagination .page-link {
        min-width: 35px;
        height: 35px;
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .pagination-info p {
        font-size: 13px;
    }
}

