.taxonomy-chain-menu-btn {
    display: inline-table !important;
    padding: 6px 12px;
    margin: 0;
    border: solid 1px #ccc;
    border-radius: 3px;
    font-family: inherit;
    font-size: 0.95em;
    line-height: normal;
    text-decoration: none !important;
    color: #555;
}

.taxonomy-chain-menu-taxonomy select {
    padding: 10px;
    font-size: 16px;
    width: 100%;
    min-width: 100%;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="5"><path fill="gray" d="M0 0l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 10px 5px;
}

.taxonomy-chain-menu-taxonomy option {
    padding: 5px 10px;
}

.taxonomy-chain-menu-taxonomy img {
    vertical-align: middle;
    border-radius: 4px;
}

.taxonomy-chain-menu-btn:hover {
    color: #111;
}

div.taxonomy-chain-menu {
    display: inline-block;
    width: 100%;
}

.taxonomy-chain-menu select {
    display: block; /* یا inline-block اگر خواستی */
    border: 1px solid #ccc;
    border-radius: 3px;
    font-family: inherit;
    padding: 6px;
    margin: 0;
    margin-right: 3px;
    margin-bottom: 3px;
    width: 100%; /* مهم‌ترین نکته */
    height: auto;
    line-height: normal;
    max-width: 100%; /* محدود کن به والد */
    box-sizing: border-box; /* باعث میشه padding توی عرض حساب بشه */
}

img.taxonomy-chain-menu-loader {
    display: initial !important;
    line-height: 0 !important;
    width: auto;
    height: 16px;
}

.selectron23 {
    margin-right: 6px;
    margin-bottom: 4px;
    width: 100%;
    box-sizing: border-box;
}

.taxonomy-chain-menu-reflection {
    display: flex;
    flex-wrap: wrap;
}

.taxonomy-chain-menu-reflection .selectron23 {
    flex-grow: 1;
    flex-shrink: 1;
    min-width: 100%;
}

.taxonomy-chain-menu-reflection > * {
    vertical-align: middle;
    width: 100%;
}

.taxonomy-chain-menu-reflection > .selectron23 {
    vertical-align: middle;
}

.taxonomy-chain-menu-notice {
    color: #404040;
    border: solid 1px #0090cb !important;
    background: #e7f3f7;
    padding: 5px;
    font-size: 0.80em;
    margin-bottom: 4px;
}

.selectron23-container {
    position: relative !important;
    width: 100%;
}

/* iOS select fixes */
@supports (-webkit-touch-callout: none) {
    select {
        font-size: 16px !important; /* Prevent zooming on focus in Safari iOS */
    }
}
