/* Regex Tester — tool-specific styles */
.rx-pattern { display: flex; align-items: center; gap: 6px; background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 6px 12px; font-family: ui-monospace, Menlo, Consolas, monospace; }
.rx-slash { color: var(--muted-2); font-size: 1.2rem; }
.rx-input { flex: 1; background: none; border: none; color: var(--accent-2); font-family: inherit; font-size: 1rem; padding: 8px 4px; }
.rx-input:focus { outline: none; }
.rx-flags { width: 70px; background: none; border: none; color: var(--accent); font-family: inherit; font-size: 1rem; }
.rx-flags:focus { outline: none; }
.rx-flagrow { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 12px 0 4px; font-size: .82rem; color: var(--muted); }
.rx-flagrow label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; font-family: ui-monospace, monospace; }
.rx-flagrow label small { color: var(--muted-2); font-family: Inter, sans-serif; }
.rx-flagrow input { accent-color: var(--accent); }
.rx-flagrow .spacer { flex: 1; }
.rx-error { color: var(--danger); font-size: .82rem; }

.rx-label { display: block; font-size: .82rem; font-weight: 600; color: var(--muted); margin: 16px 0 8px; }
.rx-label small { color: var(--muted-2); font-weight: 400; }
.rx-textwrap { position: relative; }
.rx-highlight, .rx-text { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .95rem; line-height: 1.6;
  padding: 14px 15px; border-radius: var(--radius-sm); white-space: pre-wrap; word-break: break-word; }
.rx-highlight { position: absolute; inset: 0; color: transparent; pointer-events: none; overflow: hidden; border: 1px solid transparent; }
.rx-highlight mark { background: rgba(108,139,255,.34); color: transparent; border-radius: 3px; }
.rx-text { position: relative; width: 100%; min-height: 130px; resize: vertical; background: var(--bg-soft);
  color: var(--text); border: 1px solid var(--line); caret-color: var(--accent); }
.rx-text:focus { outline: none; border-color: var(--accent); }

.rx-replaceinput { width: 100%; background: var(--bg-soft); border: 1px solid var(--line); color: var(--text);
  padding: 11px 12px; border-radius: var(--radius-sm); font-family: ui-monospace, monospace; }
.rx-replaceinput:focus { outline: none; border-color: var(--accent); }
.rx-result-label { font-size: .82rem; font-weight: 600; color: var(--muted); margin: 14px 0 8px; }
.rx-replaceout { background: #0c0f1d; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px;
  font-family: ui-monospace, monospace; font-size: .9rem; color: var(--accent-2); white-space: pre-wrap; word-break: break-word; min-height: 20px; margin: 0; }
.rx-replaceout:empty { display: none; }

.rx-matches { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.rx-match { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; font-size: .85rem; }
.rx-match .rx-m { color: var(--accent-2); font-family: ui-monospace, monospace; font-weight: 600; }
.rx-match .rx-g { color: var(--muted); font-family: ui-monospace, monospace; display: block; margin-top: 4px; font-size: .8rem; }

.rx-cheat { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; max-width: 760px; margin: 0 auto; }
.rx-cheat div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; font-size: .85rem; color: var(--muted); }
.rx-cheat code { background: var(--card-2); color: var(--accent-2); padding: 1px 6px; border-radius: 5px; font-size: .85em; }
@media (max-width: 560px) { .rx-cheat { grid-template-columns: 1fr; } }
