/* Calm sage overlay — footer zone for New Category panel.
   Scoped to .calm-prompt-new-category with .chat-prompt-panel prefix
   for specificity to beat blod-bolge !important rules. */

/* ---- Action row with top divider ---- */
.calm-prompt-new-category .chat-prompt-form-actions {
  border-top: 1px solid rgba(228, 220, 212, 0.55) !important;
  margin-top: 16px !important;
  padding-top: 14px !important;
  padding-bottom: 4px !important;
  gap: 10px !important;
}

[data-theme="dark"] .calm-prompt-new-category .chat-prompt-form-actions {
  border-top-color: rgba(255, 255, 255, 0.08) !important;
}

/* ---- Shared button base ---- */
.calm-prompt-new-category .chat-prompt-form-cancel,
.calm-prompt-new-category .chat-prompt-form-save {
  height: 44px !important;
  border-radius: 14px !important;
  padding: 0 22px !important;
  font-size: var(--font-size-base) !important;
  font-weight: var(--font-weight-medium, 500) !important;
  font-family: var(--font-family) !important;
  transition: all 0.15s ease !important;
}

/* ---- Annuller — ghost warm-neutral ---- */
.calm-prompt-new-category .chat-prompt-form-cancel {
  background: transparent !important;
  color: #5C4D43 !important;
  border: 1px solid rgba(228, 220, 212, 0.55) !important;
}

.calm-prompt-new-category .chat-prompt-form-cancel:hover {
  background: rgba(92, 77, 67, 0.04) !important;
  border-color: rgba(228, 220, 212, 0.70) !important;
  color: #3A2F26 !important;
}

