/* TMN Universal Search - RTL friendly */
.tmn-us, .tmn-us * { box-sizing: border-box; }
.tmn-us { direction: rtl; }
.tmn-us__wrap{
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 28px 16px 48px;  
}
.tmn-us__head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  margin-bottom:18px;
}
.tmn-us__title{
  margin:0;
  font-size:28px;
  line-height:1.3;
  font-weight:700;
}
.tmn-us__query{ color:#1B8354; }
.tmn-us__meta{
  font-size:14px;
  color:#6B7280;
  white-space:nowrap;
}

/* Search box */
.tmn-us__searchbox{
  display:flex;
  align-items:center;
  gap:10px;
  width:100%;
}
.tmn-us__label{ position:absolute; left:-9999px; }
.tmn-us__input {
    flex: 1;
    height: 44px;
    border: 1px solid #9DA4AE;
    border-radius: 4px;
    padding: 0 14px;
    outline: none;
    background: #fff;
	font-family: 'IBM Plex Sans Arabic';
}
.tmn-us__input:focus{
  border-color:#1B8354;
  box-shadow:0 0 0 3px rgba(27,131,84,.12);
}
.tmn-us__btn{
  height:44px;
  padding:0 18px;
  border:none;
  border-radius:4px;
  background:#1B8354;
  color:#fff;
  cursor:pointer;
  font-weight:600;
}
.tmn-us__btn:hover{ opacity:.92; }

.tmn-us__bar{
  
  margin: 12px 0 18px;
}

/* Results list */
.tmn-us__list{ display:flex; flex-direction:column; gap:14px; }
.tmn-us__item{
    background: #fff;
    border-bottom: 1px solid #EEF0F3;
    padding-bottom: 14px;
}
.tmn-us__item-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.tmn-us__badge{
  font-size:12px;
  padding:6px 10px;
     background: #F9FAFB;
    color: #1F2A37;
    border: 1px solid #E5E7EB; 
    border-radius: 4px;
}
.tmn-us__date{
  font-size:12px;
  color:#6B7280;
}
.tmn-us__link{ text-decoration:none; color:inherit; }
.tmn-us__item-title{
  margin:0 0 8px;
  font-size:18px;
  line-height:1.35;
  font-weight:700;
}
.tmn-us__item-title:hover{ color:#1B8354; }
.tmn-us__excerpt{
  margin:0;
  color:#374151;
  font-size:14px;
  line-height:1.7;
}

/* Pagination */
.tmn-us__pagination{
  margin-top:18px;
  display:flex;
  justify-content:center;
}
.tmn-us__pagination .page-numbers{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:38px;
  height:38px;
  padding:0 10px;
  margin:0 4px;
  border-radius:10px;
  border:1px solid #E5E7EB;
  text-decoration:none;
  color:#111827;
  background:#fff;
  font-weight:600;
}
.tmn-us__pagination .page-numbers.current{
  background:#1B8354;
  border-color:#1B8354;
  color:#fff;
}
.tmn-us__pagination .page-numbers:hover{ border-color:#1B8354; }

/* Empty */
.tmn-us__empty{
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 4px;
}

/* Badge variants (optional) */
.tmn-us__badge.is-interview{     background: #F9FAFB;
    color: #1F2A37;
    border: 1px solid #E5E7EB;  }
.tmn-us__badge.is-booklet{     background: #F9FAFB;
    color: #1F2A37;
    border: 1px solid #E5E7EB;  }
.tmn-us__badge.is-glossary{     background: #F9FAFB;
    color: #1F2A37;
    border: 1px solid #E5E7EB; }
.tmn-us__badge.is-faq{     background: #F9FAFB;
    color: #1F2A37;
    border: 1px solid #E5E7EB;  }

/* Mobile */
@media (max-width: 640px){
  .tmn-us__head{ flex-direction:column; align-items:flex-start; }
  .tmn-us__title{ font-size:22px; }
  .tmn-us__searchbox{ flex-direction:column; }
  .tmn-us__btn{ width:100%; }
}
/* Mobile only */
@media (max-width: 640px){

  .tmn-us__barform.tmn-us__searchbox{
    display:block;
    width:100%;
  }

  .tmn-us__barform .tmn-us__label{
    position:absolute;
    left:-9999px;
  }

  .tmn-us__barform{
    position:relative;
  }

  .tmn-us__barform .tmn-us__input{
    width:100%;
    height:46px;
    border:1px solid #9DA4AE;
    border-radius:4px;
    padding:0 42px 0 42px; /* يمين للبحث - يسار للمايك */
    font-size:14px;
    font-family:'IBM Plex Sans Arabic';
    background:#fff;
  }

  .tmn-us__barform .tmn-us__btn{
    position:absolute;
    top:50%;
    right:8px;
    transform:translateY(-50%);
    width:24px;
    height:24px;
    padding:0;
    border:none;
    background:transparent;
    color:#111827;
    font-size:0;
    min-width:auto;
  }

  .tmn-us__barform .tmn-us__btn::before{
    content:"";
    display:block;
    width:18px;
    height:18px;
    margin:auto;
    background-repeat:no-repeat;
    background-position:center;
    background-size:18px 18px;
    background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'><circle cx='11' cy='11' r='6.5' stroke='%23111827' stroke-width='1.8'/><path d='M16 16L21 21' stroke='%23111827' stroke-width='1.8' stroke-linecap='round'/></svg>");
  }

  .tmn-us__barform::after{
    content:"";
    position:absolute;
    top:50%;
    left:12px;
    transform:translateY(-50%);
    width:18px;
    height:18px;
    pointer-events:none;
    background-repeat:no-repeat;
    background-position:center;
    background-size:18px 18px;
    background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'><path d='M12 15a3 3 0 0 0 3-3V7a3 3 0 1 0-6 0v5a3 3 0 0 0 3 3Z' stroke='%23111827' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/><path d='M19 11.5a7 7 0 0 1-14 0' stroke='%23111827' stroke-width='1.8' stroke-linecap='round'/><path d='M12 18.5v3' stroke='%23111827' stroke-width='1.8' stroke-linecap='round'/></svg>");
  }

  .tmn-us__bar{
    margin:10px 0 14px;
  }
}
/* Fix overflow in search page only */
body.search,
body.search main,
body.search .tmn-us,
body.search .tmn-us__wrap{
    width:100%;
    max-width:100%;
    margin-left:0;
    margin-right:0;
    overflow-x:hidden;
}

/* Prevent any element from exceeding screen */
body.search *{
    max-width:100%;
}

/* Fix possible input overflow */
body.search input,
body.search form{
    width:100%;
    max-width:100%;
}

/* Remove extra bottom spacing */
body.search{
    min-height:auto;
}

/* ===== Toolbar like screenshot ===== */
.tmn-us__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:24px;
  margin-bottom:18px;
}

.tmn-us__head-main{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.tmn-us__controls{
  flex-shrink:0;
}

.tmn-us__toolbar{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.tmn-us__dropdown{
  position:relative;
}

.tmn-us__dropdown summary{
  list-style:none;
}

.tmn-us__dropdown summary::-webkit-details-marker{
  display:none;
}

.tmn-us__summary{
  height:40px;
  padding:0 14px;
  border-radius:4px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  cursor:pointer;
  user-select:none;
  font-family:'IBM Plex Sans Arabic', sans-serif;
  font-size:14px;
  font-weight:600;
  border:1px solid #D1D5DB;
  transition:.2s ease;
  white-space:nowrap;
}

.tmn-us__dropdown--dark .tmn-us__summary{
  background:#0F172A;
  border-color:#0F172A;
  color:#fff;
}

.tmn-us__dropdown--light .tmn-us__summary{
  background:#fff;
  border-color:#D1D5DB;
  color:#111827;
}

.tmn-us__summary-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.tmn-us__dropdown[open] .tmn-us__summary{
  box-shadow:0 4px 14px rgba(0,0,0,.08);
}

.tmn-us__menu{
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  min-width:190px;
  background:#fff;
  border:1px solid #E5E7EB;
  border-radius:10px;
  box-shadow:0 10px 30px rgba(0,0,0,.10);
  padding:8px;
  z-index:30;
  display:flex;
  flex-direction:column;
  gap:4px;
}

.tmn-us__menu-item{
  width:100%;
  min-height:40px;
  border:none;
  background:#fff;
  color:#111827;
  text-align:right;
  font-family:'IBM Plex Sans Arabic', sans-serif;
  font-size:14px;
  font-weight:500;
  border-radius:8px;
  padding:10px 12px;
  cursor:pointer;
  transition:.2s ease;
}

.tmn-us__menu-item:hover{
  background:#F3F4F6;
}

.tmn-us__menu-item.is-active{
  background:#ECFDF3;
  color:#157A4B;
  font-weight:700;
}

.tmn-us__meta{
  font-size:13px;
  color:#6B7280;
  white-space:nowrap;
}

/* Mobile */
@media (max-width: 768px){
  .tmn-us__head{
    flex-direction:column;
    align-items:stretch;
    gap:14px;
  }

  .tmn-us__controls{
    width:100%;
  }

  .tmn-us__toolbar{
    width:100%;
    gap:8px;
  }

  .tmn-us__dropdown{
    flex:1 1 auto;
  }

  .tmn-us__summary{
    width:100%;
    justify-content:center;
  }

  .tmn-us__menu{
    right:0;
    left:0;
    min-width:0;
  }
}
