/**
 * FlexManager Mobile Styles - Based on Screenshots
 * Mobile-specific overrides and enhancements
 * Version: 1.0.0
 */

/* Mobile Container */
.mobile_lesdata_div {
    background-color: var(--flexmanager-white);
    border-radius: 12px;
    padding: 10px;
    margin: 20px 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

/* Mobile Alert */
.alert_mobile_lesdata_not_selected {
    color: var(--flexmanager-error);
    text-align: center;
    padding: 15px;
    background-color: rgba(255, 0, 0, 0.1);
    border: 1px solid var(--flexmanager-error);
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.4;
}

.mobile_lesdata_not_selected > .elementor-widget-container {
    border-color: var(--flexmanager-error);
    border-width: 2px;
    box-shadow: 0px 0px 12px 2px rgba(255, 0, 0, 0.3);
    border-radius: 12px;
}

/* Mobile Step Containers */
.mobile-table-content {
    margin-bottom: 20px;
}

.mobile-table-content:last-child {
    margin-bottom: 0;
}

/* Mobile Step Labels */
.mobile-table-content p {
    color: var(--flexmanager-secondary);
    font-family: "Poppins", Sans-serif;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 10px;
    line-height: 1.3;
}

/* Mobile Select Boxes - Matching Screenshot Style */
.select-box {
    position: relative;
    width: 100%;
}

.mobile_lesdata_div select,
.product_lesdata_filter_mobile .elementor-shortcode select {
    width: 100%;
    font-family: "Poppins", Sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--flexmanager-white);
    background-color: var(--flexmanager-primary);
    border: 0;
    padding: 16px 20px;
    border-radius: 8px;
    height: auto;
    background-image: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile_lesdata_div select:focus,
.product_lesdata_filter_mobile .elementor-shortcode select:focus {
    outline: 2px solid var(--flexmanager-secondary);
    outline-offset: 2px;
}

.mobile_lesdata_div select option,
.product_lesdata_filter_mobile .elementor-shortcode select option {
    background-color: var(--flexmanager-white);
    color: var(--flexmanager-text);
    padding: 10px;
    font-size: 16px;
}

/* Custom Dropdown Arrow */
.select-box::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid var(--flexmanager-white);
    pointer-events: none;
    transition: transform 0.2s ease;
}

.select-box.open::after {
    transform: translateY(-50%) rotate(180deg);
}

/* Disabled State for Mobile Selects */
.mobile_location_not_selected {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

/* Mobile Lesson Results Table */
table#table_lesson_mobile {
    width: 100%;
    border: none !important;
    margin-top: 25px;
    background-color: transparent;
}

table#table_lesson_mobile td {
    border: none !important;
    padding: 0 !important;
    background-color: transparent !important;
}

/* Mobile Month Headers */
table#table_lesson_mobile .month-header {
    background-color: var(--flexmanager-primary);
    color: var(--flexmanager-white);
    font-family: "Poppins", Sans-serif;
    font-size: 18px;
    font-weight: 600;
    padding: 15px 20px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 15px;
    display: block;
}

/* Mobile Lesson List */
table#table_lesson_mobile ul {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
}

table#table_lesson_mobile ul li {
    margin-bottom: 8px;
    background-color: var(--flexmanager-white);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

/* Mobile Lesson Row Grid - Based on Screenshot */
table#table_lesson_mobile ul table.date-year-month tr {
    display: grid;
    grid-template-columns: 60px 1fr 100px;
    gap: 10px;
    align-items: center;
    padding: 12px 15px;
    margin: 0;
    border: none;
}

table#table_lesson_mobile ul table.date-year-month {
    width: 100%;
    border: none !important;
    margin: 0;
    background-color: transparent;
}

table#table_lesson_mobile ul table tr td {
    padding: 0 !important;
    margin: 0;
    border: none !important;
    background-color: transparent !important;
    font-size: 14px;
    line-height: 1.3;
}

/* Mobile Lesson Number Styling */
table#table_lesson_mobile ul table tr td:first-child {
    color: var(--flexmanager-primary);
    font-weight: 600;
    font-size: 13px;
}

