.trs-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 1005;
    background: #fff;
    border: 1px solid #ededed;
    border-radius: 4px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, .14);
    overflow: hidden;
}

.trs-dropdown.is-visible {
    display: block;
}

.trs-dropdown:before {
    content: "";
    position: absolute;
    top: -7px;
    left: 18px;
    border-style: solid;
    border-width: 0 7px 8px 7px;
    border-color: transparent transparent #ffffff transparent;
}

.trs-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-bottom: 1px solid #f0f0f0;
    background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
}

.trs-title {
    color: #333;
    font-size: 14px;
    font-weight: bold;
}

.trs-title i {
    color: #f36c32;
    margin-right: 7px;
}

.trs-clear {
    border: 0;
    background: transparent;
    color: #999;
    font-size: 12px;
    padding: 0;
    outline: none;
}

.trs-clear:hover {
    color: #dd4b39;
}

.trs-list {
    max-height: 265px;
    overflow-y: auto;
    padding: 5px;
}

.trs-list::-webkit-scrollbar,
.trs-sidebar-list::-webkit-scrollbar {
    width: 6px;
}

.trs-list::-webkit-scrollbar-track,
.trs-sidebar-list::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 10px;
}

.trs-list::-webkit-scrollbar-thumb,
.trs-sidebar-list::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 10px;
}

.trs-list::-webkit-scrollbar-thumb:hover,
.trs-sidebar-list::-webkit-scrollbar-thumb:hover {
    background: #b0b0b0;
}

.trs-item {
    display: flex;
    align-items: center;
    border-radius: 3px;
    overflow: hidden;
}

.trs-item:hover {
    background: #fafafa;
}

.trs-query {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    color: #333;
    padding: 9px 8px;
    text-align: left;
    outline: none;
    display: flex;
    align-items: center;
    gap: 9px;
}

.trs-query:hover {
    color: #dd4b39;
}

.trs-query-icon {
    width: 24px;
    height: 24px;
    min-width: 24px;
    border-radius: 50%;
    background: #fff1eb;
    color: #f36c32;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.trs-query-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trs-remove {
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    color: #bbb;
    outline: none;
}

.trs-remove:hover {
    color: #dd4b39;
}

.trs-empty {
    text-align: center;
    padding: 22px 15px;
    color: #777;
}

.trs-empty-icon {
    width: 42px;
    height: 42px;
    margin: 0 auto 10px;
    border-radius: 50%;
    background: #fff1eb;
    color: #f36c32;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.trs-empty-title {
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
}

.trs-empty-text {
    font-size: 12px;
    line-height: 17px;
}

.trs-sidebar-box {
    display: block !important;
    margin-top: 14px;
    margin-bottom: 20px;
    background: #ffffff;
    border: 0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(18, 24, 40, 0.08);
}

.trs-sidebar-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 16px 12px;
    background: #ffffff;
    border-bottom: 1px solid #f1f3f7;
}

.trs-sidebar-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.2;
    margin: 0;
}

.trs-sidebar-title i {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    background: #fff1eb;
    color: #f36c32;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0;
    font-size: 13px;
}

.trs-sidebar-subtitle {
    margin-top: 6px;
    color: #8a94a6;
    font-size: 13px;
    line-height: 1.45;
}

.trs-sidebar-clear {
    border: 0;
    background: #fff3ed;
    color: #f36c32;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    outline: none;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.trs-sidebar-clear:hover {
    background: #f36c32;
    color: #ffffff;
}

.trs-sidebar-list {
    max-height: 430px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    padding: 9px;
    background: #ffffff;
}

.trs-sidebar-list::-webkit-scrollbar {
    width: 6px;
}

.trs-sidebar-list::-webkit-scrollbar-track {
    background: transparent;
}

.trs-sidebar-list::-webkit-scrollbar-thumb {
    background: #d7dce5;
    border-radius: 20px;
}

.trs-sidebar-list::-webkit-scrollbar-thumb:hover {
    background: #b9c0cc;
}

.trs-sidebar-item {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 7px;
    padding: 0;
    background: #ffffff;
    border: 1px solid #eef1f5;
    border-radius: 11px;
    transition: all 0.2s ease;
}

.trs-sidebar-item:hover {
    background: #fafbfc;
    border-color: #e3e8ef;
    box-shadow: 0 4px 12px rgba(18, 24, 40, 0.05);
}

