/* =========================================================
   Detector shell for /pt-br/detector-de-ia/ — the paste-box tool UI.


   Lifted verbatim from tools/ai-detector/index.html, which keeps its own
   inline copy. Only pages that link this file are affected, so the live
   tool pages are untouched.

   Every colour/radius/shadow here is a token already defined by
   css/landing.css + css/lp/landing-lp.css. Link this AFTER both.

   Studio contract (ids the tool JS binds to):
     #editor #wordCount #runBtn #resultArea #rpBadge #rpIdle
     #usage #sampleBtn #clearBtn #pasteBtn #toast
   ========================================================= */

/* ---------- STUDIO SHELL ---------- */
.studio-wrap { max-width: 1180px; margin: -16px auto 0; padding: 0 32px 10px; position: relative; z-index: 2; }
.studio { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.studio-head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 20px; border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fbfcfe, #fff);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.studio-head .sh-left { display: flex; align-items: center; gap: 11px; min-width: 0; }
.studio-head .sh-ic { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; background: var(--brand-softer); color: var(--brand); display: grid; place-items: center; }
.studio-head .sh-title { font-weight: 800; font-size: 15px; letter-spacing: -.01em; }
.studio-head .sh-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }

/* usage meter */
.usage { display: flex; align-items: center; gap: 10px; }
.usage .u-text { font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.usage .u-text b { color: var(--ink); }
.usage .u-bar { width: 92px; height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.usage .u-bar > i { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--brand), #5aa3e8); border-radius: 999px; transition: width .4s ease; }
.usage.low .u-bar > i { background: linear-gradient(90deg, var(--amber), #f59e0b); }
.usage.out .u-bar > i { background: linear-gradient(90deg, var(--red), #f43f5e); }

.studio-grid { display: grid; grid-template-columns: 1fr 1.05fr; align-items: stretch; }
.studio-left { padding: 20px; border-right: 1px solid var(--border); min-width: 0; border-bottom-left-radius: var(--radius-lg); }
.left-sticky { position: sticky; top: 80px; }
.studio-right { padding: 20px; min-width: 0; background: var(--surface-3); border-bottom-right-radius: var(--radius-lg); }

/* ---------- PROSE TEXT INPUT ---------- */
.text-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.text-bar .tb-btn { font-size: 12px; font-weight: 700; color: var(--ink-2); background: #fff; border: 1px solid var(--border); border-radius: 9px; padding: 7px 11px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.text-bar .tb-btn:hover { border-color: var(--brand); color: var(--brand); }
.text-bar .sp { flex: 1; }
.text-bar .tb-note { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.text-input { width: 100%; min-height: 320px; resize: vertical; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; font-family: inherit; font-size: 15px; line-height: 1.62; color: var(--ink); background: #fff; }
.text-input::placeholder { color: var(--muted-2); }
.text-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-softer); }
.text-run { height: 42px; padding: 0 20px; border-radius: 11px; border: 0; background: linear-gradient(180deg, #4a99e6, #2c6cb0); color: #fff; font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; box-shadow: 0 4px 12px rgba(55,136,216,.26); cursor: pointer; margin-top: 12px; }
.text-run:hover { transform: translateY(-1px); }

/* ---------- RESULT ---------- */
.rp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.rp-title { font-size: 11px; font-weight: 800; letter-spacing: .12em; color: var(--muted-2); }
.rp-badge { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; padding: 4px 9px; border-radius: 6px; background: var(--surface-2); color: var(--muted); }
.rp-badge.scanning { background: var(--brand-softer); color: var(--brand); }
.rp-badge.done { background: var(--green-soft); color: var(--green); }

.rp-idle { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 360px; gap: 12px; color: var(--muted); }
.rp-idle .ri-ic { width: 60px; height: 60px; border-radius: 16px; background: #fff; border: 1px solid var(--border); display: grid; place-items: center; color: var(--muted-2); }
.rp-idle h3 { margin: 0; font-size: 16px; font-weight: 800; color: var(--ink-2); }
.rp-idle p { margin: 0; font-size: 13px; max-width: 32ch; line-height: 1.5; }

/* ---------- SCOPE NOTICE ----------
   The detector is tuned on English. On a localized page the visitor is very
   likely to paste text in that language, so the caveat sits with the tool
   rather than buried in the prose further down the page. */
.studio-note {
  display: flex; gap: 10px; align-items: flex-start;
  margin-bottom: 14px; padding: 11px 13px;
  border: 1px solid var(--border); border-left: 3px solid var(--amber);
  border-radius: 10px; background: var(--amber-soft);
  font-size: 12.5px; line-height: 1.5; color: var(--ink-2);
}
.studio-note svg { flex: 0 0 16px; margin-top: 1px; color: #b45309; }
.studio-note b { color: var(--ink); }

/* toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); z-index: 210; background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; padding: 11px 18px; border-radius: 10px; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
.toast.show { opacity: 1; transform: translateX(-50%); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 920px) {
  .studio-grid { grid-template-columns: 1fr; }
  .left-sticky { position: static; top: auto; }
  .studio-left { border-right: 0; border-bottom: 1px solid var(--border); border-radius: 0; }
}
@media (max-width: 640px) {
  .studio-wrap { padding: 0 14px 10px; }
  .studio-left, .studio-right { padding: 14px; }
  .studio-head { flex-wrap: wrap; }
}
