.ma_term_links_wrap .show_control {
  display: flex;
  justify-content: space-between;
  padding: 10px;
  align-items: center;
}
.ma_term_links_wrap .show_control div {
  visibility: hidden;
  color: #fff;
  font-size: 13px;
  height: 32px; /* Slight increase for better vertical centering room */
  border-radius: 2px;
  cursor: pointer;
  transition: opacity 0.2s ease;
  display: flex; /* Flexbox for the button content */
  align-items: center; /* Center vertically */
  justify-content: center; /* Center horizontally */
  padding: 0 16px; /* Symmetric padding */
  gap: 8px; /* Space between icon and text */
  line-height: 1; /* Reset line-height to avoid offset */
}
.ma_term_links_wrap .show_control div.active {
  visibility: visible;
}
.ma_term_links_wrap .show_control div:hover {
  opacity: 0.9;
}
.ma_term_links_wrap .show_control div.ma_expand {
  background: #4CAF50;
  /* flex-direction: row; Default: Icon (::before) is on Right in RTL */
}


.ma_term_links_wrap .show_control div.ma_expand:before {
  content: "+";
  font-size: 18px;
  /* Static position for flex flow */
}
.ma_term_links_wrap .show_control div.ma_collapse {
  background: #f44436;
  flex-direction: row-reverse; /* Puts Icon (::before) on Left in RTL context (Start becomes Left) */
}
.ma_term_links_wrap .show_control div.ma_collapse:before {
  content: "-";
  font-size: 18px;
  /* Static position for flex flow */
}

.ma_term_links {
  max-height: 208px;
  overflow: hidden;
}
.ma_term_links .inner {
  display: flex;
  flex-wrap: wrap;
}
.ma_term_links .inner .ma_term_link {
  display: flex;
  height: 48px;
  margin: 10px;
  overflow: hidden;
  align-items: center;
  appearance: none;
  background-color: #FCFCFD;
  border-radius: 4px;
  border-width: 0;
  box-shadow: #9e9e9eeb 0 2px 4px, rgba(158, 158, 158, 0.37) 0 7px 13px -3px, #d6d6e7 0 -3px 0 inset;
  color: #36395A;
  justify-content: center;
  line-height: 1;
  list-style: none;
  padding-left: 16px;
  transition: box-shadow 0.15s, transform 0.15s;
  white-space: nowrap;
  will-change: box-shadow, transform;
}
.ma_term_links .inner .ma_term_link:hover {
  box-shadow: rgba(158, 158, 158, 0.46) 0 4px 8px, #9e9e9e91 0 7px 13px -3px, #d6d6e7 0 -3px 0 inset;
  transform: translateY(-2px);
}
.ma_term_links .inner .ma_term_link .image {
  flex-shrink: 0;
}
.ma_term_links .inner .ma_term_link .image img {
  width: 50px;
  height: 50px;
}
.ma_term_links .inner .ma_term_link span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  line-height: 50px;
  text-align: center;
  font-family: IRANSans;
  font-weight: 500;
}

@keyframes placeHolderShimmer {
  0% {
    background-position: -300px 0;
  }
  100% {
    background-position: 300px 0;
  }
}

/*flat style term link*/
.ma_term_links_wrap a, .ma_term_links_wrap button {
    display: inline-block;
    padding: 8px 16px;
    margin: 4px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: none !important;
    background-color: var(--on-brand-accent);
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary);
}
.ma_term_links .inner .ma_term_link {
    background: var(--surface-container-high);
    box-shadow: var(--shadow-md);
color: var(--on-brand-primary-container);
}

