/**
 * Homepage world clock, homepage search, articles sidebar search.
 */
:root {
  --widget-accent: #0d9488;
  --widget-accent-light: #2dd4bf;
  --widget-accent-blue: #3b82f6;
  --widget-border: #dfe8ec;
  --widget-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

/* ========== World clock ========== */
.world-time-panel {
  margin-bottom: 14px;
  border: 1px solid var(--widget-border);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f6fbfb 100%);
  box-shadow: var(--widget-shadow);
  overflow: hidden;
}

.world-time-head,
.articles-search-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--widget-border);
  background: linear-gradient(90deg, rgba(45, 212, 191, 0.1) 0%, rgba(59, 130, 246, 0.06) 100%);
}

.world-time-head-icon,
.articles-search-head-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--widget-accent-light), var(--widget-accent-blue));
  color: #fff;
  font-size: 16px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.22);
}

.world-time-head-text strong,
.articles-search-head-text strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
}

.world-time-head-text small,
.articles-search-head-text small {
  display: block;
  margin-top: 2px;
  font-size: 0.75rem;
  color: #64748b;
}

.world-time-grid.time-type {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin: 0 !important;
  padding: 14px 16px !important;
  list-style: none;
  background: transparent !important;
  border-radius: 0 !important;
  justify-content: stretch !important;
}

.world-time-item {
  display: flex !important;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--widget-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.world-time-item:hover {
  border-color: rgba(13, 148, 136, 0.28);
  box-shadow: 0 6px 16px rgba(13, 148, 136, 0.1);
  transform: translateY(-1px);
}

.world-time-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 14px;
  flex-shrink: 0;
  color: #fff;
}

.world-time-icon--teal {
  background: linear-gradient(135deg, #2dd4bf, #0d9488);
}

.world-time-icon--blue {
  background: linear-gradient(135deg, #60a5fa, #2563eb);
}

.world-time-icon--indigo {
  background: linear-gradient(135deg, #818cf8, #4f46e5);
}

.world-time-icon--rose {
  background: linear-gradient(135deg, #fb7185, #e11d48);
}

.world-time-icon--amber {
  background: linear-gradient(135deg, #fbbf24, #d97706);
}

.world-time-icon--violet {
  background: linear-gradient(135deg, #a78bfa, #7c3aed);
}

.world-time-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.world-time-city {
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.world-time-clock {
  margin-top: 2px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

#time-list {
  box-shadow: none !important;
  border: none !important;
  background: transparent !important;
  overflow: visible !important;
}

/* ========== Homepage search ========== */
#search-usdt {
  display: flex;
  align-items: stretch;
  gap: 1%;
  width: 100%;
}

#top-search-right-ad {
  flex: 1 1 63%;
  min-width: 0;
  float: none !important;
  margin-right: 0 !important;
}

#top-search-right-ad img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 12px;
}

.home-search-panel {
  flex: 0 0 36%;
  width: 36% !important;
  float: none !important;
  height: 140px;
  box-sizing: border-box;
  border: 1px solid var(--widget-border);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f6fbfb 100%);
  box-shadow: var(--widget-shadow);
  overflow: visible;
}

#search-div {
  box-shadow: none !important;
}

.home-search-panel .home-search-body,
.home-search-panel .home-search-body.s-search {
  float: none !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;
  margin: 0 !important;
  padding: 12px 14px !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: inherit !important;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.home-search-panel #search,
.home-search-panel #search.s-search {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 10px;
  flex: 1 1 auto;
  width: 100%;
  height: auto !important;
  min-height: 0 !important;
  max-height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  background: transparent !important;
  max-width: none;
  box-sizing: border-box;
}

.header-big .home-search-panel #search-list {
  margin-top: 0 !important;
  text-align: left;
  flex: 0 0 auto;
}

.header-big .home-search-panel .search-type li label {
  padding-top: 0 !important;
}

.home-search-input-wrap {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  width: 100%;
}

.home-search-panel .search-type {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  justify-content: flex-start;
  margin: 0 0 8px !important;
  padding: 0 !important;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}

.home-search-panel .search-type::-webkit-scrollbar {
  display: none;
}

.home-search-panel .search-type li {
  margin: 0 !important;
  flex: 0 0 auto;
}

.home-search-panel .search-type li label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0 !important;
  padding: 4px 10px !important;
  border: 1px solid var(--widget-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: all 0.2s ease;
}

.home-search-panel .search-type li label span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #475569 !important;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.home-search-panel .search-type li label span i {
  font-size: 0.75rem;
  color: var(--widget-accent);
}

.home-search-panel .search-type li label:hover {
  border-color: rgba(13, 148, 136, 0.35);
  background: #ecfdf5;
}

.home-search-panel .search-type input:checked + label {
  border-color: rgba(13, 148, 136, 0.45);
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.1);
}

.home-search-panel .search-type input:checked + label::before {
  display: none !important;
}

.home-search-panel .search-type input:checked + label span {
  color: var(--widget-accent) !important;
}

