/**
 * RECATOOLS — Manglish & Singlish Translator (Phase 1)
 * style.css — Tool-specific styles only.
 * Inherits typography + grid from /assets/css/tool-page.css.
 *
 * Mirrors malaysian-singaporean-chinese-converter (.msmc-*) intentionally
 * — sibling tools should look identical. Uses .mst-* prefix for local
 * overrides.
 */

.mst-tool-card { padding: 1.25rem 1.5rem; }

/* ── Control bar ──────────────────────────────────────────────────── */
.mst-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: end;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #faf8f5;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.mst-mode-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1 1 360px;
    min-width: 300px;
}
.mst-mode-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    font-weight: 600;
}
.mst-mode-wrap select {
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    font-size: 0.9rem;
    cursor: pointer;
}
.mst-mode-wrap select:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.mst-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

.mst-btn-secondary {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    padding: 0.45rem 0.875rem;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-primary, #1a1814);
    transition: border-color 0.12s, color 0.12s;
}
.mst-btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.mst-btn-secondary:active {
    background: var(--accent-lt, #fff5f2);
}

.mst-sample-wrap { display: inline-flex; align-items: center; }
.mst-sample-select {
    padding: 0.45rem 2rem 0.45rem 0.875rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23999' stroke-width='1.5'%3E%3Cpath d='M3 5l3 3 3-3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.625rem center;
    background-size: 12px;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    color: var(--text-primary, #1a1814);
    transition: border-color 0.12s, color 0.12s;
}
.mst-sample-select:hover { border-color: var(--accent); color: var(--accent); }
.mst-sample-select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ── Particle intensity slider (the differentiator) ─────────────── */
.mst-particle-row {
    margin: 0 0 1rem;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fffaf0 100%);
    border: 1px solid #fde68a;
    border-radius: 10px;
}
.mst-particle-header {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-bottom: 8px;
}
.mst-particle-title {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #78350f;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.mst-particle-help {
    color: #b45309;
    display: inline-flex;
    cursor: help;
    line-height: 0;
}
.mst-particle-row input[type="range"] {
    width: 100%;
    accent-color: var(--accent);
    height: 6px;
    margin: 6px 0 4px;
}
.mst-particle-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
    font-size: 11px;
    color: #92400e;
    font-weight: 500;
    letter-spacing: 0.02em;
}
.mst-particle-labels span.active {
    color: var(--accent);
    font-weight: 700;
}

/* ── Input / output panes ─────────────────────────────────────────── */
.mst-panes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
@media (max-width: 768px) {
    .mst-panes { grid-template-columns: 1fr; }
    /* Sample <select> (appearance:none + long option text) would overflow a
       phone viewport on its intrinsic width — fill the row and clip instead. */
    .mst-actions { min-width: 0; max-width: 100%; }
    .mst-sample-wrap { min-width: 0; max-width: 100%; flex: 1 1 100%; }
    .mst-sample-select { width: 100%; max-width: 100%; min-width: 0; }
}
.mst-pane { display: flex; flex-direction: column; min-width: 0; }
.mst-pane-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 6px;
}

.mst-pane textarea,
.mst-output {
    width: 100%;
    min-height: 280px;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: -apple-system, "Inter", "Helvetica Neue", system-ui, sans-serif;
    font-size: 0.95rem;
    line-height: 1.75;
    background: #fff;
    box-sizing: border-box;
}
.mst-pane textarea { resize: vertical; }
.mst-pane textarea:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
    border-color: var(--accent);
}

.mst-output {
    background: #fafaf9;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-y: auto;
}
.mst-output:empty::before {
    content: 'Translated text will appear here';
    color: var(--text-muted);
}

/* Highlight changed words / particles */
.mst-hl {
    background: rgba(232, 71, 47, 0.16);
    color: inherit;
    padding: 0 2px;
    border-radius: 3px;
    cursor: help;
    transition: background 0.15s;
}
.mst-hl:hover { background: rgba(232, 71, 47, 0.32); }
.mst-hl-particle {
    background: rgba(245, 158, 11, 0.28);
    font-weight: 600;
}
.mst-hl-particle:hover { background: rgba(245, 158, 11, 0.5); }

/* ── Meta strip (stats + privacy) ─────────────────────────────────── */
.mst-meta { margin-top: 0.875rem; }
.mst-stats {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: 0 0 6px;
    font-variant-numeric: tabular-nums;
}
.mst-privacy {
    font-size: 0.8125rem;
    color: #047857;
    display: flex;
    gap: 6px;
    align-items: center;
    margin: 0;
}
.mst-privacy svg { flex-shrink: 0; }

/* ── Quality disclaimer (custom type) ─────────────────────────────── */
.mst-disclaimer {
    margin-top: 1rem;
    padding: 0.875rem 1rem;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    font-size: 0.8125rem;
    color: #78350f;
    line-height: 1.55;
}
.mst-disclaimer strong { color: #78350f; }

/* ── Premium upsell card ─────────────────────────────────────────── */
.mst-upsell {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    padding: 1.125rem 1.25rem;
    background: linear-gradient(135deg, #fff5f2 0%, #ffffff 100%);
    border: 1px solid rgba(232, 71, 47, 0.35);
    border-radius: 12px;
}
.mst-upsell-icon {
    color: var(--accent);
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    margin-top: 2px;
}
.mst-upsell-body { flex: 1; }
.mst-upsell-body strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 4px;
    color: var(--text-primary, #1a1814);
}
.mst-upsell-body p {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: 0 0 12px;
    line-height: 1.55;
}

.mst-btn-primary {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    padding: 0.6rem 1.125rem;
    border: 0;
    background: var(--accent);
    color: #fff;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: background 0.12s, transform 0.12s;
}
.mst-btn-primary:hover {
    background: var(--accent-h, #d43e27);
    transform: translateY(-1px);
}
.mst-btn-primary:active { transform: translateY(0); }

/* cache-buster: 2026-05-24T05:06:05Z */