[data-theme="dark"] .calm-prompt-new-category .chat-prompt-form-cancel,
[data-theme="dark"] .chat-prompt-panel .calm-prompt-new-category .chat-prompt-form-cancel {
  color: rgba(255, 254, 251, 0.60) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .calm-prompt-new-category .chat-prompt-form-cancel:hover,
[data-theme="dark"] .chat-prompt-panel .calm-prompt-new-category .chat-prompt-form-cancel:hover {
  background: rgba(255, 255, 255, 0.04) !important;
  color: rgba(255, 254, 251, 0.80) !important;
}

/* ---- Opret — sage primary ---- */
.calm-prompt-new-category .chat-prompt-form-save,
.chat-prompt-panel .calm-prompt-new-category .chat-prompt-form-save {
  background: #6E8A7E !important;
  color: #FFFEFB !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(110, 138, 126, 0.25) !important;
  filter: none !important;
}

body:not(.chat-ny-in-conversation) .chat-prompt-panel .calm-prompt-new-category .chat-prompt-form .chat-prompt-form-save {
  background: #6E8A7E !important;
  color: #FFFEFB !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(110, 138, 126, 0.25) !important;
  filter: none !important;
}

.calm-prompt-new-category .chat-prompt-form-save:hover,
.chat-prompt-panel .calm-prompt-new-category .chat-prompt-form-save:hover {
  background: #4A7A68 !important;
  box-shadow: 0 6px 18px rgba(74, 122, 104, 0.35) !important;
  transform: scale(1.02) !important;
  filter: none !important;
}

body:not(.chat-ny-in-conversation) .chat-prompt-panel .calm-prompt-new-category .chat-prompt-form .chat-prompt-form-save:hover {
  background: #4A7A68 !important;
  box-shadow: 0 6px 18px rgba(74, 122, 104, 0.35) !important;
  filter: none !important;
}

.calm-prompt-new-category .chat-prompt-form-save:active,
.chat-prompt-panel .calm-prompt-new-category .chat-prompt-form-save:active {
  transform: scale(0.97) !important;
  box-shadow: 0 2px 6px rgba(110, 138, 126, 0.20) !important;
}

[data-theme="dark"] .calm-prompt-new-category .chat-prompt-form-save,
[data-theme="dark"] .chat-prompt-panel .calm-prompt-new-category .chat-prompt-form-save {
  background: #6E8A7E !important;
  color: #FFFEFB !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.30) !important;
}

[data-theme="dark"] body:not(.chat-ny-in-conversation) .chat-prompt-panel .calm-prompt-new-category .chat-prompt-form .chat-prompt-form-save {
  background: #6E8A7E !important;
  color: #FFFEFB !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.30) !important;
}

[data-theme="dark"] .calm-prompt-new-category .chat-prompt-form-save:hover,
[data-theme="dark"] .chat-prompt-panel .calm-prompt-new-category .chat-prompt-form-save:hover {
  background: #8AAFA1 !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.40) !important;
}

[data-theme="dark"] body:not(.chat-ny-in-conversation) .chat-prompt-panel .calm-prompt-new-category .chat-prompt-form .chat-prompt-form-save:hover {
  background: #8AAFA1 !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.40) !important;
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .calm-prompt-new-category .chat-prompt-form-cancel,
  .calm-prompt-new-category .chat-prompt-form-save {
    transition: none !important;
  }

  .calm-prompt-new-category .chat-prompt-form-save:hover {
    transform: none !important;
  }

  .calm-prompt-new-category .chat-prompt-form-save:active {
    transform: none !important;
  }
}

/* ============================================================
   #2995 — Add/Edit prompt form footer (.calm-prompt-form-mode)
   No redundant divider; sage Gem primary; quiet Annuller
   secondary. .chat-prompt-panel / body:not(...) prefixes beat
   the blod-bolge rose-dark !important rules.
   ============================================================ */

/* ---- Action row: list-screen family divider ---- */
.calm-prompt-form-mode .chat-prompt-form-actions {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  border-top: 1px solid rgba(58, 47, 38, 0.08) !important;
  margin-top: 4px !important;
  padding: 16px 18px 18px !important;
  gap: 10px !important;
}

/* ---- Shared button base ---- */
.calm-prompt-form-mode .chat-prompt-form-cancel,
.calm-prompt-form-mode .chat-prompt-form-save {
  height: 46px !important;
  border-radius: 12px !important;
  padding: 0 22px !important;
  font-size: var(--font-size-base) !important;
  font-weight: 600 !important;
  font-family: var(--font-family) !important;
  transition: background 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease, border-color 0.15s ease, color 0.15s ease !important;
}

/* Keep Gem motion scoped to visual affordances; never transition all. */
.calm-prompt-form-mode .chat-prompt-form-save {
  min-width: 100px !important;
  transition: background 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease !important;
}

/* ---- Annuller — quiet outlined secondary ---- */
.calm-prompt-form-mode .chat-prompt-form-cancel {
  background: transparent !important;
  color: #5C4D43 !important;
  border: 1px solid rgba(228, 220, 212, 0.55) !important;
  box-shadow: none !important;
}

.calm-prompt-form-mode .chat-prompt-form-actions > button:first-child {
  height: 46px !important;
  border-radius: 12px !important;
  font-weight: 600 !important;
}

.calm-prompt-form-mode .chat-prompt-form-cancel:hover {
  background: rgba(247, 242, 233, 0.80) !important;
  border-color: rgba(58, 47, 38, 0.18) !important;
  color: #3A2F26 !important;
}

.calm-prompt-form-mode .chat-prompt-form-cancel:focus-visible,
.calm-prompt-form-mode .chat-prompt-form-actions > button:first-child:focus-visible {
  outline: 2px solid #5C4D43 !important;
  outline-offset: 2px !important;
}

[data-theme="dark"] .calm-prompt-form-mode .chat-prompt-form-cancel,
[data-theme="dark"] .chat-prompt-panel .calm-prompt-form-mode .chat-prompt-form-cancel {
  color: rgba(255, 254, 251, 0.60) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .calm-prompt-form-mode .chat-prompt-form-cancel:hover,
[data-theme="dark"] .chat-prompt-panel .calm-prompt-form-mode .chat-prompt-form-cancel:hover {
  background: rgba(255, 255, 255, 0.04) !important;
  color: rgba(255, 254, 251, 0.80) !important;
}

/* ---- Gem — sage primary (never rose/brown/destructive) ---- */
.calm-prompt-form-mode .chat-prompt-form-save,
.chat-prompt-panel .calm-prompt-form-mode .chat-prompt-form-save,
body:not(.chat-ny-in-conversation) .chat-prompt-panel .calm-prompt-form-mode .chat-prompt-form .chat-prompt-form-save {
  background: #6E8A7E !important;
  color: #FFFEFB !important;
  border: none !important;
  box-shadow: 0 1px 2px rgba(58, 47, 38, 0.06) !important;
  filter: none !important;
}

.calm-prompt-form-mode .chat-prompt-form-save:hover,
.chat-prompt-panel .calm-prompt-form-mode .chat-prompt-form-save:hover,
body:not(.chat-ny-in-conversation) .chat-prompt-panel .calm-prompt-form-mode .chat-prompt-form .chat-prompt-form-save:hover {
  background: #5F7A6F !important;
  box-shadow: 0 2px 8px rgba(110, 138, 126, 0.20) !important;
  transform: none !important;
  filter: none !important;
}

.calm-prompt-form-mode .chat-prompt-form-save:active,
.chat-prompt-panel .calm-prompt-form-mode .chat-prompt-form-save:active,
.calm-prompt-form-mode .chat-prompt-form-actions > button:first-child:active {
  transform: scale(0.985) !important;
  box-shadow: 0 1px 2px rgba(58, 47, 38, 0.06) !important;
}

.calm-prompt-form-mode .chat-prompt-form-save:focus-visible {
  outline: 2px solid #5C4D43 !important;
  outline-offset: 2px !important;
}

/* ---- Disabled Gem: muted sage, never lifts ---- */
.calm-prompt-form-mode .chat-prompt-form-save:disabled,
.chat-prompt-panel .calm-prompt-form-mode .chat-prompt-form-save:disabled,
body:not(.chat-ny-in-conversation) .chat-prompt-panel .calm-prompt-form-mode .chat-prompt-form .chat-prompt-form-save:disabled {
  background: rgba(110, 138, 126, 0.45) !important;
  color: rgba(255, 254, 251, 0.85) !important;
  box-shadow: none !important;
  transform: none !important;
  cursor: default !important;
}

.calm-prompt-form-mode .chat-prompt-form-save:disabled:hover {
  background: rgba(110, 138, 126, 0.45) !important;
  box-shadow: none !important;
  transform: none !important;
}

[data-theme="dark"] .calm-prompt-form-mode .chat-prompt-form-save,
[data-theme="dark"] .chat-prompt-panel .calm-prompt-form-mode .chat-prompt-form-save,
[data-theme="dark"] body:not(.chat-ny-in-conversation) .chat-prompt-panel .calm-prompt-form-mode .chat-prompt-form .chat-prompt-form-save {
  background: #6E8A7E !important;
  color: #FFFEFB !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.20) !important;
}

[data-theme="dark"] .calm-prompt-form-mode .chat-prompt-form-save:hover,
[data-theme="dark"] .chat-prompt-panel .calm-prompt-form-mode .chat-prompt-form-save:hover {
  background: #5F7A6F !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28) !important;
}

[data-theme="dark"] .calm-prompt-form-mode .chat-prompt-form-save:disabled {
  background: rgba(110, 138, 126, 0.30) !important;
  color: rgba(255, 254, 251, 0.55) !important;
}

/* ---- Mobile fullscreen form-mode with AI dock (#3579) ---- */
@media (max-width: 640px) {
  .chat-prompt-panel--with-ai-dock .calm-prompt-form-mode > .chat-prompt-form-actions {
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    border-top: 1px solid rgba(58, 47, 38, 0.08) !important;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px)) !important;
    margin-top: 0 !important;
    background: #FFFEFB !important;
  }

  [data-theme="dark"] .chat-prompt-panel--with-ai-dock .calm-prompt-form-mode > .chat-prompt-form-actions {
    background: var(--color-card, #1c1b18) !important;
    border-top-color: rgba(255, 255, 255, 0.08) !important;
  }

  .chat-prompt-panel--with-ai-dock .calm-prompt-form-mode > .chat-prompt-form-actions .chat-prompt-form-cancel,
  .chat-prompt-panel--with-ai-dock .calm-prompt-form-mode > .chat-prompt-form-actions .chat-prompt-form-save {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    min-height: 48px !important;
    height: 48px !important;
    border-radius: 12px !important;
  }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .calm-prompt-form-mode .chat-prompt-form-cancel,
  .calm-prompt-form-mode .chat-prompt-form-save,
  .calm-prompt-form-mode .chat-prompt-form-actions button {
    transition: none !important;
  }

  .calm-prompt-form-mode .chat-prompt-form-save:hover,
  .calm-prompt-form-mode .chat-prompt-form-save:active {
    transform: none !important;
  }
}

/* ============================================================
   Saved category (list-mode) footer — primary/secondary actions (#2993)

   .chat-prompt-add-row holds, in order:
     .chat-prompt-build-btn       → "Byg med AI"     (filled sage primary)
     .chat-prompt-add-prompt-btn  → "Skriv selv"     (quiet outlined secondary;
                                                       intrinsic look lives in
                                                       calm-prompt-shell.css)
   Scoped to .calm-prompt-list-mode so the root chips panel footer is untouched.
   ============================================================ */

.calm-prompt-list-mode .chat-prompt-add-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px 18px;
  margin-top: 0;
  border-top: 1px solid rgba(58, 47, 38, 0.07);
}

