/* shared-ui styles split from app/static/styles.css. */

.sidebar-logout-form .ghost-button {
  width: 100%;
}

.job-reuse-actions .ghost-button {
  min-height: 34px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.job-reuse-actions .ghost-button:hover {
  background: var(--surface-soft);
}

.attachment-actions .link-button {
  min-height: 30px;
  white-space: nowrap;
}

.batch-reference-button,
.batch-add-button,
.batch-collapse-button,
.thread-action-button,
.job-action-button,
.job-reuse-actions .ghost-button {
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.batch-reference-button:hover,
.batch-add-button:hover,
.batch-collapse-button:hover,
.thread-action-button:hover,
.job-action-button:hover,
.job-reuse-actions .ghost-button:hover {
  transform: translateY(-1px);
}

.ghost-button,
.ghost-danger-button,
.link-button {
  border: 0;
  background: transparent;
  color: var(--text);
  font-weight: 800;
}

.ghost-button,
.ghost-danger-button {
  min-height: 34px;
  border-radius: 8px;
  padding: 0 10px;
}

.ghost-button:hover {
  background: var(--surface-soft);
}

.ghost-danger-button {
  color: var(--danger);
}

.ghost-danger-button:hover {
  background: var(--danger-bg);
}

.link-button {
  color: var(--primary);
  padding: 0;
}

.alert {
  border-radius: 10px;
  padding: 10px 12px;
  line-height: 1.45;
  white-space: pre-line;
}

.dismissible-alert {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.dismissible-alert > span {
  min-width: 0;
  white-space: pre-line;
}

.alert-dismiss-button {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: transparent;
  color: currentColor;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  opacity: 0.7;
}

.alert-dismiss-button:hover {
  background: rgba(127, 29, 29, 0.08);
  opacity: 1;
}

.alert-error {
  border: 1px solid #ffc8bf;
  background: var(--danger-bg);
  color: var(--danger);
}

.alert-success {
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.primary-button,
.full-width {
  width: 100%;
}

.primary-button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  font-weight: 900;
}

.admin-primary-button,
.danger-outline-button {
  min-height: 38px;
  border-radius: 8px;
  padding: 0 12px;
  font-weight: 900;
}

.danger-outline-button {
  border: 1px solid #f2aaa1;
  background: var(--surface-raised);
  color: var(--danger);
}

.hidden {
  display: none !important;
}

.app-icon {
  flex: 0 0 auto;
}

.icon-text-button,
.image-actions .icon-text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.conversation-menu .icon-text-button {
  justify-content: flex-start;
}

.image-actions .icon-text-button {
  width: 34px;
  min-width: 34px;
  min-height: 32px;
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 999px;
  padding: 0;
  font-size: 13px;
  font-weight: 900;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease,
    transform 160ms ease,
    width 160ms ease,
    gap 160ms ease,
    padding 160ms ease;
}

.image-actions .icon-text-button span {
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  white-space: nowrap;
  transition:
    max-width 160ms ease,
    opacity 120ms ease;
}

.image-actions .link-button {
  background: rgba(255, 255, 255, 0.86);
  color: #111827;
}

.image-actions .icon-text-button:hover,
.image-actions .icon-text-button:focus-visible {
  width: auto;
  min-width: 34px;
  gap: 6px;
  padding: 0 10px;
  transform: translateY(-1px) scale(1.06);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
}

.image-actions .icon-text-button:hover span,
.image-actions .icon-text-button:focus-visible span {
  max-width: 5em;
  opacity: 1;
}

.user-row-actions .icon-text-button,
.user-data-actions .icon-text-button,
.admin-card-heading .icon-text-button,
.admin-header .icon-text-button {
  min-height: 34px;
  border-radius: 8px;
  padding: 0 10px;
}

.user-row-actions .ghost-button.icon-text-button,
.user-data-actions .ghost-button.icon-text-button,
.admin-card-heading .ghost-button.icon-text-button,
.admin-header .ghost-button.icon-text-button {
  border: 1px solid var(--line);
  background: #fff;
}

.user-row-actions .ghost-button.icon-text-button:hover,
.user-data-actions .ghost-button.icon-text-button:hover,
.admin-card-heading .ghost-button.icon-text-button:hover,
.admin-header .ghost-button.icon-text-button:hover {
  border-color: #c4ccd9;
  background: #f8fafc;
}

.ghost-button.danger {
  border-color: #fecaca;
  color: #b91c1c;
}

.ghost-button.danger:hover {
  background: #fef2f2;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@keyframes glass-surface-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.992);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .composer-mode-button,
    .marketing-nav,
    .marketing-hero-copy,
    .marketing-preview,
    .preview-card,
    .marketing-feature-strip,
    .marketing-credit-note,
    .marketing-workflow,
    .template-tab,
    .template-category,
    .conversation-item,
    .workspace-nav-item,
    .sidebar-collapse-button,
    .discover-category,
    .discover-card,
    .template-card,
    .user-row,
    .ghost-button,
    .admin-primary-button,
    .danger-outline-button,
    .mask-edit-button,
    .base-select-trigger,
    .base-select-option,
    .select-menu-enter-active,
    .select-menu-leave-active,
    .template-sidebar-motion-enter-active,
    .template-sidebar-motion-leave-active,
    .user-data-panel,
    .template-form,
    .conversation-menu,
    .base-select-menu,
    .discover-card {
      animation: none;
      transition: none;
    }
}

.small-icon-button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid #d7dfeb;
  border-radius: 9px;
  background: #fff;
  color: #0f172a;
  cursor: pointer;
}

.small-icon-button:hover {
  border-color: #b9c6d8;
  background: #f8fafc;
}

.secondary-button {
  min-height: 38px;
  border: 1px solid #d7dfeb;
  border-radius: 9px;
  padding: 0 14px;
  background: #fff;
  color: #0f172a;
  font-weight: 900;
}

.secondary-button:hover {
  background: #f8fafc;
}

@media (max-width: 900px) {
  .composer-card.mobile-composer-collapsed .composer-top,
    .composer-card.mobile-composer-collapsed .batch-panel,
    .composer-card.mobile-composer-collapsed .dismissible-alert {
      display: none;
    }
}

@media (max-width: 560px) {
  .composer-top-actions .icon-text-button,
    .composer-doc-button,
    .composer-template-button {
      width: 100%;
      justify-content: center;
    }
}

@media (min-width: 901px) {
  .ghost-button,
  .ghost-danger-button {
    min-height: 28px;
    padding: 0 8px;
    font-size: 12px;
  }

  .image-actions .icon-text-button {
    width: 28px;
    min-width: 28px;
    min-height: 27px;
    font-size: 12px;
  }

  .image-actions .icon-text-button:hover,
  .image-actions .icon-text-button:focus-visible {
    min-width: 28px;
    gap: 5px;
    padding: 0 8px;
  }
}