@media screen and (min-width: 769px) {
  .home-search-panel .s-search,
  .home-search-panel .home-search-body.s-search,
  .home-search-panel #search.s-search {
    height: 100% !important;
    min-height: 0 !important;
  }

  .header-big .home-search-panel .search-type li label {
    padding: 4px 10px !important;
  }
}

.home-search-panel .super-search-fm {
  position: relative;
  margin: 0;
}

.home-search-panel #search-text {
  height: 40px !important;
  padding: 0 46px 0 14px !important;
  border: 1px solid var(--widget-border) !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  color: #0f172a !important;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
  font-size: 0.88rem !important;
}

.home-search-panel #search-text:focus {
  border-color: rgba(13, 148, 136, 0.45) !important;
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.18);
}

.home-search-panel #search button {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 50%;
  line-height: 1 !important;
  background: linear-gradient(135deg, #2dd4bf, #0d9488) !important;
  color: #fff !important;
  cursor: pointer;
}

.home-search-panel #search button:hover {
  background: linear-gradient(135deg, #14b8a6, #0f766e) !important;
}

.home-search-panel #search button i {
  color: #fff !important;
  font-size: 14px !important;
  line-height: 1 !important;
}

.header-big .home-search-panel .search-smart-tips,
.home-search-panel .search-smart-tips {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  left: 0 !important;
  right: 0 !important;
  width: auto !important;
  margin: 0 !important;
  z-index: 40;
  border: 1px solid var(--widget-border);
  border-radius: 12px;
  background: #fff !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.home-search-panel .search-smart-tips ul {
  padding: 6px 0 !important;
}

.home-search-panel .search-smart-tips ul li {
  padding: 8px 14px !important;
  line-height: 1.4 !important;
  font-size: 0.84rem;
  color: #334155;
}

.home-search-panel .search-smart-tips ul li:hover,
.home-search-panel .search-smart-tips ul li.current {
  background: rgba(13, 148, 136, 0.08) !important;
  color: var(--widget-accent);
}

.header-big.no-bg .text-muted {
  color: #475569 !important;
  font-weight: 600 !important;
}

/* ========== Articles sidebar search ========== */
.articles-search-widget {
  overflow: hidden;
  padding: 0 !important;
  margin-top: 16px !important;
}

.articles-search-widget .articles-search-head {
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--widget-border);
  background: linear-gradient(90deg, rgba(45, 212, 191, 0.08) 0%, rgba(59, 130, 246, 0.04) 100%);
}

.articles-search-widget #articles-archive-search {
  padding: 14px 16px 16px;
}

.articles-search-widget .wp-block-search__label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.articles-search-widget .wp-block-search__inside-wrapper {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-top: 0;
}

.articles-search-widget .wp-block-search__input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 14px 0 40px;
  border: 1px solid var(--widget-border) !important;
  border-radius: 12px !important;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%230d9488' viewBox='0 0 512 512'%3E%3Cpath d='M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z'/%3E%3C/svg%3E") no-repeat 14px center / 14px !important;
  font-size: 0.88rem;
  color: #0f172a;
}

.articles-search-widget .wp-block-search__input:focus {
  border-color: rgba(13, 148, 136, 0.45) !important;
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.18) !important;
  outline: none;
}

.articles-search-widget .wp-block-search__button {
  height: 44px;
  padding: 0 16px;
  border: 0 !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, var(--widget-accent-light), var(--widget-accent-blue)) !important;
  color: #fff !important;
  font-size: 0.84rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.2);
}

.articles-search-widget .wp-block-search__button:hover {
  filter: brightness(1.05);
}

.articles-search-widget .wp-block-search__button i {
  margin-right: 6px;
  font-size: 0.8rem;
}

/* ========== Responsive ========== */
@media (max-width: 1199.98px) {
  .world-time-grid.time-type {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  #search-usdt {
    flex-direction: column;
    gap: 10px;
  }

  #top-search-right-ad,
  .home-search-panel {
    flex: 1 1 auto;
    width: 100% !important;
  }

  .home-search-panel {
    height: auto;
    min-height: 132px;
  }

  .home-search-panel .home-search-body,
  .home-search-panel .home-search-body.s-search {
    min-height: 132px !important;
    height: auto !important;
  }

  .world-time-grid.time-type {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 12px !important;
  }

  .world-time-item {
    padding: 9px 10px;
  }

  .world-time-head,
  .articles-search-head {
    padding: 12px 14px;
  }

  .home-search-panel .search-type {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .home-search-panel .search-type::-webkit-scrollbar {
    display: none;
  }

  .home-search-panel .search-type li label {
    white-space: nowrap;
  }

  .articles-search-widget .wp-block-search__inside-wrapper {
    flex-direction: column;
  }

  .articles-search-widget .wp-block-search__button {
    width: 100%;
  }
}

@media (max-width: 479.98px) {
  .world-time-grid.time-type {
    grid-template-columns: 1fr;
  }
}
