/* =========================================================
   TML TOOLBAR
========================================================= */

.tml-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;

    width: 100%;

    margin: 0 0 28px;
    padding: 0;

    gap: 24px;

    box-sizing: border-box;
}


/* =========================================================
   TOOLBAR LEFT
========================================================= */

.tml-toolbar-left {
    display: flex;
    align-items: center;

    gap: 14px;

    min-width: 0;

    flex: 1 1 auto;
}

.tml-toolbar-heading {
    display: flex;
    align-items: center;

    gap: 12px;

    min-width: 0;
}

.tml-toolbar-title {
    margin: 0;

    padding: 0;

    color: #13294b;

    font-size: 26px;
    font-weight: 700;

    line-height: 1.3;

    white-space: nowrap;
}

.tml-toolbar-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    height: 24px;

    padding: 0 9px;

    border-radius: 50px;

    background: #f3f4f6;

    color: #667085;

    font-size: 11px;
    font-weight: 600;

    line-height: 1;

    white-space: nowrap;
}


/* =========================================================
   RESET FILTER
========================================================= */

.tml-reset-filter {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    height: 32px;

    padding: 0 12px;

    border: 1px solid #e4e7ec;
    border-radius: 7px;

    background: #ffffff;

    color: #667085;

    font-size: 11px;
    font-weight: 600;

    line-height: 1;

    text-decoration: none;

    white-space: nowrap;

    box-sizing: border-box;

    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        color 0.2s ease;
}

.tml-reset-filter:hover {
    border-color: #ff5a16;

    background: #fff7f2;

    color: #ff5a16;
}


/* =========================================================
   TOOLBAR RIGHT
========================================================= */

.tml-toolbar-right {
    display: flex;

    align-items: center;
    justify-content: flex-end;

    gap: 10px;

    flex: 0 0 auto;
}


/* =========================================================
   SEARCH
========================================================= */

.tml-search {
    position: relative;

    display: flex;
    align-items: center;

    width: 230px;
    height: 42px;

    flex: 0 0 230px;
}

.tml-search-input {
    display: block;

    width: 100%;
    height: 42px;

    margin: 0;
    padding: 0 42px 0 14px;

    border: 1px solid #e4e7ec;
    border-radius: 8px;

    outline: none;

    background: #ffffff;

    color: #344054;

    font-family: inherit;
    font-size: 13px;

    line-height: normal;

    box-sizing: border-box;

    appearance: none;
}

.tml-search-input::placeholder {
    color: #98a2b3;
}

.tml-search-input:focus {
    border-color: #ff5a16;

    box-shadow:
        0 0 0 3px rgba(255, 90, 22, 0.10);
}


/* SEARCH BUTTON */

.tml-search-button {
    position: absolute;

    top: 0;
    right: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    margin: 0;
    padding: 0;

    border: 0;

    background: transparent;

    color: #667085;

    font-size: 19px;
    line-height: 1;

    cursor: pointer;

    appearance: none;
}

.tml-search-button:hover {
    color: #ff5a16;
}


/* =========================================================
   SELECT
========================================================= */

.tml-filter,
.tml-sort {
    display: flex;
    align-items: center;

    width: auto;
    min-width: 0;
}

.tml-filter,
.tml-sort {
    position: relative;

    display: flex;
    align-items: center;

    width: auto;
    min-width: 0;
}

.tml-filter select,
.tml-sort select {
    display: block;

    width: 150px;
    height: 42px;

    margin: 0;
    padding: 0 38px 0 13px;

    border: 1px solid #e4e7ec;
    border-radius: 8px;

    outline: none;

    background-color: #ffffff;

    color: #344054;

    font-family: inherit;
    font-size: 12px;

    line-height: 42px;

    box-sizing: border-box;

    cursor: pointer;

    /*
     * Hilangkan arrow bawaan browser
     */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}


/*
 * CUSTOM ARROW
 */

.tml-filter::after,
.tml-sort::after {
    content: "";

    position: absolute;

    top: 50%;
    right: 14px;

    width: 7px;
    height: 7px;

    border-right: 1.5px solid #667085;
    border-bottom: 1.5px solid #667085;

    transform: translateY(-65%) rotate(45deg);

    pointer-events: none;
}


