/* assets/logo-demo.css */
* { box-sizing: border-box; }
html, body {
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  background: #f6f6f775;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: #0f0f10;
}

/* Wrapper */
.demo-wrap {
  max-width: 920px;
  margin: 40px auto;
  padding: 28px 16px;
  border-radius: 20px;
}

/* Card */
.demo-card {
  max-width: 600px;
  margin: 0 auto 14px;
  padding: 24px;
  background: #fff;
  border: 1px solid #e7e8eb;
  border-radius: 6px;
  box-shadow: 0 10px 32px rgba(16,24,40,.07);
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 19px;
}

/* Logo box */
.logo-box {
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.logo-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo-fallback {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 800;
  color: #fff;
}

/* Smooth transitions for logo + text */
#logoImg,
#logoFallback {
  transition: opacity .22s ease, filter .22s ease, transform .22s ease;
  opacity: 1;
}

.logo-box.is-loading #logoImg {
  opacity: 0;
  filter: blur(6px);
  transform: scale(.98);
}

.logo-box.is-loading #logoFallback {
  opacity: 0;
  filter: blur(6px);
  transform: scale(.98);
}

/* Spinner (shown while loading) */
.logo-loading {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
}

.logo-box.is-loading .logo-loading {
  display: flex;
}

/* Spinner circle */
.logo-loading::before {
  content: "";
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 2px solid rgba(17,24,39,.18);
  border-top-color: rgba(17,24,39,.75);
  animation: logoSpin .7s linear infinite;
}

@keyframes logoSpin {
  to { transform: rotate(360deg); }
}

/* Animate the "URL on top" (domain + url line) */
.domain,
#urlText {
  transition: opacity .22s ease, filter .22s ease, transform .22s ease;
}

.is-swapping-text .domain,
.is-swapping-text #urlText {
  opacity: 0;
  filter: blur(6px);
  transform: translateY(-2px);
}

/* Meta */
.domain {
  font-size: 15px;
  font-weight: 700;
  margin: 2px 0 8px;
}

.kv {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 8px;
  padding: 6px 0;
  border-top: 1px dashed #e7e8eb;
}

.kv:first-of-type { border-top: 0; padding-top: 0; }

.k {
  font-size: 10.5px;
  color: #6b6f76;
  padding-top: 5px;
}

.v {
  display: flex;
  gap: 6px;
  align-items: center;
  min-width: 0;
}

.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10.5px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  max-width: 100%;
}

.copy-btn {
  font-size: 10.5px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid #e7e8eb;
  background: #fff;
  cursor: pointer;
}

.copy-btn:hover { background: #f9fafb; }

.status {
  margin-top: 6px;
  font-size: 10.5px;
  color: #6b6f76;
  min-height: 14px;
}

/* Input */
.search-wrap {
  max-width: 600px;
  margin: 0 auto;
}

.search-box {
  display: grid;
  grid-template-columns: 34px 1fr 42px;
  align-items: center;
  background: #fff;
  border: 1px solid #e7e8eb;
  border-radius: 6px;
  margin-bottom: 35px;
  overflow: hidden;
  box-shadow: 0 8px 26px rgba(16,24,40,.06);
}

.search-icon {
  text-align: center;
  font-size: 22px;
  color: #6b6f76;
}

.search-input {
  border: 0;
  outline: 0;
  font-size: 12.5px;
  padding: 11px 10px;
}

.search-btn {
  border: 0;
  background: #111827;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  height: 36px;
}

.search-btn:hover { filter: brightness(1.05); }

/* Chips */
.chips {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.chip {
  font-size: 11.5px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #e7e8eb;
  background: #fff;
  cursor: pointer;
}

.chip:hover { background: #f9fafb; }

.shuffle {
  margin: 12px auto 0;
  display: block;
  font-size: 11.5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
}

.shuffle:hover { background: rgba(17,24,39,.06); }

/* Mobile */
@media (max-width: 640px) {
  .demo-card {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .kv {
    grid-template-columns: 60px 1fr;
    text-align: left;
  }
}
