/* =========================================================
   Learning Rewired Lab — The Lab · Get Help widget styles
   File: /the-lab/app/assets/css/lab-support.css
   Pairs with assets/js/lab-support.js. Uses the shared --lab-*
   tokens from the-lab.css (loaded first on every surface).
   ========================================================= */

.ls-root {
  position: fixed; inset: 0; z-index: 900;
  pointer-events: none;
}
.ls-root.is-open { pointer-events: auto; }

.ls-backdrop {
  position: absolute; inset: 0;
  background: rgba(7, 17, 31, .32);
  opacity: 0; transition: opacity .2s ease;
}
.ls-root.is-open .ls-backdrop { opacity: 1; }

.ls-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(400px, 100vw);
  background: var(--lab-card, #fff);
  box-shadow: -18px 0 40px rgba(7, 17, 31, .18);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .25s cubic-bezier(.2, .8, .2, 1);
}
.ls-root.is-open .ls-panel { transform: translateX(0); }

.ls-head {
  flex: none; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 22px 22px 18px;
  background: var(--lab-ink, #07111f);
  color: #fff;
}
.ls-head-tx { display: grid; gap: 3px; }
.ls-head-tx strong { font-size: 17px; font-weight: 850; letter-spacing: -.02em; }
.ls-head-tx span { font-size: 12.5px; color: rgba(226, 242, 247, .6); font-weight: 600; }
.ls-close {
  flex: none; width: 30px; height: 30px; border-radius: 9px; border: 0;
  background: rgba(255, 255, 255, .08); color: #fff; font-size: 18px; line-height: 1;
  cursor: pointer; display: grid; place-items: center; transition: background .15s;
}
.ls-close:hover { background: rgba(255, 255, 255, .16); }

.ls-tabs {
  flex: none; display: flex; gap: 4px; padding: 12px 22px 0;
  border-bottom: 1px solid var(--lab-line, #e3e9ea);
}
.ls-tab {
  font-family: inherit; font-size: 13px; font-weight: 800; color: var(--lab-slate, #64748b);
  background: none; border: 0; padding: 10px 4px 12px; margin-right: 18px; cursor: pointer;
  border-bottom: 2px solid transparent; transition: color .15s, border-color .15s;
}
.ls-tab.is-active { color: var(--lab-teal-d, #0f766e); border-color: var(--lab-teal, #14b8a6); }

.ls-body { flex: 1 1 auto; overflow-y: auto; padding: 20px 22px 26px; }

/* ---- FAQ -------------------------------------------------------- */
.ls-faq { display: grid; gap: 8px; }
.ls-faq-item {
  border: 1px solid var(--lab-line, #e3e9ea); border-radius: 13px; padding: 13px 15px;
}
.ls-faq-item summary {
  font-size: 13.5px; font-weight: 800; color: var(--lab-ink, #07111f); cursor: pointer;
  list-style: none; display: flex; align-items: center; gap: 8px;
}
.ls-faq-item summary::-webkit-details-marker { display: none; }
.ls-faq-item summary::before { content: "+"; color: var(--lab-teal-d, #0f766e); font-weight: 900; width: 14px; }
.ls-faq-item[open] summary::before { content: "\2212"; }
.ls-faq-item p { margin: 9px 0 0 22px; font-size: 13px; line-height: 1.55; color: var(--lab-slate, #64748b); font-weight: 550; }

.ls-still { margin-top: 20px; text-align: center; padding-top: 18px; border-top: 1px dashed var(--lab-line, #e3e9ea); }
.ls-still p { margin: 0 0 10px; font-size: 13px; font-weight: 700; color: var(--lab-slate, #64748b); }

/* ---- buttons ------------------------------------------------------ */
.ls-btn {
  font-family: inherit; font-weight: 850; font-size: 13px; border-radius: 11px; cursor: pointer;
  padding: 11px 18px; border: 0; transition: background .15s, opacity .15s;
}
.ls-btn-primary { color: #fff; background: var(--lab-teal, #14b8a6); box-shadow: 0 8px 18px rgba(20, 184, 166, .24); }
.ls-btn-primary:hover { background: #0f9e8e; }
.ls-btn-primary:disabled { opacity: .6; cursor: default; }
.ls-btn-ghost { color: var(--lab-ink, #07111f); background: #f1f5f9; }
.ls-btn-ghost:hover { background: #e6edf0; }

/* ---- form ----------------------------------------------------------- */
.ls-form { display: grid; gap: 16px; }
.ls-field { display: grid; gap: 7px; }
.ls-field span { font-size: 12.5px; font-weight: 800; color: var(--lab-ink, #07111f); }
.ls-field select, .ls-field textarea {
  font-family: inherit; font-size: 13.5px; font-weight: 600; color: var(--lab-ink, #07111f);
  border: 1px solid var(--lab-line, #e3e9ea); border-radius: 11px; padding: 11px 13px;
  background: #fff; resize: vertical;
}
.ls-field select:focus, .ls-field textarea:focus { outline: 2px solid rgba(20, 184, 166, .35); outline-offset: 1px; }

.ls-attach-preview {
  margin-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 12.5px; font-weight: 700; color: var(--lab-slate, #64748b);
  background: #f8fafc; border: 1px solid var(--lab-line, #e3e9ea); border-radius: 10px; padding: 8px 12px;
}
.ls-attach-preview button {
  border: 0; background: none; font-size: 16px; line-height: 1; cursor: pointer; color: var(--lab-slate, #64748b);
}

.ls-hint { margin: 0; font-size: 12px; color: #94a3b8; font-weight: 600; line-height: 1.5; }
.ls-error {
  font-size: 12.5px; font-weight: 750; color: #b3261e; background: rgba(179, 38, 30, .08);
  border: 1px solid rgba(179, 38, 30, .22); border-radius: 10px; padding: 9px 12px;
}
.ls-form-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* ---- sent confirmation ---------------------------------------------- */
.ls-sent { text-align: center; padding: 30px 6px 10px; display: grid; gap: 8px; justify-items: center; }
.ls-sent-mark {
  width: 46px; height: 46px; border-radius: 999px; background: rgba(20, 184, 166, .12);
  color: var(--lab-teal-d, #0f766e); font-size: 20px; font-weight: 900; display: grid; place-items: center;
  margin-bottom: 6px;
}
.ls-sent h3 { margin: 0; font-size: 17px; font-weight: 900; letter-spacing: -.02em; color: var(--lab-ink, #07111f); }
.ls-sent p { margin: 0; font-size: 13px; color: var(--lab-slate, #64748b); font-weight: 600; max-width: 280px; }
.ls-sent .ls-btn { margin-top: 14px; }

/* ---- my requests ------------------------------------------------------ */
.ls-mine-loading, .ls-mine-empty {
  text-align: center; padding: 40px 12px; font-size: 13px; font-weight: 650; color: var(--lab-slate, #64748b);
}
.ls-mine-list { display: grid; gap: 10px; }
.ls-ticket { border: 1px solid var(--lab-line, #e3e9ea); border-radius: 13px; padding: 13px 15px; }
.ls-ticket-top { display: flex; gap: 6px; margin-bottom: 8px; }
.ls-chip { font-size: 10px; font-weight: 850; letter-spacing: .03em; text-transform: uppercase; border-radius: 999px; padding: 3px 9px; }
.ls-chip-cat { color: var(--lab-teal-d, #0f766e); background: rgba(20, 184, 166, .1); }
.ls-chip-status { color: #64748b; background: #f1f5f9; }
.ls-status-open { color: #9a6a04; background: rgba(224, 169, 63, .14); }
.ls-status-answered { color: var(--lab-teal-d, #0f766e); background: rgba(20, 184, 166, .14); }
.ls-status-closed { color: #64748b; background: #f1f5f9; }
.ls-ticket-msg { margin: 0; font-size: 13px; line-height: 1.5; color: var(--lab-ink, #07111f); font-weight: 600; }
.ls-ticket-foot { margin-top: 9px; display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; color: #94a3b8; font-weight: 650; }
.ls-link { border: 0; background: none; padding: 0; color: var(--lab-teal-d, #0f766e); font-weight: 800; cursor: pointer; font-size: 11.5px; font-family: inherit; }

@media (max-width: 520px) {
  .ls-panel { width: 100vw; }
}