/* Mobile Lesson Date/Day Styling */
table#table_lesson_mobile ul table tr td:nth-child(2) {
    color: var(--flexmanager-text);
    font-weight: 400;
}

/* Mobile Lesson Time Styling */
table#table_lesson_mobile ul table tr td:last-child {
    color: var(--flexmanager-text-muted);
    font-family: "Roboto Mono", monospace;
    font-size: 13px;
    text-align: right;
}

/* Mobile Spinner */
td#mobile_table_lesson_spinner {
    text-align: center;
    padding: 20px !important;
    color: var(--flexmanager-primary);
    font-size: 14px;
    background-color: var(--flexmanager-bg-light);
    border-radius: 8px;
}

/* Mobile Step Flow Styling */
.mobile-table-content:nth-child(1) {
    /* Step 1: Location */
    border-bottom: 1px solid var(--flexmanager-border);
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.mobile-table-content:nth-child(2) {
    /* Step 2: Month */
    border-bottom: 1px solid var(--flexmanager-border);
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.mobile-table-content:nth-child(3) {
    /* Step 3: Day */
    margin-bottom: 25px;
}

/* Mobile Progressive Disclosure */
.mobile-table-content.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.mobile-table-content.disabled p {
    color: var(--flexmanager-text-muted);
}

.mobile-table-content.disabled select {
    background-color: var(--flexsuite-text-muted, #718096);
    cursor: not-allowed;
}

/* Mobile Responsive Breakpoints */
@media screen and (max-width: 480px) {
    .mobile_lesdata_div {
        padding: 15px;
        margin: 15px 0;
    }
    
    .mobile-table-content p {
        font-size: 15px;
    }
    
    .mobile_lesdata_div select {
        padding: 14px 18px;
        font-size: 15px;
    }
    
    table#table_lesson_mobile ul table.date-year-month tr {
        grid-template-columns: 50px 1fr 85px;
        gap: 8px;
        padding: 10px 12px;
    }
    
    table#table_lesson_mobile ul table tr td {
        font-size: 13px;
    }
    
    table#table_lesson_mobile ul table tr td:last-child {
        font-size: 12px;
    }
}

@media screen and (max-width: 360px) {
    .mobile_lesdata_div {
        padding: 12px;
    }
    
    .mobile_lesdata_div select {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    table#table_lesson_mobile ul table.date-year-month tr {
        grid-template-columns: 45px 1fr 80px;
        gap: 6px;
        padding: 8px 10px;
    }
}

/* Hide Desktop Elements on Mobile */
@media screen and (max-width: 767px) {
    .product_lesdata_filter_desktop,
    .location_lesdata_div {
        display: none !important;
    }
    
    /* Show mobile interface */
    .product_lesdata_filter_mobile {
        display: block !important;
    }
}

/* Ensure Mobile Interface is Hidden on Desktop */
@media screen and (min-width: 768px) {
    .product_lesdata_filter_mobile,
    .mobile_lesdata_div,
    table#table_lesson_mobile {
        display: none !important;
    }
}

/* Mobile-Specific Animations */
.mobile_lesdata_div select {
    transition: all 0.3s ease;
}

.mobile_lesdata_div select:hover:not(:disabled) {
    background-color: var(--flexsuite-primary, #1E55B3);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 114, 176, 0.3);
}

.mobile_lesdata_div select:active {
    transform: translateY(0);
}

/* Mobile Lesson List Animation */
table#table_lesson_mobile ul li {
    animation: slideInUp 0.3s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

table#table_lesson_mobile ul li:nth-child(1) { animation-delay: 0.1s; }
table#table_lesson_mobile ul li:nth-child(2) { animation-delay: 0.2s; }
table#table_lesson_mobile ul li:nth-child(3) { animation-delay: 0.3s; }
table#table_lesson_mobile ul li:nth-child(4) { animation-delay: 0.4s; }
table#table_lesson_mobile ul li:nth-child(5) { animation-delay: 0.5s; }
table#table_lesson_mobile ul li:nth-child(6) { animation-delay: 0.6s; }
table#table_lesson_mobile ul li:nth-child(7) { animation-delay: 0.7s; }
table#table_lesson_mobile ul li:nth-child(8) { animation-delay: 0.8s; }

@keyframes slideInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}