[data-theme="dark"] .calm-prompt-list-mode .chat-prompt-add-row {
  border-top-color: rgba(255, 255, 255, 0.08) !important;
}

/* ---- Primary: Byg med AI — filled sage (overrides blod-bolge rose) ---- */
.calm-prompt-list-mode .chat-prompt-build-btn,
.chat-prompt-panel .calm-prompt-list-mode .chat-prompt-build-btn {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  /* fill/color/border/shadow are !important to beat the blod-bolge
     #chat-main button reset (background:none / border:none / color:inherit,
     specificity 1,0,1) — on desktop this panel mounts inside #chat-main, so a
     scoped class rule alone cannot win. Mirrors the .calm-prompt-top-actions-mode
     primary. Layout props (flex/height/gap/font-weight) face no #chat-main reset
     and stay clean. */
  background: #6E8A7E !important;
  color: #FFFEFB !important;
  border: 1px solid #6E8A7E !important;
  padding: 0 14px;
  box-shadow: 0 4px 12px rgba(110, 138, 126, 0.22) !important;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}

.calm-prompt-list-mode .chat-prompt-build-btn svg,
.calm-prompt-list-mode .chat-prompt-build-btn svg path {
  color: currentColor !important;
  fill: currentColor !important;
}

.calm-prompt-list-mode .chat-prompt-build-btn:hover,
.chat-prompt-panel .calm-prompt-list-mode .chat-prompt-build-btn:hover {
  background: #5F7A6F !important;
  border-color: #5F7A6F !important;
}

