/*
 * Extracted reusable LOTOIQ patterns from public/styles.css.
 * Opt-in scope only; the consuming app opts in with .isolate-kit.
 * Load tokens.css before this file.
 */
.isolate-kit {
  color: var(--isolate-ink, #202e28);
  font-family: var(--isolate-font-family, Inter, 'Segoe UI', Arial, sans-serif);
  font-synthesis: none;
}

.isolate-kit *,
.isolate-kit *::before,
.isolate-kit *::after {
  box-sizing: border-box;
}

.isolate-kit .isolate-button {
  min-height: 42px;
  border: 1px solid var(--isolate-line, #e5e9e0);
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 16px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background 150ms, transform 150ms, box-shadow 150ms;
}

.isolate-kit .isolate-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px #173e3210;
}

.isolate-kit .isolate-button:focus-visible,
.isolate-kit a:focus-visible {
  outline: 3px solid #8eaf54;
  outline-offset: 3px;
}

.isolate-kit .isolate-field:focus,
.isolate-kit .isolate-select:focus {
  outline: 2px solid #91ad72;
  border-color: #91ad72;
}

.isolate-kit .isolate-button--primary {
  color: #fff;
  background: var(--isolate-green, #234d3d);
  border-color: var(--isolate-green, #234d3d);
}

.isolate-kit .isolate-button--primary:hover {
  background: #15392b;
}

.isolate-kit .isolate-button--secondary {
  color: var(--isolate-ink, #202e28);
  background: var(--isolate-paper, #fff);
}

.isolate-kit .isolate-button--secondary:hover {
  background: #f1f5ec;
}

.isolate-kit .isolate-button--light {
  color: var(--isolate-green-dark, #173e32);
  background: var(--isolate-lime, #e0efb6);
  border-color: var(--isolate-lime, #e0efb6);
}

.isolate-kit .isolate-button--danger {
  color: #fff;
  background: #aa463a;
  border-color: #aa463a;
}

.isolate-kit .isolate-button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.isolate-kit .isolate-field-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.isolate-kit .isolate-label {
  display: block;
  color: #7e8a70;
  font-size: 10px;
  font-weight: 550;
}

.isolate-kit .isolate-field,
.isolate-kit .isolate-select {
  width: 100%;
  min-height: 43px;
  padding: 10px 12px;
  color: #435039;
  background: #fff;
  border: 1px solid #dfe5d7;
  border-radius: 6px;
  font: inherit;
  font-size: 12px;
  line-height: 1.5;
}

.isolate-kit .isolate-field::placeholder {
  color: #a7b09b;
  font-size: 11px;
}

.isolate-kit .isolate-field[aria-invalid="true"] {
  border-color: #b24d3a;
}

.isolate-kit .isolate-error {
  color: #8d392d;
  font-size: 13px;
  line-height: 1.5;
}

.isolate-kit .isolate-panel {
  overflow: hidden;
  background: var(--isolate-paper, #fff);
  border: 1px solid var(--isolate-line, #e5e9e0);
  border-radius: 12px;
}

.isolate-kit .isolate-panel--padded {
  padding: 24px;
}

.isolate-kit .isolate-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 22px 22px 18px;
}

.isolate-kit .isolate-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 7px;
  color: #8c977c;
  background: #f5f7f0;
  border: 1px solid #e5e9dd;
  border-radius: 5px;
  font-size: 8px;
  font-weight: 500;
  white-space: nowrap;
}

.isolate-kit .isolate-badge::before {
  content: "";
  width: 4px;
  height: 4px;
  flex: 0 0 auto;
  background: currentColor;
  border-radius: 50%;
}

.isolate-kit .isolate-badge--amber {
  color: #b48c47;
  background: #fbf5e9;
  border-color: #f2e8d1;
}

.isolate-kit .isolate-badge--green {
  color: #7c955b;
  background: #f0f5e9;
  border-color: #e3ecd5;
}

.isolate-kit .isolate-badge--neutral {
  color: #9ca48f;
  background: #f5f6f2;
  border-color: #e9ede1;
}

.isolate-kit .isolate-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 17px;
  color: #83926c;
  background: #f0f5e9;
  border: 1px solid #e2eacf;
  border-radius: 8px;
  font-size: 11px;
  line-height: 1.7;
}

.isolate-kit .isolate-notice--warning {
  color: #a78c50;
  background: #fbf6e9;
  border-color: #ede2c8;
}

.isolate-kit .isolate-notice strong {
  color: inherit;
}

@media (max-width: 760px) {
  .isolate-kit .isolate-panel--padded {
    padding: 18px;
  }

  .isolate-kit .isolate-button {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .isolate-kit *,
  .isolate-kit *::before,
  .isolate-kit *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Compatibility aliases for the existing app's namespaced screen markup.
   The original HTML and its interaction selectors remain unchanged. */
:where(.isolate-kit) .button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 16px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .15s, transform .15s, box-shadow .15s;
}
:where(.isolate-kit) .button:hover { transform: translateY(-1px); box-shadow: 0 3px 8px #173e3210; }
:where(.isolate-kit) .button.primary { color: white; background: var(--green); border-color: var(--green); }
:where(.isolate-kit) .button.primary:hover { background: #15392b; }
:where(.isolate-kit) .button.secondary { color: var(--ink); background: var(--paper); }
:where(.isolate-kit) .button.secondary:hover { background: #f1f5ec; }
:where(.isolate-kit) .button.light { color: var(--green-dark); background: var(--lime); border-color: var(--lime); }
:where(.isolate-kit) .button.danger { color: white; background: #aa463a; border-color: #aa463a; }
:where(.isolate-kit) .button:disabled { opacity: .5; cursor: not-allowed; }

:where(.isolate-kit) .panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 21px;
}
:where(.isolate-kit) .panel.padded { padding: 24px; }
:where(.isolate-kit) .panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 22px 22px 18px;
}

:where(.isolate-kit) .badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #e5e9dd;
  border-radius: 5px;
  background: #f5f7f0;
  color: #8c977c;
  font-size: 8px;
  font-weight: 500;
  padding: 5px 7px;
  white-space: nowrap;
}
:where(.isolate-kit) .badge::before { content: none; }
:where(.isolate-kit) .badge i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}
:where(.isolate-kit) .badge.amber { background: #fbf5e9; color: #b48c47; border-color: #f2e8d1; }
:where(.isolate-kit) .badge.green { background: #f0f5e9; color: #7c955b; border-color: #e3ecd5; }
:where(.isolate-kit) .badge.neutral { background: #f5f6f2; color: #9ca48f; border-color: #e9ede1; }

:where(.isolate-kit) .notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #f0f5e9;
  border: 1px solid #e2eacf;
  color: #83926c;
  font-size: 11px;
  line-height: 1.7;
  padding: 14px 17px;
  border-radius: 8px;
  margin: 18px 0;
}
:where(.isolate-kit) .notice.warning { background: #fbf6e9; border-color: #ede2c8; color: #a78c50; }
:where(.isolate-kit) .notice:has(ul) { display: block; }
:where(.isolate-kit) .notice strong { color: inherit; }

/* Controls are scoped to the kit; search inputs retain their toolbar styling. */
:where(.isolate-kit) input:not([type="checkbox"]):not(.search-box input),
:where(.isolate-kit) textarea,
:where(.isolate-kit) select:not(.toolbar > select) {
  width: 100%;
  min-height: 43px;
  padding: 10px 12px;
  color: #435039;
  background: #fff;
  border: 1px solid #dfe5d7;
  border-radius: 6px;
  font: inherit;
  font-size: 12px;
  line-height: 1.5;
}
:where(.isolate-kit) input:not([type="checkbox"]):not(.search-box input):focus,
:where(.isolate-kit) textarea:focus,
:where(.isolate-kit) select:not(.toolbar > select):focus {
  outline: 2px solid #91ad72;
  border-color: #91ad72;
}
:where(.isolate-kit) input:not([type="checkbox"]):not(.search-box input)::placeholder,
:where(.isolate-kit) textarea::placeholder { color: #a7b09b; font-size: 11px; }
:where(.isolate-kit) input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-height: 16px;
  padding: 0;
  accent-color: var(--green);
  flex-shrink: 0;
}
:where(.isolate-kit) textarea { resize: vertical; min-height: 90px; }

@media (max-width: 760px) {
  :where(.isolate-kit) .button { white-space: normal; }
}
