/* -------------------------------------------------------------
   achadinhos.site — estilos
   Mobile-first, leve, sem dependências externas.
------------------------------------------------------------- */

:root {
  --bg-page: #0c0d0f;
  --panel-bg: #18191c;
  --panel-border: rgba(255, 255, 255, 0.1);
  --text-light: #f5f5f5;
  --text-muted: #97979c;
  --white: #ffffff;
  --black: #121212;
  --radius-lg: 18px;
  --radius-full: 999px;
  --focus-ring: 0 0 0 2px var(--bg-page), 0 0 0 4px #ffffff;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-light);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.content {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Introdução */
.intro {
  margin-bottom: 20px;
}

.title {
  margin: 0 0 6px;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 800;
  color: var(--white);
}

.subtitle {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

/* Painel de busca */
.search-panel {
  width: 100%;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.search-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.search-box input {
  width: 100%;
  height: 54px;
  padding: 0 18px;
  border-radius: var(--radius-lg);
  border: none;
  background: var(--white);
  color: var(--black);
  font-size: 17px;
  text-align: center;
}

.search-box input::placeholder {
  color: #8a8a8a;
}

.search-box input:focus {
  outline: none;
  box-shadow: var(--focus-ring);
}

.search-box input:disabled {
  color: var(--text-muted);
  cursor: not-allowed;
}

.search-box button {
  width: 100%;
  height: 54px;
  border: none;
  border-radius: var(--radius-lg);
  background: var(--white);
  color: var(--black);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.search-box button:hover:not(:disabled) {
  filter: brightness(0.94);
}

.search-box button:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.search-box button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.search-result {
  width: 100%;
  margin-top: 14px;
}

.result-message {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-muted);
  text-align: center;
}

.result-message--empty {
  color: #ff8a8a;
}

/* Card branco de produto encontrado */
.result-card {
  width: 100%;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.result-image {
  display: block;
  width: 100%;
  max-width: 160px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 14px;
  background: #f0f0f0;
}

.field-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f5f4f2;
  border-radius: 12px;
  padding: 10px 12px;
}

.field-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.field-label {
  font-size: 10.5px;
  font-weight: 700;
  color: #8a8a8a;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.field-value {
  font-size: 13px;
  color: var(--black);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-btn {
  flex: 0 0 auto;
  height: 36px;
  padding: 0 14px;
  border: none;
  border-radius: var(--radius-full);
  background: var(--black);
  color: var(--white);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.copy-btn:hover:not(:disabled) {
  filter: brightness(1.25);
}

.copy-btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.copy-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Rodapé */
.footer {
  margin-top: 26px;
}

.footer p {
  margin: 0;
  font-size: 11px;
  color: #5c5c60;
}

/* Telas maiores */
@media (min-width: 480px) {
  .title {
    font-size: 27px;
  }
}

/* Acessibilidade: respeita preferência por menos movimento */
@media (prefers-reduced-motion: reduce) {
  .search-box button,
  .copy-btn {
    transition: none;
  }
}