.calm-prompt-list-mode .chat-prompt-build-btn:focus-visible {
  outline: 2px solid #5C4D43 !important;
  outline-offset: 2px !important;
}

.calm-prompt-list-mode .chat-prompt-build-btn:active {
  transform: scale(0.985);
}

[data-theme="dark"] .calm-prompt-list-mode .chat-prompt-build-btn,
[data-theme="dark"] .chat-prompt-panel .calm-prompt-list-mode .chat-prompt-build-btn {
  background: #6E8A7E !important;
  color: #FFFEFB !important;
  border-color: #6E8A7E !important;
  box-shadow: 0 4px 12px rgba(110, 138, 126, 0.22) !important;
}

[data-theme="dark"] .calm-prompt-list-mode .chat-prompt-build-btn:hover,
[data-theme="dark"] .chat-prompt-panel .calm-prompt-list-mode .chat-prompt-build-btn:hover {
  background: #5F7A6F !important;
  color: #FFFEFB !important;
  border-color: #5F7A6F !important;
  box-shadow: 0 4px 12px rgba(110, 138, 126, 0.22) !important;
}

/* ---- Secondary: Skriv selv — sits beside the primary, stays quiet outlined ---- */
.calm-prompt-list-mode .chat-prompt-add-prompt-btn {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  /* !important beats the legacy .chat-prompt-manual-btn rose/neutral !important
     base in chat-ny-blod-bolge.css (background/border/color); the secondary
     button carries that class, so source order + specificity alone cannot win. */
  border: 1px solid rgba(58, 47, 38, 0.14) !important;
  border-radius: 12px;
  padding: 0 14px;
  background: transparent !important;
  color: #5C4D43 !important;
  box-shadow: none !important;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.calm-prompt-list-mode .chat-prompt-add-prompt-btn svg,
.calm-prompt-list-mode .chat-prompt-add-prompt-btn svg path {
  color: #9A8E82 !important;
  fill: #9A8E82 !important;
}

.calm-prompt-list-mode .chat-prompt-add-prompt-btn:hover {
  background: #F7F2E9 !important;
  border-color: rgba(58, 47, 38, 0.22) !important;
  color: #5C4D43 !important;
}

.calm-prompt-list-mode .chat-prompt-add-prompt-btn:focus-visible {
  outline: 2px solid #5C4D43 !important;
  outline-offset: 2px !important;
}

.calm-prompt-list-mode .chat-prompt-add-prompt-btn:active {
  transform: scale(0.985);
}

[data-theme="dark"] .calm-prompt-list-mode .chat-prompt-add-prompt-btn {
  border-color: rgba(255, 255, 255, 0.10) !important;
  color: rgba(255, 254, 251, 0.65) !important;
}

[data-theme="dark"] .calm-prompt-list-mode .chat-prompt-add-prompt-btn:hover {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
  color: rgba(255, 254, 251, 0.85) !important;
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .calm-prompt-list-mode .chat-prompt-add-row button,
  .calm-prompt-list-mode .chat-prompt-build-btn,
  .calm-prompt-list-mode .chat-prompt-add-prompt-btn {
    transition: none !important;
  }
  .calm-prompt-list-mode .chat-prompt-build-btn:hover,
  .calm-prompt-list-mode .chat-prompt-build-btn:active,
  .calm-prompt-list-mode .chat-prompt-add-prompt-btn:hover,
  .calm-prompt-list-mode .chat-prompt-add-prompt-btn:active {
    transform: none !important;
  }
}

/* ============================================================
   #3576 — Mobile fullscreen list-mode footer (<=640px)

   Sticky footer at bottom of the fullscreen flex container.
   Two buttons: Tilbage (ghost outlined, first-child) + Ny prompt
   (sage primary, white plus icon). Desktop unchanged.
   ============================================================ */

/* ---- Tilbage button: base styles (hidden on desktop, visible mobile only) ---- */
.calm-prompt-list-mode .chat-prompt-listmode-back {
  display: none;
}

@media (max-width: 640px) {
  .calm-prompt-list-mode .chat-prompt-add-row {
    flex: 0 0 auto !important;
    position: sticky !important;
    bottom: 0 !important;
    z-index: 2 !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px)) !important;
    margin-top: 0 !important;
    border-top: 1px solid rgba(58, 47, 38, 0.08) !important;
    background: #FFFEFB !important;
  }

  [data-theme="dark"] .calm-prompt-list-mode .chat-prompt-add-row {
    background: var(--color-card, #1c1b18) !important;
    border-top-color: rgba(255, 255, 255, 0.08) !important;
  }

  /* ---- Tilbage: ghost outlined secondary (first-child) ---- */
  .calm-prompt-list-mode .chat-prompt-listmode-back {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 1 0 !important;
    min-width: 0 !important;
    height: 46px !important;
    border: 1px solid rgba(58, 47, 38, 0.14) !important;
    border-radius: 12px !important;
    padding: 0 14px !important;
    background: transparent !important;
    color: #5C4D43 !important;
    font-weight: 600 !important;
    font-size: var(--font-size-base, 0.9375rem) !important;
    font-family: var(--font-family) !important;
    box-shadow: none !important;
    transition: background 0.15s ease, border-color 0.15s ease !important;
  }

  .calm-prompt-list-mode .chat-prompt-listmode-back:hover {
    background: #F7F2E9 !important;
    border-color: rgba(58, 47, 38, 0.22) !important;
    color: #3A2F26 !important;
  }

  .calm-prompt-list-mode .chat-prompt-listmode-back:focus-visible {
    outline: 2px solid #6E8A7E !important;
    outline-offset: 2px !important;
  }

  .calm-prompt-list-mode .chat-prompt-listmode-back:active {
    background: rgba(228, 220, 212, 0.35) !important;
  }

  [data-theme="dark"] .calm-prompt-list-mode .chat-prompt-listmode-back {
    border-color: rgba(255, 255, 255, 0.10) !important;
    color: rgba(255, 254, 251, 0.65) !important;
  }

  [data-theme="dark"] .calm-prompt-list-mode .chat-prompt-listmode-back:hover {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(255, 255, 255, 0.16) !important;
    color: rgba(255, 254, 251, 0.85) !important;
  }

  /* ---- Ny prompt: sage primary with white plus ---- */
  .calm-prompt-list-mode .chat-prompt-add-prompt-btn {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    height: 46px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    border-radius: 12px !important;
    background: #6E8A7E !important;
    color: #FFFEFB !important;
    border: 1px solid #6E8A7E !important;
    padding: 0 14px !important;
    box-shadow: 0 4px 12px rgba(110, 138, 126, 0.22) !important;
    font-weight: 600 !important;
    font-size: var(--font-size-base, 0.9375rem) !important;
    font-family: var(--font-family) !important;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease !important;
  }

  .calm-prompt-list-mode .chat-prompt-add-prompt-btn svg,
  .calm-prompt-list-mode .chat-prompt-add-prompt-btn svg path {
    color: #FFFEFB !important;
    fill: #FFFEFB !important;
  }

  .calm-prompt-list-mode .chat-prompt-add-prompt-btn:hover {
    background: #5F7A6F !important;
    border-color: #5F7A6F !important;
    color: #FFFEFB !important;
  }

  .calm-prompt-list-mode .chat-prompt-add-prompt-btn:focus-visible {
    outline: 2px solid #5C4D43 !important;
    outline-offset: 2px !important;
  }

  .calm-prompt-list-mode .chat-prompt-add-prompt-btn:active {
    transform: scale(0.985) !important;
  }

  [data-theme="dark"] .calm-prompt-list-mode .chat-prompt-add-prompt-btn {
    background: #6E8A7E !important;
    color: #FFFEFB !important;
    border-color: #6E8A7E !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.30) !important;
  }

  [data-theme="dark"] .calm-prompt-list-mode .chat-prompt-add-prompt-btn svg,
  [data-theme="dark"] .calm-prompt-list-mode .chat-prompt-add-prompt-btn svg path {
    color: #FFFEFB !important;
    fill: #FFFEFB !important;
  }

  [data-theme="dark"] .calm-prompt-list-mode .chat-prompt-add-prompt-btn:hover {
    background: #5F7A6F !important;
    border-color: #5F7A6F !important;
    color: #FFFEFB !important;
  }
}