.trs-sidebar-query {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    color: #222b38;
    padding: 10px 7px 10px 10px;
    text-align: left;
    outline: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    line-height: 1.3;
    min-height: 44px;
}

.trs-sidebar-query span:last-child {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trs-sidebar-query:hover {
    color: #f36c32;
}

.trs-sidebar-icon {
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 50%;
    background: #fff3ed;
    color: #f36c32;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.trs-sidebar-remove {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border: 0;
    background: transparent;
    color: #b5bcc8;
    outline: none;
    border-radius: 10px;
    transition: all 0.2s ease;
    margin-right: 3px;
}

.trs-sidebar-remove:hover {
    background: #fff3ed;
    color: #f36c32;
}

.trs-sidebar-empty {
    text-align: center;
    padding: 42px 20px;
    color: #6b7280;
    background: #ffffff;
}

.trs-sidebar-empty-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: #fff3ed;
    color: #f36c32;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.trs-sidebar-empty-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 7px;
}

.trs-sidebar-empty-text {
    font-size: 13px;
    line-height: 1.5;
    color: #8a94a6;
}

@media (max-width: 991px) {
    .trs-sidebar-box {
        display: block !important;
        margin-top: 14px !important;
        margin-bottom: 18px !important;
        border-radius: 13px !important;
        background: #ffffff;
        overflow: hidden !important;
        box-shadow: 0 8px 22px rgba(18, 24, 40, 0.09) !important;
    }

    .trs-sidebar-top {
        padding: 13px 13px 10px !important;
        gap: 8px !important;
        align-items: center !important;
    }

    .trs-sidebar-title {
        font-size: 15px !important;
        gap: 8px !important;
        line-height: 1.2 !important;
    }

    .trs-sidebar-title i {
        width: 24px !important;
        height: 24px !important;
        min-width: 24px !important;
        font-size: 11px !important;
    }

    .trs-sidebar-subtitle {
        margin-top: 4px !important;
        font-size: 11px !important;
        line-height: 1.3 !important;
    }

    .trs-sidebar-clear {
        padding: 6px 8px !important;
        font-size: 11px !important;
        border-radius: 7px !important;
    }

    .trs-sidebar-list {
        max-height: 300px !important;
        height: auto !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 6px !important;
        touch-action: pan-y !important;
    }

    .trs-sidebar-item {
        margin-bottom: 6px !important;
        border-radius: 9px !important;
        gap: 4px !important;
    }

    .trs-sidebar-query {
        padding: 8px 6px 8px 8px !important;
        gap: 8px !important;
        font-size: 13px !important;
        line-height: 1.25 !important;
        min-height: 42px !important;
    }

    .trs-sidebar-icon {
        width: 26px !important;
        height: 26px !important;
        min-width: 26px !important;
        font-size: 11px !important;
    }

    .trs-sidebar-remove {
        width: 30px !important;
        height: 30px !important;
        min-width: 30px !important;
        font-size: 12px !important;
        margin-right: 3px !important;
    }

    .trs-sidebar-query span:last-child {
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }
}

@media (max-width: 767px) {

    input[name="search"],
    .search input[name="search"],
    #input-search {
        font-size: 16px !important;
        transform: translateZ(0);
    }

    .search .input-lg {
        font-size: 16px !important;
    }

    .trs-dropdown {
        top: calc(100% + 6px);
        left: 0;
        right: 0;
        z-index: 9999;
    }

    .trs-list {
        max-height: 230px;
    }

    .trs-sidebar-box {
        margin-top: 12px !important;
        margin-bottom: 16px !important;
        border-radius: 12px !important;
        box-shadow: 0 6px 18px rgba(18, 24, 40, 0.08) !important;
    }

    .trs-sidebar-top {
        padding: 12px 12px 9px !important;
    }

    .trs-sidebar-title {
        font-size: 15px !important;
    }

    .trs-sidebar-clear {
        padding: 6px 8px !important;
        font-size: 11px !important;
    }

    .trs-sidebar-list {
        max-height: 290px !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 6px !important;
    }

    .trs-sidebar-query {
        padding: 8px 6px 8px 8px !important;
        min-height: 40px !important;
        font-size: 13px !important;
    }

    .trs-sidebar-icon {
        width: 25px !important;
        height: 25px !important;
        min-width: 25px !important;
    }

    .trs-sidebar-remove {
        width: 29px !important;
        height: 29px !important;
        min-width: 29px !important;
    }
}