/* ═══════════════════════════════════════════════════════════
   Secret Link Tool — Styles
   Baut auf variables.css + main.css auf (tool-page, breadcrumbs, etc.)
   ═══════════════════════════════════════════════════════════ */

/* HTML hidden-Attribut darf nicht von display-Regeln überschrieben werden */
[hidden] { display: none !important; }

/* ── Layout ── */

.sl-wrap {
  max-width: 680px;
  margin: 0 auto;
}

/* Card: Hover-Lift aus main.css hier nicht erwünscht (Container, nicht klickbar) */
.sl-wrap .tool-card,
.sl-view-wrap .tool-card,
.sl-wrap .tool-card:hover,
.sl-view-wrap .tool-card:hover {
  transform: none;
}

/* ── Textarea ── */

.sl-textarea-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.sl-textarea {
  width: 100%;
  min-height: 140px;
  background: var(--surface-elevated, var(--bg));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.6;
  padding: 14px 16px;
  resize: vertical;
  transition: border-color 0.15s;
  box-sizing: border-box;
}

.sl-textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.sl-textarea::placeholder {
  color: var(--muted);
  font-family: var(--font-body, inherit);
  font-size: 14px;
}

.sl-char-count {
  text-align: right;
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

.sl-char-count.warn {
  color: var(--accent);
}

/* ── Optionen ── */

.sl-options {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}

.sl-option-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.sl-option-label {
  font-size: 13px;
  color: var(--muted);
  min-width: 90px;
  flex-shrink: 0;
}

.sl-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* Pills → shared .tool-pill */
/* Checkbox → shared .tool-checkbox */
/* (Klassen im HTML: sl-pill → tool-pill, sl-pw-toggle → tool-checkbox) */

.sl-pw-field {
  margin-top: 12px;
  display: none;
}

.sl-pw-field.visible {
  display: block;
}

.sl-pw-input {
  width: 100%;
  background: var(--surface-elevated, var(--bg));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 16px;
  padding: 10px 14px;
  transition: border-color 0.15s;
  box-sizing: border-box;
  font-family: var(--font-mono);
}

.sl-pw-input:focus {
  outline: none;
  border-color: var(--accent);
}

.sl-pw-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.5;
}

/* ── Erstellen-Button ── */

/* Submit → shared .tool-btn-primary (+ margin-top als einziger Override) */
.sl-submit {
  margin-top: 24px;
}

.sl-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: sl-spin 0.6s linear infinite;
  display: none;
}

@keyframes sl-spin {
  to { transform: rotate(360deg); }
}

/* ── Ergebnis-Panel ── */

.sl-result {
  display: none;
}

.sl-result.visible {
  display: block;
}

.sl-result-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--accent);
  font-weight: 600;
  font-size: 15px;
}

.sl-result-header svg {
  flex-shrink: 0;
}

.sl-link-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.sl-link-box {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
}

.sl-link-text {
  flex: 1;
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary, var(--text));
  word-break: break-all;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.sl-copy-btn {
  flex-shrink: 0;
  padding: 0 18px;
  background: var(--surface);
  border: none;
  border-left: 1px solid var(--border);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
  min-width: 80px;
}

.sl-copy-btn:hover {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.sl-copy-btn.copied {
  color: var(--success, #22c55e);
}

.sl-warning-box {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-top: 14px;
}

.sl-warning-box svg {
  flex-shrink: 0;
  margin-top: 1px;
}

.sl-warning-box p {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary, var(--muted));
  line-height: 1.55;
}

.sl-reset-btn {
  margin-top: 16px;
  padding: 8px 20px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, color 0.15s;
}

.sl-reset-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}

/* ── Fehler-Meldung ── */

.sl-error {
  display: none;
  margin-top: 12px;
  padding: 10px 14px;
  background: color-mix(in srgb, var(--error, #ef4444) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--error, #ef4444) 25%, transparent);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--error, #ef4444);
}

.sl-error.visible {
  display: block;
}

/* ── Trennlinie ── */

/* Divider → shared .tool-divider */

/* ── Wie-es-funktioniert-Section ── */

.sl-how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.sl-how-step {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sl-how-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sl-how-step h3 {
  font-size: 14px;
  font-weight: 700;
  margin: 0;
}

.sl-how-step p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  line-height: 1.55;
}

/* ── Security-Features ── */

.sl-security-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.sl-security-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.sl-security-item svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--accent);
}

.sl-security-item p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.sl-security-item strong {
  color: var(--text);
  display: block;
  margin-bottom: 2px;
}

/* ═══════════════════════════════════════════════════════════
   Empfänger-Seite (view/)
   ═══════════════════════════════════════════════════════════ */