/* ---- Reduced motion (mobile fullscreen) ---- */
@media (max-width: 640px) and (prefers-reduced-motion: reduce) {
  .calm-prompt-list-mode .chat-prompt-listmode-back,
  .calm-prompt-list-mode .chat-prompt-add-prompt-btn {
    transition: none !important;
  }
  .calm-prompt-list-mode .chat-prompt-add-prompt-btn:active {
    transform: none !important;
  }
}

/* ============================================================
   #3016 — Top-level "Ny" action chooser footer (.calm-prompt-top-actions-mode)

   .chat-prompt-add-row.chat-prompt-top-actions holds, in order:
     .chat-prompt-build-btn                              → "Byg med AI" (filled sage, full-width)
     .chat-prompt-add-prompt-btn.chat-prompt-manual-btn  → "Ny kategori"   (quiet outlined, hugs label)
   Scoped to .calm-prompt-top-actions-mode so the legacy chips-panel footer is
   untouched. The secondary carries .chat-prompt-manual-btn whose base
   color/background/border are !important (chat-ny-blod-bolge.css:1073-1090), so the
   calm overrides here MUST also be !important (mirrors the list-mode "Skriv selv"
   pattern in calm-prompt-shell.css). The primary's base is non-!important so it
   wins by specificity + source order, but carries !important for family parity.
   ============================================================ */

