/**
 * Training Courses CSS
 * Extracted from tc/training_and_support/training_courses.php
 */

@font-face {
    font-family: 'Font Awesome 6 Free';
    src: url('../css/webfonts/fa-solid-900.woff2') format('woff2'),
        url('../css/webfonts/fa-solid-900.woff2') format('truetype');
}

.collapsible {
    background-color: #FFF;
    border: 1px solid #ccc;
    color: #000 !important;
    cursor: pointer;
    padding: 4px 8px;
    margin: 5px 0px 5px 0px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 18px;
    position: relative;
}

.collapsible::after {
    font-family: "Font Awesome 6 Free";
    content: '\f107';
    font-size: 12px;
    position: absolute;
    right: 10px;
    top: 14px;
}

.collapsible.active::after {
    font-family: "Font Awesome 6 Free";
    content: '\f106';
}

.month_dropdown {
    position: relative;
}

.month_dropdown select {
    background-color: #FFF;
    border: 1px solid #ccc;
    color: #000;
    cursor: pointer;
    padding: 10px;
    padding-right: 30px;
    margin: 5px 0px 5px 0px;
    width: 100%;
    text-align: left;
    outline: none;
    font-size: 22px;
    line-height: normal;
    height: auto;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

#month-single-select::after {
    font-family: "Font Awesome 6 Free";
    content: '\f107';
    font-size: 12px;
    position: absolute;
    right: 10px;
    top: 16px;
    pointer-events: none;
    color: #000;
}

#month-single-select.active::after {
    font-family: "Font Awesome 6 Free";
    content: '\f106';
}

.month-select-mobile {
    background-color: #FFF;
    border: 1px solid #ccc;
    color: #000;
    cursor: pointer;
    padding: 10px;
    width: 100%;
    text-align: left;
    outline: none;
    font-size: 18px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.collapsible_mobile {
    background-color: #FFF;
    border: 1px solid #ccc;
    color: #000;
    cursor: pointer;
    padding: 10px;
    margin: 5px 0px 5px 0px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 18px;
    position: relative;
    display:flex;
}

.collapsible_mobile::after {
    font-family: "Font Awesome 6 Free";
    content: '\f107';
    font-size: 12px;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    /* Ensures the icon is at the end and vertically centered */
}

.collapsible_mobile.active::after {
    font-family: "Font Awesome 6 Free";
    content: '\f106';
}

.c-content, .month-content, .ea-content{
    padding: 0 18px;
}

.content {
    /* padding: 0 18px; */
    display: none;
    border: 1px solid #ccc;
    overflow: hidden;
    background-color: #fff;
}

.content-item {
    padding: 10px;
    display: none;
    border: 1px solid #ccc;
    background-color: #fff;
    margin-top: 5px;
}

.show {
    display: block;
}

.search-btn {
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #1d6df7;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.search-btn:hover {
    background-color: #1E30F7;
}

.menu-filter-label-container {
    margin-bottom: 5px;
}

.menu-filter-label {
    display: inline-block;
    margin-left: 8px;
    line-height: 1.5;
    text-align: left;
    white-space: pre-wrap;
}

@media (max-width: 375px) {
    .menu-filter-label {
        font-size: 0.8em;
    }
}

@media (max-width: 390px) {
    .menu-filter-label {
        font-size: 0.85em;
    }
}

.switch-btn {
    display: inline-block;
    padding: 10px 15px;
    margin: 0 10px;
    font-size: 16px;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.3s ease;
    border: none;
}

.switch-btn-basic:hover {
    background-color: #C8320A;
}

.switch-btn-advanced:hover {
    background-color: #250F8A;
}

.switch-btn-none:hover {
    background-color: #258001;
}

.switch-btn:hover {
    transform: scale(1.05);
}

.switch-btn-advanced {
    background-color: #250F8A;
}

.switch-btn-basic {
    background-color: #C8320A;
}

.switch-btn-none {
    background-color: #258001;
}

.switch-btn-advanced:hover,
.switch-btn-advanced.active-a {
    background-color: #250F8A;
    box-shadow: 0 0 0 6px #fff, 0 0 0 10px #250F8A;
    transform: scale(1.05);
}

.switch-btn-basic:hover,
.switch-btn-basic.active-b {
    background-color: #C8320A;
    box-shadow: 0 0 0 6px #fff, 0 0 0 10px #C8320A;
    transform: scale(1.05);
}

.switch-btn-none:hover,
.switch-btn-none.active-n {
    background-color: #258001;
    box-shadow: 0 0 0 6px #fff, 0 0 0 10px #258001;
    transform: scale(1.05);
}

.switch_categlory {
    margin: 5px;
}

.switch_categlory>img {
    height: 32px;
    padding-right: 10px;
    vertical-align: text-top;
}

@media (max-width: 590px) {
    .switch_categlory {
        padding: 10px 0;
    }

    .switch_button {
        display: inline-block;
        padding-top: 20px
    }
}

.category_dropdown {
    width: 100%;
}

.dropdown_district .content {
    position: absolute !important;
    z-index: 9999 !important;
    background: white;
    border: 1px solid #ccc;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    /* width: max-content; */
}

.category_dropdown,
.dropdown_district,
.ea_dropdown {
    position: relative;
}

.div_classroom_course {
    overflow: visible !important;
}

.div_classroom_course>.left {
    overflow: visible !important;
}

.div_classroom_course>.right {
    overflow: visible !important;
}

.swipe {
    display: none;
}

@media (max-width: 767px) {
    .swipe {
        display: block;
    }

    .remark {
        display: none;
    }
}

/**
 * Training Courses Compatibility CSS
 * Overrides for shared filter components to match original design
 */

/* Hide the filter header from shared component as we have our own */
#filterSection_dt .filter_header,
#filterSection_mb .filter_header {
    display: none;
}