.sl-view-wrap {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.sl-view-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sl-view-title {
  font-family: var(--font-head);
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

.sl-view-subtitle {
  font-size: 15px;
  color: var(--muted);
  margin: 0 0 28px;
  line-height: 1.6;
}

/* View-Card → shared .tool-card + text-align override */
.sl-view-card {
  text-align: left;
}

/* Passwort-Input auf View-Seite */

.sl-view-pw-group {
  margin-top: 20px;
  margin-bottom: 16px;
}

.sl-pw-wrapper {
  position: relative;
}

.sl-pw-wrapper input {
  padding-right: 88px;
}

.sl-pw-toggle-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
  font-family: inherit;
  transition: color 0.15s;
}

.sl-pw-toggle-btn:hover {
  color: var(--text);
}

.sl-view-pw-group .sl-textarea-label {
  display: block;
  margin-bottom: 6px;
}

.sl-view-pw-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 16px;
  padding: 10px 14px;
  transition: border-color 0.15s;
  font-family: var(--font-mono);
  box-sizing: border-box;
}

.sl-view-pw-input:focus {
  outline: none;
  border-color: var(--accent);
}

/* Enthüllen-Button */

.sl-reveal-btn {
  width: 100%;
  padding: 13px 24px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.sl-reveal-btn:hover {
  opacity: 0.9;
}

.sl-reveal-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Entschlüsselter Text */

/* Output-Panel → shared .tool-card + text-align center override */
.sl-output-panel {
  text-align: center;
}

.sl-output-text {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 20px 0;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  word-break: break-all;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  text-align: left;
}

.sl-output-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  margin-top: 16px;
}

.sl-output-actions .sl-copy-btn,
.sl-output-actions .sl-reset-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  height: 44px;
  line-height: 1;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: background var(--duration-fast), border-color 0.15s, color 0.15s;
  box-sizing: border-box;
}

.sl-output-actions .sl-copy-btn {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: var(--bg);
  min-width: unset;
}

.sl-output-actions .sl-copy-btn:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.sl-output-actions .sl-copy-btn.copied {
  background: var(--success, #22c55e);
  border-color: var(--success, #22c55e);
  color: #fff;
}

.sl-output-actions .sl-reset-btn {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  margin: 0;
}

.sl-output-actions .sl-reset-btn:hover {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border-color: var(--accent);
  color: var(--accent);
}

.sl-output-copy {
  padding: 8px 20px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
}

.sl-output-copy:hover {
  opacity: 0.85;
}

.sl-output-copy.copied {
  background: var(--success, #22c55e);
}

.sl-once-warning {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 10px 12px;
  background: color-mix(in srgb, #f59e0b 6%, transparent);
  border: 1px solid color-mix(in srgb, #f59e0b 20%, transparent);
  border-radius: var(--radius);
  margin-top: 12px;
  margin-bottom: 20px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

/* Status-States (loading / not-found / gone) */

.sl-status-checking {
  text-align: center;
  padding: 24px 0;
  color: var(--muted);
  font-size: 14px;
}

.sl-status-gone {
  text-align: center;
  padding: 12px 0;
}

.sl-status-gone .sl-gone-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--muted) 10%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sl-status-gone h2 {
  font-size: 18px;
  margin: 0 0 8px;
}

.sl-status-gone p {
  display: inline-block;
  font-size: 13px;
  color: var(--muted);
  margin: 12px 0 20px;
  line-height: 1.5;
  background: color-mix(in srgb, var(--muted) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--muted) 18%, transparent);
  border-radius: var(--radius);
  padding: 8px 16px;
}

.sl-trust-note {
  margin-top: 20px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

/* ── Promotion Grid (View-Seite) ── */

.sl-promo {
  margin-top: 16px;
  text-align: center;
}

.sl-promo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.sl-promo-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 20px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--text);
  font-size: 13px;
  transition: border-color 0.2s, transform 0.2s;
}

.sl-promo-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.sl-promo-card svg {
  color: var(--accent);
  margin-bottom: 4px;
}

.sl-promo-card strong {
  font-size: 14px;
}

.sl-promo-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

/* ── Responsiv ── */

@media (max-width: 600px) {

  .sl-option-group {
    flex-direction: column;
    align-items: flex-start;
  }

  .sl-option-label {
    min-width: unset;
  }

  .sl-link-box {
    flex-direction: column;
  }

  .sl-copy-btn {
    border-left: none;
    border-top: 1px solid var(--border);
    padding: 10px;
    width: 100%;
  }

  .sl-view-pw-group {
    flex-direction: column;
  }

  .sl-promo-grid {
    grid-template-columns: 1fr;
  }

  .sl-output-actions {
    flex-direction: column;
  }
}