.calm-prompt-top-actions-mode .chat-prompt-top-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 14px 18px !important;
  margin-top: 0 !important;
  border-top: none !important;
}

/* ---- Primary: Byg med AI — filled sage (overrides blod-bolge rose) ---- */
.calm-prompt-top-actions-mode .chat-prompt-build-btn,
.chat-prompt-panel .calm-prompt-top-actions-mode .chat-prompt-build-btn {
  flex: 1 1 auto !important;
  justify-content: center !important;
  min-height: 44px !important;
  border-radius: 12px !important;
  background: #6E8A7E !important;
  color: #FFFEFB !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(110, 138, 126, 0.22) !important;
  font-weight: var(--font-weight-medium, 500) !important;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease !important;
}

.calm-prompt-top-actions-mode .chat-prompt-build-btn svg,
.calm-prompt-top-actions-mode .chat-prompt-build-btn svg path {
  color: currentColor !important;
  fill: currentColor !important;
}

.calm-prompt-top-actions-mode .chat-prompt-build-btn:hover,
.chat-prompt-panel .calm-prompt-top-actions-mode .chat-prompt-build-btn:hover {
  background: #4A7A68 !important;
  box-shadow: 0 6px 18px rgba(74, 122, 104, 0.30) !important;
  transform: translateY(-1px) !important;
}

