/* ============================================================================
   textkonverter.css — Tool-spezifische Styles für TEXT CONVERTER
   Geladen auf: tools/textkonverter.php  (NACH main-vhc.css)
   ============================================================================ */

/* ── Seitenbereich ───────────────────────────────── */

body.tool-page main {
  flex: 1;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 36px 20px 52px;
}

/* ── Tool-Header ─────────────────────────────────── */

.tk-header {
  text-align: center;
  margin-bottom: 2.2rem;
}

.tk-icon {
  width: 96px;
  height: 96px;
  display: block;
  margin: 0 auto 1rem;
  filter: drop-shadow(0 0 24px rgba(0, 245, 255, 0.35));
}

.tk-title {
  font-family: 'Orbitron', 'Segoe UI', system-ui, sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--neon1);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-shadow: 0 0 24px rgba(0, 229, 255, 0.45);
  margin: 0 0 0.5rem 0;
}

.tk-subtitle {
  font-size: 0.78rem;
  font-weight: 500;
  color: #84a2c6;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin: 0;
}

/* ── Wrapper ─────────────────────────────────────── */

.tool-wrap {
  width: 100%;
  max-width: 900px;
}

/* ── Eingabe-Karte ───────────────────────────────── */

.tk-input-card {
  background: linear-gradient(180deg, #0d1626, #0a1120);
  border: 1px solid var(--border);
  border-left: 3px solid var(--neon1);
  border-radius: 6px;
  padding: 1.1rem 1.2rem 1.25rem;
  margin-bottom: 1.4rem;
}

.tk-input-lbl {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #84a2c6;
  margin-bottom: 0.55rem;
}

.tk-input {
  width: 100%;
  box-sizing: border-box;
  background: #0a101e;
  border: 1px solid #243859;
  color: var(--text);
  font-size: 1rem;
  font-family: 'Exo 2', 'Segoe UI', system-ui, sans-serif;
  line-height: 1.5;
  padding: 0.6rem 0.8rem;
  border-radius: 3px;
  outline: none;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.tk-input--sm {
  font-size: 0.92rem;
  margin-bottom: 0.8rem;
}

.tk-input:focus {
  border-color: var(--neon1);
  box-shadow: 0 0 0 2px rgba(0, 245, 255, 0.08);
}

.tk-input::placeholder {
  color: #4a6488;
}

/* ── Grid / Karten ───────────────────────────────── */

.tk-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.1rem;
}

.tk-section-title {
  font-family: 'Orbitron', 'Segoe UI', system-ui, sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #84a2c6;
  margin: 2rem 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.tk-card {
  --tk-acc: #00f5ff;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(0, 245, 255, 0.05), transparent 55%),
    linear-gradient(180deg, #0d1626, #0a1120);
  border: 1px solid var(--border);
  border-left: 3px solid var(--tk-acc);
  border-radius: 6px;
  padding: 1.1rem 1.2rem 1.25rem;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.tk-card:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35),
              0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  transform: translateY(-2px);
}

.tk-card[data-accent="cyan"]   { --tk-acc: #00f5ff; }
.tk-card[data-accent="green"]  { --tk-acc: #00ff88; }
.tk-card[data-accent="violet"] { --tk-acc: #9d6bff; }
.tk-card[data-accent="amber"]  { --tk-acc: #ffb454; }

/* ── Kartenkopf ──────────────────────────────────── */

.tk-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.9rem;
}

.tk-card-het {
  min-width: 0;
}

.tk-card-title {
  font-family: 'Orbitron', 'Segoe UI', system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text);
  margin: 0.15rem 0 0.3rem 0;
}

.tk-card-desc {
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.5;
  color: #84a2c6;
  margin: 0;
}

/* ── Copy-Button (Idle muted, Hover neon) ────────── */

.tk-copy {
  flex: 0 0 auto;
  background: #0a101e;
  border: 1px solid #2e4a72;
  color: #84a2c6;
  font-size: 0.7rem;
  font-weight: 500;
  font-family: 'Exo 2', 'Segoe UI', system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  border-radius: 3px;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.tk-copy:hover {
  border-color: var(--neon1);
  color: var(--neon1);
}

.tk-copy.tk-copied {
  border-color: var(--tk-acc);
  color: var(--tk-acc);
}

/* ── Play-Button (Morse-Audio) ───────────────────── */

.tk-card-btns {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
}

.tk-play {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.78rem;
  background: #0a101e;
  border: 1px solid #2e4a72;
  border-radius: 3px;
  cursor: pointer;
  padding: 0;
  transition: border-color 0.2s, background 0.2s, opacity 0.2s;
}

.tk-play:disabled {
  cursor: default;
  opacity: 0.45;
}

.tk-play:not(:disabled):hover {
  border-color: var(--tk-acc);
}

/* CSS-Lautsprecher: Korpus + Schallkegel via Pseudo-Elementen */
.tk-play-ico {
  position: relative;
  display: inline-block;
  width: 0;
  height: 0;
  /* Korpus: kleines Quadrat links, Konus nach rechts */
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-right: 7px solid #84a2c6;
  margin-left: 5px;
  transition: border-right-color 0.2s;
}

.tk-play-ico::before {
  content: "";
  position: absolute;
  top: -2px;
  right: -2px;
  width: 4px;
  height: 4px;
  background: #84a2c6;
  transition: background 0.2s;
}

/* Schallwellen (Bogen) rechts vom Konus */
.tk-play-ico::after {
  content: "";
  position: absolute;
  top: -3px;
  left: 4px;
  width: 4px;
  height: 6px;
  border: 1.5px solid #84a2c6;
  border-left-color: transparent;
  border-top-color: transparent;
  border-bottom-color: transparent;
  border-radius: 0 6px 6px 0;
  transition: border-right-color 0.2s;
}

.tk-play:not(:disabled):hover .tk-play-ico,
.tk-play:not(:disabled):hover .tk-play-ico::before {
  border-right-color: var(--tk-acc);
  background: var(--tk-acc);
}
.tk-play:not(:disabled):hover .tk-play-ico::after {
  border-right-color: var(--tk-acc);
}

/* Aktiver Wiedergabe-Zustand */
.tk-play.tk-playing {
  border-color: var(--tk-acc);
  background: rgba(255, 180, 84, 0.12);
}
.tk-play.tk-playing .tk-play-ico,
.tk-play.tk-playing .tk-play-ico::before {
  border-right-color: var(--tk-acc);
  background: var(--tk-acc);
}
.tk-play.tk-playing .tk-play-ico::after {
  border-right-color: var(--tk-acc);
  animation: tk-pulse 0.9s ease-in-out infinite;
}

@keyframes tk-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.3; }
}

/* ── Ausgabe-Feld ────────────────────────────────── */

.tk-out {
  background: #070c16;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.7rem 0.9rem;
  margin-top: auto;
  min-height: 2.6rem;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text);
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.tk-out--mono {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
}

/* ── Responsive ──────────────────────────────────── */

@media (max-width: 680px) {
  .tk-grid {
    grid-template-columns: 1fr;
  }
  .tk-title {
    font-size: 2rem;
  }
}

/* ── Eingabe-Wrapper + Clear-Button (rotes ×) ── */
.tk-ta-wrap { position: relative; }
.tk-ta-wrap .tk-input { padding-right: 38px; }
.tk-clear {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(255,0,110,0.4);
  border-radius: 4px;
  color: var(--neon2);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.tk-clear:hover {
  background: rgba(255,0,110,0.15);
  border-color: var(--neon2);
  box-shadow: 0 0 10px rgba(255,0,110,0.4);
}

/* ── Morse-Karaoke: gerade klingender Buchstabe hervorgehoben ── */
.tk-m-let { transition: color 0.06s, text-shadow 0.06s; }
.tk-m-let.tk-on { color: var(--neon4); text-shadow: 0 0 10px var(--neon4); }
