.toc-search-wrapper {
  font-family: tahoma, sans-serif;
  direction: rtl;
  max-width: 600px;
  margin: 20px auto;
}

.toc-search-container {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  padding: 15px;
}

.toc-icons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 90px;
}

.toc-ficon {
  width: 100%;
  min-height: 50px;
  border-radius: 6px;
  background: #f9f9f9;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  text-align: center;
  padding: 6px;
  transition: transform .2s, background .2s;
}

.toc-ficon:hover {
  transform: scale(1.03);
  background: #eef7ff;
}

.toc-form-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.toc-tabs {
  display: flex;
  margin-bottom: 10px;
}

.toc-tab {
  flex: 1;
  padding: 8px;
  text-align: center;
  cursor: pointer;
  border: none;
  background: #f3f3f3;
  margin-left: 2px;
  border-radius: 4px;
  font-size: 13px;
}

.toc-tab.active {
  background: #ffffff;
  border-bottom: 2px solid #007e87;
  font-weight: bold;
}

.toc-search-box {
  display: none;
}

.toc-search-box.active {
  display: block;
}

.toc-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

.toc-row-3 {
  grid-template-columns: repeat(3, 1fr);
}

.toc-field select {
  width: 100%;
  padding: 6px 8px;
  border-radius: 5px;
  border: 1px solid #ccc;
  font-size: 13px;
}

.toc-btn {
  width: 100%;
  padding: 9px;
  background: #007e87;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  margin-top: 5px;
}

.toc-btn:hover {
  background: #005f66;
}

@media (max-width: 768px) {
  .toc-search-container {
    flex-direction: column-reverse;
  }

  .toc-icons {
    flex-direction: row;
    width: 100%;
  }

  .toc-row,
  .toc-row-3 {
    grid-template-columns: 1fr;
  }
}


/* لودینگ روی باکس جستجو */
.toc-search-wrapper {
  position: relative;
}

.toc-loading {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background-color: rgba(255,255,255,0.7);
  z-index: 20;
}

.toc-loading-active {
  display: flex;
}

.toc-loading-spinner {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid #ccc;
  border-top-color: #007e87;
  animation: toc-spin 0.8s linear infinite;
}

@keyframes toc-spin {
  to {
    transform: rotate(360deg);
  }
}
