/* Custom styles on top of Tailwind */

html { scroll-behavior: smooth; }

[dir="rtl"] body { font-feature-settings: "kern", "liga"; }

/* Custom scrollbar for the nav */
.scrollbar-thin::-webkit-scrollbar { height: 4px; }
.scrollbar-thin::-webkit-scrollbar-track { background: transparent; }
.scrollbar-thin::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 2px; }

/* Search results entry */
.search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.12s, color 0.12s;
  text-decoration: none;
  color: inherit;
}
.search-item:hover, .search-item.active { background: #f1f5f9; color: #0f172a; }
.search-item:last-child { border-bottom: 0; }
.search-item img { width: 24px; height: 18px; object-fit: cover; border-radius: 2px; flex-shrink: 0; }
.search-item .name { flex: 1; font-size: 14px; font-weight: 500; }
.search-item .code { font-size: 13px; color: #64748b; font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.search-item:hover .code, .search-item.active .code { color: #2563eb; }

/* Dark mode for search results */
.dark .search-item {
  border-bottom-color: rgba(51, 65, 85, 0.6); /* slate-700/60 */
}
.dark .search-item:hover,
.dark .search-item.active {
  background: rgba(51, 65, 85, 0.5); /* slate-700/50 */
  color: #f1f5f9; /* slate-100 */
}
.dark .search-item .code { color: #94a3b8; /* slate-400 */ }
.dark .search-item:hover .code,
.dark .search-item.active .code { color: #60a5fa; /* brand-400 */ }
.dark .search-item:last-child { border-bottom: 0; }

/* Country code badge */
.code-badge {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* Flag image — plain, no decoration */
img.flag {
  background: transparent;
}

/* Live clock pulse */
.clock-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* RTL fixes */
[dir="rtl"] .ltr-numbers {
  direction: ltr;
  display: inline-block;
  unicode-bidi: embed;
}
