/*
 * Application-wide styles.
 *
 * Hover help for action buttons and icon controls. Any element with a
 * data-tooltip attribute shows a small label on hover/focus.
 */
[data-tooltip] {
  position: relative;
}

[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  max-width: 18rem;
  white-space: normal;
  border-radius: 0.5rem;
  background: #0f172a;
  color: #fff;
  font-size: 11px;
  line-height: 1.35;
  padding: 0.35rem 0.5rem;
  text-align: center;
  pointer-events: none;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
}

[data-tooltip]:hover::before,
[data-tooltip]:focus-visible::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 3px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  border: 4px solid transparent;
  border-top-color: #0f172a;
  pointer-events: none;
}

/* ActionText / Trix editor surface. Loaded after actiontext.css so these
   match the rest of the app rather than the default Trix styling. */
trix-editor {
  border: 1px solid #cbd5e1;
  border-radius: 0.75rem;
  min-height: 14rem;
  padding: 0.75rem;
  background: #fff;
  font-size: 0.875rem;
  line-height: 1.6;
}

trix-editor:focus {
  outline: 2px solid #a5b4fc;
  outline-offset: 1px;
}

trix-toolbar .trix-button-group {
  border-color: #e2e8f0;
}

trix-toolbar .trix-button {
  border-bottom-color: #e2e8f0;
}

.trix-content h1 {
  font-size: 1.6rem;
  font-weight: 800;
  margin: 1rem 0 0.5rem;
}

.trix-content h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0.9rem 0 0.45rem;
}

.trix-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0.8rem 0 0.4rem;
}

.trix-content ul {
  list-style: disc;
  padding-left: 1.25rem;
  margin: 0.5rem 0;
}

.trix-content ol {
  list-style: decimal;
  padding-left: 1.25rem;
  margin: 0.5rem 0;
}

.trix-content blockquote {
  border-left: 3px solid #cbd5e1;
  padding-left: 0.9rem;
  color: #475569;
  margin: 0.75rem 0;
}

.trix-content a {
  color: #4338ca;
  text-decoration: underline;
}

.trix-content pre {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.75rem;
  overflow-x: auto;
}