.calm-prompt-top-actions-mode .chat-prompt-build-btn:focus-visible {
  outline: 2px solid #4A7A68 !important;
  outline-offset: 2px !important;
}

.calm-prompt-top-actions-mode .chat-prompt-build-btn:active {
  transform: translateY(0) scale(0.99) !important;
  box-shadow: 0 2px 6px rgba(110, 138, 126, 0.20) !important;
}

[data-theme="dark"] .calm-prompt-top-actions-mode .chat-prompt-build-btn,
[data-theme="dark"] .chat-prompt-panel .calm-prompt-top-actions-mode .chat-prompt-build-btn {
  background: #6E8A7E !important;
  color: #FFFEFB !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.30) !important;
}

[data-theme="dark"] .calm-prompt-top-actions-mode .chat-prompt-build-btn:hover,
[data-theme="dark"] .chat-prompt-panel .calm-prompt-top-actions-mode .chat-prompt-build-btn:hover {
  background: #8AAFA1 !important;
  color: #1c1b18 !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.40) !important;
}

/* ---- Secondary: Ny kategori — quiet outlined; !important beats .chat-prompt-manual-btn ---- */
.calm-prompt-top-actions-mode .chat-prompt-add-prompt-btn,
.chat-prompt-panel .calm-prompt-top-actions-mode .chat-prompt-add-prompt-btn {
  flex: 0 0 auto !important;
  min-height: 44px !important;
  border: 1px solid rgba(58, 47, 38, 0.12) !important;
  border-radius: 12px !important;
  padding: 8px 14px !important;
  color: #5C4D43 !important;
  background: transparent !important;
  font-weight: 500 !important;
  font-size: 0.875rem !important;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease !important;
}

