/* Sıra Belirle sayfası. Palet, bilet kartı, buton, sarsıntı, confetti canvas'ı ve sonuç alanının yumuşak açılması
   (.result / .result-clip: grid 0fr->1fr) style.css'ten gelir. */

.tool-head {
  text-align: center;
  margin-bottom: 20px;
}
.tool-head h1 {
  font-size: clamp(1.7rem, 7vw, 2.2rem);
  margin: 0 0 6px;
}
.tool-head p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Kart kenar boşlukları sıkı tutulur ki 360x640'ta buton ilk ekrana sığsın (çentikler --pad-x'e bağlı, birlikte kayar). */
.ticket {
  --pad-x: 20px;
  --btn-gap: 16px;
  padding: 20px var(--pad-x) 20px;
}

/* ş, İ gibi harfler başka bir yazı tipi alt kümesinden gelir ve satır yüksekliğini 1 px oynatabilir;
   düğme yüksekliği (54 px) metinden bağımsız sabitlenir, kart zıplamaz. */
#goBtn { line-height: 22px; }

/* ---- İsimler ---- */
.sb-field label {
  display: block;
  margin-bottom: 4px;
  color: var(--text-dim);
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 16px;
}
.sb-field textarea {
  display: block;
  width: 100%;
  height: calc(22px * 6 + 24px);   /* 6 satır + dikey iç boşluk ve kenarlık; kendiliğinden büyümez, içeride kayar */
  background: var(--surface-2);
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 22px;
  resize: none;
  overflow-y: auto;
  outline: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(169, 174, 220, 0.35) transparent;
  transition: border-color 0.15s ease;
}
.sb-field textarea::placeholder { color: var(--text-dim); }
.sb-field textarea:focus { border-color: var(--accent); }
.sb-field textarea:disabled { opacity: 0.6; cursor: not-allowed; }

/* ---- Doğrulama mesajı: tek satır, yer her zaman ayrılı ---- */
.sb-msg {
  height: 1.3rem;
  margin: 4px 0 var(--btn-gap);   /* çentikler bu boşluğun ortasında */
  color: var(--accent-2);
  font-size: 0.8rem;
  line-height: 1.3rem;
  white-space: nowrap;
}

/* ---- Sonuç ---- */
/* .result bir grid: sütun içeriğe göre büyümesin (uzun isim kartı taşırmasın); isim kendi kutusunda kırpılır. */
.sb-result { grid-template-columns: minmax(0, 1fr); }
.sb-body { padding-top: 20px; }

.sb-list {
  --row-h: 44px;
  --row-gap: 6px;
  display: flex;
  flex-direction: column;
  gap: var(--row-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Satırlar son boyutta kurulur (44 px); isim yeri soluk bir yuvadır, isim düşünce dolar. */
.sb-row {
  height: var(--row-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px 0 8px;
  border: 1px dashed rgba(169, 174, 220, 0.35);
  border-radius: 12px;
  animation: sb-wait 1.8s ease-in-out infinite;
}
@keyframes sb-wait {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}
.sb-row.in {
  background: var(--surface-2);
  border: 1px solid transparent;
  animation: none;
}
.sb-row.first.in { border-color: var(--accent); }

.sb-num {
  flex: none;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-dim);
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.sb-row.in .sb-num { background: var(--surface); color: var(--text); }
.sb-row.first .sb-num,
.sb-row.first.in .sb-num { background: var(--accent); color: var(--bg); }
/* Mühür: 1. sıranın rozetinde, ana sayfadaki kadar sert değil (1.35x'ten oturur). */
.sb-num.stamp { animation: sb-stamp 0.4s both; }
@keyframes sb-stamp {
  0% { transform: scale(1.35) rotate(-3deg); animation-timing-function: cubic-bezier(0.3, 1.2, 0.6, 1); }
  60% { transform: scale(0.97) rotate(0.5deg); animation-timing-function: ease-out; }
  100% { transform: scale(1) rotate(0deg); }
}

.sb-name {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.95rem;
  line-height: 20px;
  color: var(--text);
  visibility: hidden;
}
.sb-row.in .sb-name {
  visibility: visible;
  animation: sb-pop 0.18s ease-out;
}
@keyframes sb-pop {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

/* "Sonucu kopyala" yeri baştan ayrılı; sonuç gelince görünür, kart büyümez. */
.sb-copy-row {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}
.sb-copy {
  visibility: hidden;
  min-width: 150px;
  height: 36px;
  padding: 0 16px;
  border: none;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.88rem;
  line-height: 20px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.sb-copy.on { visibility: visible; }
.sb-copy:hover { background: var(--accent); color: var(--bg); }
.sb-copy:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sb-live {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .sb-row, .sb-row.in .sb-name, .sb-num.stamp { animation: none; }
}

/* ---- Alt metin ---- */
.about {
  margin-top: 24px;
  padding: 24px;
}
.about h2 {
  font-size: 1.15rem;
  margin: 0 0 8px;
}
.about p {
  font-size: 0.92rem;
}
.about p:last-child { margin-bottom: 0; }
