/* ==========================================================================
   Paddy Prompt Studio — shared building blocks for the newer tool pages
   (tone generator, slowed + reverb maker, rhyme finder, ...). Layers on
   /blog/style.css; each tool adds its own small stylesheet on top. Older
   tools carry their own copies of these rules.
   ========================================================================== */

/* ------------------------------------------------------------ Tool card */
.pt-card {
  position: relative;
  background: linear-gradient(180deg, var(--card), var(--card-2));
  border: 1px solid var(--border); border-radius: 22px;
  padding: 1.25rem; margin: 0.5rem 0 1rem;
  box-shadow: 0 30px 70px -40px rgba(99, 102, 241, 0.6);
}
.pt-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.pt-label {
  display: block; margin: 0 0 0.35rem;
  font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.68rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--indigo); font-weight: 700;
}
.pt-panel {
  background: rgba(255, 255, 255, 0.025); border: 1px solid var(--border-soft);
  border-radius: 16px; padding: 0.9rem 1rem;
}

/* ------------------------------------------------------------ Buttons */
.btn-primary, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem; cursor: pointer;
  min-height: 44px; padding: 0.55rem 1rem; border-radius: 12px;
  font: inherit; font-size: 0.92rem; font-weight: 700; text-decoration: none; line-height: 1.2;
}
.btn-primary { border: 0; background: linear-gradient(135deg, #818cf8, #22d3ee); color: #0b0620; }
.btn-primary:hover { filter: brightness(1.08); text-decoration: none; }
.btn-ghost { background: rgba(255, 255, 255, 0.04); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: rgba(129, 140, 248, 0.16); text-decoration: none; }
.btn-ghost[aria-pressed="true"] { background: rgba(34, 211, 238, 0.14); border-color: rgba(103, 232, 249, 0.6); color: #a5f3fc; }
.btn-primary[disabled], .btn-ghost[disabled] { opacity: 0.4; cursor: not-allowed; filter: none; }
.btn-primary:focus-visible, .btn-ghost:focus-visible, .seg button:focus-visible, .chip-btn:focus-visible {
  outline: 2px solid #22d3ee; outline-offset: 2px;
}

.seg { display: inline-flex; flex-wrap: wrap; background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 12px; padding: 0.22rem; gap: 0.15rem; }
.seg button {
  min-height: 2.4rem; font: inherit; font-size: 0.84rem; font-weight: 700; cursor: pointer;
  border: 0; border-radius: 9px; padding: 0.4rem 0.75rem; background: transparent; color: var(--text-muted);
}
.seg button:hover { color: #fff; }
.seg button[aria-pressed="true"] { background: rgba(99, 102, 241, 0.26); color: #fff; }

.chip-btn {
  display: inline-flex; align-items: center; gap: 0.3rem; cursor: pointer;
  min-height: 2.25rem; padding: 0.3rem 0.75rem; border-radius: 999px;
  font: inherit; font-size: 0.82rem; font-weight: 600; color: var(--text);
  background: rgba(129, 140, 248, 0.08); border: 1px solid var(--border);
}
.chip-btn:hover { background: rgba(129, 140, 248, 0.2); border-color: rgba(129, 140, 248, 0.5); }
.chip-btn small { color: var(--text-dim); font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.7rem; }

/* ------------------------------------------------------------ Range input */
input[type="range"].pt-range { -webkit-appearance: none; appearance: none; width: 100%; height: 2rem; background: transparent; cursor: pointer; }
input[type="range"].pt-range::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, #818cf8, #22d3ee); }
input[type="range"].pt-range::-moz-range-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, #818cf8, #22d3ee); }
input[type="range"].pt-range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 50%;
  background: #fff; border: 3px solid #6366f1; box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
input[type="range"].pt-range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid #6366f1; }
input[type="range"].pt-range:focus-visible { outline: 2px solid #22d3ee; outline-offset: 4px; border-radius: 4px; }

.pt-input {
  font: inherit; color: var(--text); background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border); border-radius: 10px; padding: 0.5rem 0.7rem; min-height: 44px;
}
.pt-input:focus-visible { outline: 2px solid #22d3ee; outline-offset: 1px; border-color: transparent; }

/* ------------------------------------------------------------ Status line */
.pt-status { margin: 0.8rem 0 0; font-size: 0.9rem; color: var(--text-muted); min-height: 1.4em; }
.pt-status.ok { color: #a7f3d0; }
.pt-status.err { color: #fca5a5; font-weight: 600; }
.pt-hint { margin: 0.4rem 0 0; font-size: 0.8rem; color: var(--text-dim); text-align: center; }
kbd {
  font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.78rem;
  background: rgba(129, 140, 248, 0.14); border: 1px solid var(--border-soft);
  border-radius: 5px; padding: 0.05em 0.35em; color: #c7d2fe;
}

/* ------------------------------------------------------------ Prose tables */
.table-wrap { overflow-x: auto; margin: 0 0 1.5rem; border: 1px solid var(--border); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
table.data caption { text-align: left; padding: 0.85rem 1rem 0.2rem; color: var(--text-dim); font-size: 0.82rem; }
table.data th, table.data td { padding: 0.6rem 1rem; text-align: left; border-bottom: 1px solid var(--border-soft); }
table.data thead th {
  font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.68rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--indigo); font-weight: 700;
  background: rgba(255, 255, 255, 0.03);
}
table.data tbody tr:last-child td { border-bottom: 0; }
table.data td.mono, table.data th.mono { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.85rem; color: #a5f3fc; }
table.data tbody tr:hover { background: rgba(129, 140, 248, 0.05); }

/* ------------------------------------------------------------ Suno snippet */
.code-block .label .copy-btn {
  margin-left: auto; cursor: pointer; min-height: 2rem; padding: 0.25rem 0.7rem;
  font: inherit; font-size: 0.68rem; letter-spacing: 0.1em; color: #c7d2fe;
  background: rgba(129, 140, 248, 0.14); border: 1px solid var(--border); border-radius: 8px;
}
.code-block .label .copy-btn:hover { background: rgba(129, 140, 248, 0.28); }
.snippet-actions { margin: -0.6rem 0 1.4rem; }

@keyframes pt-spin { to { transform: rotate(360deg); } }
@media (max-width: 640px) {
  .pt-card { padding: 0.9rem; border-radius: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