/*
 * FOCUS
 */

.tml-filter select:focus,
.tml-sort select:focus {
    border-color: #ff5a16;

    box-shadow:
        0 0 0 3px rgba(255, 90, 22, 0.10);
}

/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1100px) {

    .tml-toolbar {
        gap: 18px;
    }

    .tml-toolbar-right {
        gap: 8px;
    }

    .tml-search {
        width: 200px;
        flex-basis: 200px;
    }

    .tml-filter select,
    .tml-sort select {
        width: 135px;
    }

}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 900px) {

    .tml-toolbar {
        display: flex;

        flex-direction: column;

        align-items: stretch;

        gap: 18px;
    }

    .tml-toolbar-left {
        width: 100%;

        justify-content: flex-start;

        flex-wrap: wrap;
    }

    .tml-toolbar-right {
        display: grid;

        grid-template-columns:
            minmax(0, 1fr)
            minmax(0, 1fr)
            minmax(0, 1fr);

        width: 100%;

        gap: 10px;
    }

    .tml-search {
        width: 100%;

        flex-basis: auto;
    }

    .tml-filter,
    .tml-sort {
        width: 100%;
    }

    .tml-filter select,
    .tml-sort select {
        width: 100%;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 650px) {

    .tml-toolbar {
        margin-bottom: 22px;
    }

    .tml-toolbar-left {
        display: flex;

        align-items: flex-start;

        flex-direction: column;

        gap: 10px;
    }

    .tml-toolbar-heading {
        width: 100%;
    }

    .tml-toolbar-title {
        font-size: 22px;
    }

    .tml-toolbar-count {
        height: 22px;

        padding: 0 8px;

        font-size: 10px;
    }

    .tml-reset-filter {
        height: 30px;

        font-size: 10px;
    }

    .tml-toolbar-right {
        display: flex;

        flex-direction: column;

        width: 100%;

        gap: 9px;
    }

    .tml-search,
    .tml-filter,
    .tml-sort {
        width: 100%;

        flex-basis: auto;
    }

    .tml-search-input,
    .tml-filter select,
    .tml-sort select {
        width: 100%;
    }

}

/* =========================================================
   FORCE SINGLE SELECT ARROW
========================================================= */

/* Reset wrapper */
.tml-filter,
.tml-sort {
    position: relative !important;

    display: block !important;

    width: 150px !important;
    height: 42px !important;

    margin: 0 !important;
    padding: 0 !important;
}


/* Reset SELECT */
.tml-filter select,
.tml-sort select {
    position: relative !important;

    display: block !important;

    width: 100% !important;
    height: 42px !important;

    margin: 0 !important;

    padding: 0 38px 0 13px !important;

    border: 1px solid #e4e7ec !important;
    border-radius: 8px !important;

    outline: none !important;

    background-color: #ffffff !important;
    background-image: none !important;

    color: #344054 !important;

    font-family: inherit !important;
    font-size: 12px !important;

    line-height: 42px !important;

    box-sizing: border-box !important;

    cursor: pointer !important;

    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
}


/*
 * Hilangkan pseudo element dari theme / Elementor
 */

.tml-filter::before,
.tml-filter::after,
.tml-sort::before,
.tml-sort::after,

.tml-filter select::before,
.tml-filter select::after,
.tml-sort select::before,
.tml-sort select::after {
    content: none !important;

    display: none !important;
}


/*
 * CUSTOM ARROW SATU-SATUNYA
 */

.tml-filter::after,
.tml-sort::after {
    content: "" !important;

    display: block !important;

    position: absolute !important;

    top: 50% !important;
    right: 14px !important;

    width: 7px !important;
    height: 7px !important;

    border: 0 !important;

    border-right: 1.5px solid #667085 !important;
    border-bottom: 1.5px solid #667085 !important;

    background: transparent !important;

    transform:
        translateY(-65%)
        rotate(45deg) !important;

    pointer-events: none !important;

    z-index: 5 !important;
}


/*
 * Desktop / tablet
 */

@media (max-width: 1100px) {

    .tml-filter,
    .tml-sort {
        width: 135px !important;
    }

}


/*
 * Mobile
 */

@media (max-width: 900px) {

    .tml-filter,
    .tml-sort {
        width: 100% !important;
    }

}