/* SongNaming — the "name your song before you download" dialog.
 * Themed to the AVH dark UI (see brand.css tokens). */

.sn-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(6, 8, 12, 0.66);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: sn-fade 0.16s ease both;
}
.sn-overlay[hidden] { display: none; }

body.sn-open { overflow: hidden; }

.sn-card {
  width: 100%;
  max-width: 440px;
  background: var(--panel, #171a21);
  border: 1px solid var(--border, #262b36);
  border-radius: var(--radius-lg, 18px);
  box-shadow: var(--shadow, 0 24px 60px rgba(0, 0, 0, 0.5));
  padding: 24px;
  animation: sn-rise 0.2s cubic-bezier(0.22, 0.61, 0.36, 1) both;
  color: var(--text, #e8ecf3);
}

.sn-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}
.sn-ico {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font-size: 22px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.22), rgba(53, 194, 255, 0.22));
  border: 1px solid var(--border, #262b36);
}
.sn-headtext { min-width: 0; }
.sn-title {
  margin: 0 0 4px;
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text, #e8ecf3);
}
.sn-sub {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--text-dim, #97a1b3);
}

.sn-label {
  display: block;
  margin: 0 0 6px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim, #97a1b3);
}

.sn-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text, #e8ecf3);
  background: var(--panel-2, #10131a);
  border: 1px solid var(--border, #262b36);
  border-radius: var(--radius, 10px);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.sn-input::placeholder { color: #5c6675; }
.sn-input:focus {
  border-color: var(--accent, #ff6b35);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.16);
}

.sn-hint {
  margin: 10px 0 0;
  font-size: 0.8rem;
  color: var(--text-dim, #97a1b3);
}
.sn-hint b { color: var(--accent-3, #35ff9e); font-weight: 600; }

.sn-err {
  margin: 10px 0 0;
  font-size: 0.82rem;
  color: var(--danger, #ff5c5c);
}
.sn-err[hidden] { display: none; }

.sn-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.sn-btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: var(--radius, 10px);
  padding: 11px 18px;
  font-size: 0.92rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}
.sn-btn:active { transform: translateY(1px); }
.sn-btn:disabled { opacity: 0.6; cursor: default; }

.sn-btn-ghost {
  background: transparent;
  border-color: var(--border, #262b36);
  color: var(--text-dim, #97a1b3);
}
.sn-btn-ghost:hover { color: var(--text, #e8ecf3); border-color: #39414f; }

.sn-btn-primary {
  background: linear-gradient(135deg, var(--accent, #ff6b35), #ff8a5c);
  color: #1a0d06;
  box-shadow: 0 8px 22px rgba(255, 107, 53, 0.28);
}
.sn-btn-primary:hover { filter: brightness(1.05); }

@keyframes sn-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sn-rise {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 480px) {
  .sn-card { padding: 20px; }
  .sn-actions { flex-direction: column-reverse; }
  .sn-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .sn-overlay, .sn-card { animation: none; }
}