/* Icon inherits the button colour — kills the legacy coral var(--rose) glyph */
.calm-prompt-top-actions-mode .chat-prompt-add-prompt-btn svg,
.calm-prompt-top-actions-mode .chat-prompt-add-prompt-btn svg path {
  color: currentColor !important;
  fill: currentColor !important;
}

.calm-prompt-top-actions-mode .chat-prompt-add-prompt-btn:hover,
.chat-prompt-panel .calm-prompt-top-actions-mode .chat-prompt-add-prompt-btn:hover {
  background: rgba(58, 47, 38, 0.04) !important;
  border-color: rgba(58, 47, 38, 0.18) !important;
  color: #3A2F26 !important;
}

.calm-prompt-top-actions-mode .chat-prompt-add-prompt-btn:focus-visible {
  outline: 2px solid #6E8A7E !important;
  outline-offset: -2px !important;
}

[data-theme="dark"] .calm-prompt-top-actions-mode .chat-prompt-add-prompt-btn,
[data-theme="dark"] .chat-prompt-panel .calm-prompt-top-actions-mode .chat-prompt-add-prompt-btn {
  border-color: rgba(255, 255, 255, 0.10) !important;
  color: rgba(255, 254, 251, 0.65) !important;
}

[data-theme="dark"] .calm-prompt-top-actions-mode .chat-prompt-add-prompt-btn:hover,
[data-theme="dark"] .chat-prompt-panel .calm-prompt-top-actions-mode .chat-prompt-add-prompt-btn:hover {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
  color: rgba(255, 254, 251, 0.85) !important;
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .calm-prompt-top-actions-mode .chat-prompt-build-btn,
  .calm-prompt-top-actions-mode .chat-prompt-add-prompt-btn {
    transition: none !important;
  }
  .calm-prompt-top-actions-mode .chat-prompt-build-btn:hover,
  .calm-prompt-top-actions-mode .chat-prompt-build-btn:active {
    transform: none !important;
  }
}

/* ---- Mobile fullscreen new-category sticky footer (<=640px) #3628 ---- */
@media (max-width: 640px) {
  .calm-prompt-new-category .chat-prompt-form-actions {
    position: sticky !important;
    bottom: 0 !important;
    z-index: 2 !important;
    margin: auto -18px 0 !important;
    width: calc(100% + 36px) !important;
    box-sizing: border-box !important;
    background: var(--color-card, rgb(255, 254, 251)) !important;
    border-top: 1px solid rgba(228, 220, 212, 0.55) !important;
    padding: 14px 18px calc(14px + env(safe-area-inset-bottom, 0px)) !important;
    gap: 10px !important;
  }

  [data-theme="dark"] .calm-prompt-new-category .chat-prompt-form-actions {
    background: var(--color-card, rgb(42, 38, 34)) !important;
    border-top-color: rgba(255, 255, 255, 0.08) !important;
  }
}

/* ---- Mobile: stack both actions full width so neither clips at 375/390 ---- */
@media (max-width: 767px) {
  .calm-prompt-top-actions-mode .chat-prompt-top-actions {
    gap: 8px !important;
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .calm-prompt-top-actions-mode .chat-prompt-build-btn,
  .chat-prompt-panel .calm-prompt-top-actions-mode .chat-prompt-build-btn,
  .calm-prompt-top-actions-mode .chat-prompt-add-prompt-btn {
    flex: 1 1 100% !important;
  }
}
