/* ============================================================
   TokenCheckr CSS (v10.4 Frosted Isolation Build)
   ------------------------------------------------------------
   ✅ Prevents wrapped token names (20-character ellipsis cap)
   ✅ Matches v1.7.4 endpoint truncation behavior
   ✅ Maintains frosted isolation visuals
   ✅ Fixes dropdown & registry card consistency
   ============================================================ */

body {
  margin: 0;
  padding: 0;
  font-family: 'DM Sans', sans-serif;
  background: linear-gradient(180deg, #f4f4f4 0%, #e8eaed 100%);
  overflow-x: hidden;
}

/* ============================================================
   📈 TICKER STYLES
   ============================================================ */

.ticker-container {
  width: 100%;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  border-top: 1px solid rgba(255, 255, 255, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  padding: 10px 25px;
  overflow: hidden;
  position: relative;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  z-index: 3;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.4s ease-in;
}

.ticker-row {
  display: inline-flex;
  align-items: center;
  gap: 60px;
  flex-wrap: nowrap;
  min-width: max-content;
  will-change: transform;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  flex-shrink: 0;
  height: 36px;
  line-height: 1;
  opacity: 0;
  transform: translateY(5px);
  animation: fadeInUp 0.4s ease forwards;
}

@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(5px); }
  100% { opacity: 1; transform: translateY(0); }
}

.ticker-icon { height: 22px; width: 22px; object-fit: contain; flex-shrink: 0; }
.ticker-symbol {
  font-weight: 600;
  color: #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}
.ticker-price { color: #000; font-size: 14px; margin-left: 6px; font-weight: 500; }
.ticker-change { font-size: 14px; margin-left: 6px; font-weight: 600; transition: color 0.3s ease; }
.ticker-change.positive { color: #0f9d58; }
.ticker-change.negative { color: #d93025; }

/* ============================================================
   🔍 LIVE SEARCH + FROSTED DROPDOWN
   ============================================================ */

.search-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
  z-index: 100000;
}

#liveSearchResults {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 6px;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.3);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  z-index: 9999;
  display: none;
  animation: fadeInBlur 0.25s ease-in-out;
}
#liveSearchResults.active, #liveSearchResults.show { display: block !important; }

@keyframes fadeInBlur {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Individual token search result --- */
.registry-search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  transition: background 0.25s ease;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

.registry-search-item:hover {
  background: rgba(255, 255, 255, 0.35);
}

.registry-search-item.empty {
  text-align: center;
  padding: 14px;
  font-size: 14px;
  color: #444;
}

/* --- Logo Left --- */
.registry-search-logo {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: contain;
  margin-right: 12px;
  flex-shrink: 0;
}

/* --- Center Column (Token Name & Ticker) --- */
.registry-search-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  text-align: center;
}

.registry-search-name {
  font-weight: 600;
  color: #000;
  font-size: 15px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px; /* caps text visually */
}

.registry-search-symbol {
  font-size: 13px;
  color: #333;
  opacity: 0.8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

/* --- Status Pill Right --- */
.registry-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
  text-transform: capitalize;
  margin-left: 12px;
  flex-shrink: 0;
}

.registry-badge.verified   { background: #1da1f2; color: #fff; }
.registry-badge.caution    { background: #fff3cd; color: #946c00; }
.registry-badge.fail       { background: #fdecea; color: #b71c1c; }
.registry-badge.unverified { background: #e0e0e0; color: #000; }

@keyframes dropdownFade {
  0% { opacity: 0; transform: translateY(-3px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   🧩 TOKEN CARD
   ============================================================ */

.token-card {
  background: rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(20px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(160%) !important;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 18px;
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.08),
    inset 0 1px 1px rgba(255, 255, 255, 0.3);
  padding: 22px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: left;
  width: 100%;
  max-width: 420px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, opacity 0.4s ease;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  opacity: 0;
  transform: translateY(6px);
  animation: cardFadeIn 0.4s ease forwards;
}

.token-card:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.15);
  transform: translateY(-4px);
}

@keyframes cardFadeIn {
  0% { opacity: 0; transform: translateY(6px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* --- Token name & ticker truncation --- */
.token-name,
.token-ticker {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px; /* visually equivalent to ~20 characters */
  text-align: center;
  vertical-align: middle;
}

/* ============================================================
   🔔 COPY TOAST
   ============================================================ */

.copy-icon, .copy-reg-id {
  cursor: pointer !important;
  transition: opacity 0.2s ease !important;
  pointer-events: all !important;
}
.copy-icon:hover, .copy-reg-id:hover { opacity: 0.7 !important; }

.copy-toast {
  position: fixed;
  pointer-events: none;
  font-family: inherit;
  text-align: center;
  opacity: 0;
  animation: fadeToast 1.5s ease forwards;
}
@keyframes fadeToast {
  0% { opacity: 0; transform: translateY(6px); }
  20% { opacity: 1; transform: translateY(0); }
  80% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-4px); }
}
