/* ScopeLine: styles that exist only in this tool. Shared look: ../../shared/css/style.css */

/* Page shell ---------------------------------------------------------------
   Desktop: a fixed one-screen cockpit. Below 1024px the columns stack and
   the page scrolls normally (the original locked overflow on every screen
   size, which made the app unusable on phones and small laptops). */

html, body { min-height: 100%; }

.app-shell { min-height: 100vh; min-height: 100dvh; }

@media (min-width: 1024px) {
  html, body { height: 100%; overflow: hidden; }

  .app-shell { height: 100vh; height: 100dvh; }
}

/* Imported files: one card per email / document, above the text box ------ */

.well-stack { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }

.well-stack > textarea { flex: 1 0 auto; height: auto; }

.well-stack.has-docs > textarea { min-height: 70px; }

.doc-list { display: flex; flex-direction: column; gap: 10px; }

.doc-list[hidden] { display: none; }

.doc-card {
  --accent: #6366f1;
  --accent-soft: #eef2ff;
  position: relative;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 10px 12px 10px 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 6px 16px -8px rgba(15, 23, 42, 0.18);
  overflow: hidden;
  animation: doc-card-in 0.28s ease-out;
}

.doc-card--email { --accent: #e11d48; --accent-soft: #fff1f2; }

.doc-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 45%, #a855f7));
}

.doc-card__head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }

.doc-card__badge {
  flex: none;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 2px 6px color-mix(in srgb, var(--accent) 40%, transparent);
}

.doc-card__kind {
  flex: none;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.doc-card__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
}

.doc-card__remove {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  color: #94a3b8;
  font-size: 18px;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
}

.doc-card__remove:hover,
.doc-card__remove:focus-visible { background: var(--accent-soft); color: var(--accent); }

.doc-card__body {
  margin: 0;
  color: #1e293b;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.doc-card__body.is-open { display: block; }

.doc-card__more {
  margin-top: 4px;
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 700;
}

.doc-card__more:hover { text-decoration: underline; }

@keyframes doc-card-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .doc-card { animation: none; }
}

.crystal-well-3d.is-drop-target {
  border-color: #6366f1;
  border-style: dashed;
  background: #eef2ff;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

/* Number inputs without spinners in the task list ------------------------- */

.item-hours::-webkit-outer-spin-button,
.item-hours::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.item-hours { -moz-appearance: textfield; appearance: textfield; }

/* Column 1 on the desktop cockpit: let the two input boxes shrink and scroll
   inside themselves so the Quick Check / AI Audit buttons never fall off the
   bottom of the screen. */

@media (min-width: 1024px) {
  section[aria-label="Inputs"] { min-height: 0; }
  section[aria-label="Inputs"] > .crystal-slab-3d { min-height: 0; }
  section[aria-label="Inputs"] .well-stack > textarea { min-height: 60px; }
}