/* Adjust filter section container - make it behave as a single flex item */
#filterSection_dt,
#filterSection_mb {
    width: 100%;
    border: none;
    margin: 0;
    padding: 0;
    background: transparent;
    display: block; /* Block level to take full width */
    flex: 1 1 100%; /* Allow it to grow/shrink as flex item */
}

#filterSection_dt .filter-grid,
#filterSection_mb .filter-grid {
    margin: 0;
    gap: 0;
    display: block; /* Simple block layout */
    width: 100%;
}

#filterSection_dt .filter-item,
#filterSection_mb .filter-item {
    padding: 0;
    width: 100%;
    display: block; /* Simple block layout */
    margin: 0;
}

/* Make dropdown_district fit within the flex layout */
#filterSection_dt .dropdown_district,
#filterSection_mb .dropdown_district {
    width: 100%;
    display: block;
    position: relative; /* For absolute positioning of dropdown content */
}

/* Hide labels if original design didn't have them or used different ones */
/* Original had "Region: HK" etc. on buttons? No, just "HK", "Kowloon" */
/* Shared component has a label "District:" above the dropdown */
/* We might want to hide the label to match 100% or keep it for better UX */
/* The user said "Exact visual appearance". Original had NO label above the buttons. */
/* But shared component puts label above. */
#filterSection_dt .filter-label,
#filterSection_mb .filter-label {
    display: none; 
}

/* Style the dropdown button to match original .collapsible */
#filterSection_dt .dropdown_district button.collapsible,
#filterSection_mb .dropdown_district button.collapsible {
    /* Inherit styles from training_courses.css .collapsible */
    /* We need to ensure specific overrides if shared css is stronger */
    background-color: #FFF;
    border: 1px solid #ccc;
    color: #000;
    /* padding: 10px; */
    margin: 5px 0px 5px 0px;
    font-size: 22px !important; /* Match original training courses style */
    font-weight: normal;
    text-align: left;
    height: auto;
    min-height: auto;
    width: 100%;
}

/* Arrow icon */
#filterSection_dt .dropdown_district button.collapsible::after,
#filterSection_mb .dropdown_district button.collapsible::after {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    content: '\f107';
    font-size: 12px;
    right: 10px;
    top: 14px; /* Align with original */
    transform: none; /* Reset shared rotation */
}

#filterSection_dt .dropdown_district button.collapsible[aria-expanded="true"]::after,
#filterSection_mb .dropdown_district button.collapsible[aria-expanded="true"]::after {
    content: '\f106';
    transform: none;
}

/* Dropdown Content */
#filterSection_dt .dropdown_district .content,
#filterSection_mb .dropdown_district .content {
    border: 1px solid #ccc;
    /* padding: 0 18px; */
    margin-top: 0;
    box-shadow: none; /* Original didn't have shadow? css says no shadow in .content */
    /* training_courses.css .content has no shadow, but .category_dropdown .content has shadow */
    /* Let's match .category_dropdown .content */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: none;
    position: absolute;
    z-index: 9999;
}

/* Mobile specific adjustments */
@media (max-width: 590px) {
    #filterSection_mb .dropdown_district .content {
        position: relative; /* Mobile usually pushes content down? */
        /* Original mobile .content was display:none/block, relative position? */
        /* .collapsible_mobile + .content */
        /* Let's check training_courses.css */
        /* .content { position: absolute ... } is for dropdowns */
        /* But mobile flow usually expands. */
    }
}

/* Hide Search/Reset buttons from shared component */
#filterSection_dt .filter-row-buttons,
#filterSection_mb .filter-row-buttons {
    display: none;
}


/* Search and Reset Buttons - Shared Dimensions */
#searchBtn,
#courseRightResetBtn {
    font-size: 22px;
    padding: 10px 20px;
    border: 1px solid #ccc;
    /* border-radius: 5px; */
    cursor: pointer;
    min-width: min(202px, 100%);
    height: auto;
    white-space: nowrap;
}

/* Search Button Specifics (Blue) */
#searchBtn {
    background-color: #1d6df7;
    color: white;
    border: none;
}

#searchBtn:hover {
    background-color: #1E30F7;
}

/* Reset Button Specifics (White/Grey) */
#courseRightResetBtn {
    background: #fff;
    color: #333;
}

#courseRightResetBtn:hover {
    background-color: #eee;
}
