/* Local integration: familiar Chat controls inside the writing sidebar. */
.sk-combined-tools #option-tone {display:none!important}
.sk-combined-tools #sidebar-dropdown-items #option-prompt {font:inherit;border:0;cursor:pointer;background:transparent;color:inherit}
.sk-combined-tools #option-prompt svg {width:19px;height:19px;flex:none}
.sk-combined-tools #sk-prompt-panel[hidden] {display:none!important}
.sk-combined-tools #sk-prompt-panel {display:flex;flex-direction:column;min-height:0;box-sizing:border-box;overflow:hidden}
#sk-prompt-panel [hidden] {display:none!important}
#sk-prompt-panel #chat-empty-voksen {display:block;width:100%;padding:0;margin:0;min-height:0;background:none}
#sk-prompt-panel .chat-prompt-area {width:100%;max-width:none;margin:0;padding:0}
#sk-prompt-panel .chat-prompt-chips {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-content:start;gap:12px;width:100%;max-width:none;margin:0;padding:5px 0 0}
#sk-prompt-panel .chat-prompt-chips.is-hidden {display:none}
#sk-prompt-panel .chat-prompt-chip {max-width:100%;min-width:0;min-height:52px;height:auto;box-sizing:border-box;font-size:14px}
#sk-prompt-panel :is(.calm-home-folder,.calm-standalone) {grid-column:1/-1;width:100%;margin:0;border-radius:14px}
#sk-prompt-panel .chat-prompt-suggestion-btn {min-height:52px;min-width:0;flex:1;justify-content:flex-start;gap:12px;padding:12px 14px}
#sk-prompt-panel .calm-home-label {flex:1;min-width:0;max-width:none;text-align:start;white-space:normal}
#sk-prompt-panel .calm-home-label-sizer {display:none}
#sk-prompt-panel .calm-home-label-text {position:static;display:block;white-space:normal;overflow-wrap:anywhere}
#sk-prompt-panel :is(.chat-prompt-create,.chat-prompt-add) {width:100%;margin:16px 0 0!important;min-height:56px;justify-content:center;gap:8px;padding:12px 8px!important;white-space:normal;line-height:1.4}
#sk-prompt-panel .chat-prompt-create {grid-column:1}
#sk-prompt-panel .chat-prompt-add {grid-column:2}
.sk-prompt-shortcuts {grid-column:1/-1;display:flex;flex-direction:column;gap:12px;margin:0 0 12px}
.sk-prompt-use {display:flex;align-items:center;gap:12px;width:100%;min-height:56px;padding:14px 16px;border:1px solid var(--sk-line,#e8ddd4);border-radius:14px;background:var(--sk-card,#fffefb);color:var(--sk-ink,#40352c);font:inherit;font-size:14px;font-weight:500;text-align:start;cursor:pointer;box-sizing:border-box;transition:background .15s,border-color .15s}
.sk-prompt-use:hover {background:var(--sk-sage-tint,#edf2ee);border-color:var(--sk-sage-ink,#4a7a68)}
.sk-prompt-use>svg {width:22px;height:22px;flex:none;color:var(--sk-sage-ink,#4a7a68)}
.sk-prompt-use>span {flex:1;min-width:0;overflow-wrap:anywhere;line-height:1.45}
#sk-prompt-library {padding-bottom:24px}
.sk-library-skeleton {display:grid;gap:12px;padding:5px 0 24px}
.sk-library-skeleton>div {display:flex;align-items:center;gap:14px;min-height:56px;padding:14px 16px;box-sizing:border-box;border:1px solid var(--sk-line,#e8ddd4);border-radius:14px;background:var(--sk-card,#fffefb)}
.sk-library-skeleton .sk-skeleton-folder {background:var(--sk-sage-wash,rgba(110,138,126,.08))}
.sk-library-skeleton i,.sk-library-skeleton span {display:block;border-radius:6px;background:var(--sk-line-soft,rgba(92,77,67,.1))}
.sk-library-skeleton i {width:22px;height:22px;flex:none}
.sk-library-skeleton>div>span {width:55%;height:12px}
.sk-library-skeleton>div:nth-child(3)>span {width:42%}
.sk-library-skeleton>section {display:flex;gap:14px;margin-top:16px}
.sk-library-skeleton>section>span {flex:1;height:56px;border-radius:20px}
@media (prefers-reduced-motion:no-preference) {.sk-library-skeleton {animation:sk-library-pulse 1.5s ease-in-out infinite}}
@keyframes sk-library-pulse {50% {opacity:.5}}
#sk-prompt-panel #sk-prompt-messages {padding-inline-end:14px!important;scrollbar-gutter:stable}
.sk-prompt-feedback:has(#sk-prompt-status:empty):has(#sk-prompt-retry[hidden]) {display:none}
.sk-prompt-feedback {display:flex;flex-direction:column;align-items:flex-start;gap:12px;padding-block:16px}
#sk-prompt-status {margin:0;font-size:14px;line-height:1.5;color:var(--sk-ink-2,#5c4d43)}
#sk-prompt-retry {display:inline-flex;align-items:center;gap:10px;min-height:44px;padding:10px 16px;border:1px solid var(--sk-line,#e8ddd4);border-radius:12px;background:var(--sk-card,#fffefb);color:var(--sk-ink,#40352c);font:inherit;cursor:pointer}
#sk-prompt-retry svg {width:20px;height:20px}
/* Keep the native Tone card and its shared Korrektur slider design. */
#sk-combined-tone {margin:0 0 24px}
[data-theme="dark"] #sk-combined-tone .tone-level-icon {background:rgba(232,221,212,.12)}
[data-theme="dark"] #sk-combined-tone .tone-level-desc {color:rgba(255,251,245,.8)}
.sk-combined-tools #bedre-panel #biq-run {min-height:56px;padding:14px 16px;gap:12px;border:1px solid var(--sk-line,#e8ddd4);border-radius:14px;background:var(--sk-card,#fffefb);color:var(--sk-ink,#40352c);box-shadow:none}
.sk-combined-tools #biq-run .biq-chip__icon {width:24px;height:24px;flex:0 0 24px;border-radius:0;background:transparent;color:var(--sk-sage-ink,#4a7a68)}
.sk-combined-tools #biq-run .biq-chip__title {font-size:14px}
.sk-combined-tools #biq-run .biq-chip__sub {display:none}
.sk-combined-tools #biq-run .biq-chip__chevron {color:var(--sk-ink-2,#5c4d43)}
.sk-combined-tools #bedre-panel #biq-run:disabled {background:var(--sk-card,#fffefb)!important}
.sk-combined-tools #bedre-panel #biq-run:disabled .biq-chip__icon {background:transparent!important;color:var(--sk-unavailable-ink,#7b8980)!important}
.sk-combined-tools #tone-panel .tone-byot {display:none!important}
.sk-combined-tools :is(#option-prompt,#sk-prompt-panel button):focus-visible {outline:2px solid var(--sk-sage-ink,#4a7a68);outline-offset:3px}
[data-theme="dark"] :is(#sk-prompt-panel) {color:#eee9df}
[data-theme="dark"] #sk-prompt-status {color:#d8d0c4}
.bb-skrivebord #sk-prompt-panel {order:4;flex:1 1 auto;padding:86px 24px 0;background:transparent}
@media (min-width:768px) and (max-width:1100px) {
  #sk-prompt-panel :is(.chat-prompt-create,.chat-prompt-add) {grid-column:1/-1}
  #sk-prompt-panel .chat-prompt-add {margin-top:0!important}
  .sk-combined-tools #sidebar-dropdown-items [role="tab"] {gap:5px;padding-inline:6px}
  .sk-combined-tools #sidebar-dropdown-items [role="tab"]>span {display:inline!important;font-size:12px}
  .sk-combined-tools #sidebar-dropdown-items [role="tab"]>svg {width:16px;height:16px;flex:none}
}
/* Mirror Korrektur's existing tablet sizing without changing shared assets. */
@media (min-width:768px) and (max-width:1023.98px) {
  #sk-combined-tone .tone-level-run {padding:14px 12px 4px}
  #sk-combined-tone .tone-level-icon {flex-basis:40px;width:40px;height:40px;padding:8px}
  #sk-combined-tone .tone-current {font-size:15px}
  #sk-combined-tone .tone-slider-track-wrap {margin:2px 14px 0}
  #sk-combined-tone .tone-slider-ends {padding-inline:16px}
}

.sk-prompt-row {display:flex;min-width:0;border:1px solid var(--sk-line,#e8ddd4);border-radius:14px;background:var(--sk-card,#fffefb)}
.sk-prompt-row .sk-prompt-use {flex:1;min-width:0;width:auto;border:0;background:transparent;padding-inline-end:12px}
.sk-prompt-order {display:flex;align-items:center;justify-content:center;flex:0 0 44px;min-height:44px;padding:0;border:0;border-radius:0 14px 14px 0;background:transparent;color:var(--sk-ink-2,#5c4d43);cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none}
.sk-prompt-order:active {cursor:grabbing}
.sk-prompt-order svg {width:20px;height:20px;stroke-width:3}
.sk-prompt-row:has(button:hover) {background:var(--sk-sage-tint,#edf2ee)}
.sk-prompt-row[data-color][style*="--prompt-tint"] {background:var(--prompt-tint);border-color:var(--prompt-border)}
[data-theme=dark] .sk-prompt-row[data-color][style*="--prompt-tint"] {background:var(--prompt-dark-tint);border-color:var(--prompt-dark-border)}
.sk-order-dragging {opacity:.5}
#sk-prompt-order-status {position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.chat-prompt-move-dialog [data-step] {display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:12px 16px;border:1px solid var(--sk-line,#e8ddd4);border-radius:12px;background:var(--sk-card,#fffefb);color:var(--sk-ink,#40352c);font:inherit;cursor:pointer}
.chat-prompt-move-dialog [data-step] svg {width:18px;height:18px}
.chat-prompt-move-dialog [data-step]:disabled {opacity:.45;cursor:default}

.chat-prompt-move-dialog:has([data-step]) .chat-prompt-move-footer {display:flex;gap:10px}

/* Same primary action, native editing menu and reorder control on every row. */
html body #sk-prompt-panel #chat-main .chat-prompt-area .calm-folder-open::after {display:none}
html body #sk-prompt-panel #chat-main .chat-prompt-area :is(.calm-home-folder,.calm-standalone) > .chat-prompt-suggestion-btn {flex:1;min-width:0;min-height:56px!important;padding:14px 12px 14px 16px!important}
html body #sk-prompt-panel #chat-main .chat-prompt-area :is(.calm-home-folder,.calm-standalone) > :is(.calm-actions,.calm-home-settings),
#sk-prompt-panel .sk-prompt-row > .calm-actions {position:static!important;inset:auto!important;transform:none!important;display:flex;align-items:center;flex:0 0 44px;width:44px;min-width:44px;height:auto!important;align-self:stretch;opacity:1!important;pointer-events:auto!important}
html body #sk-prompt-panel #chat-main .chat-prompt-area .calm-home-settings {opacity:1!important;pointer-events:auto!important}
#sk-prompt-panel .sk-prompt-row .calm-home-settings {display:flex;align-items:center;justify-content:center;width:44px;min-width:44px;height:44px;padding:0;border:0;background:transparent;box-shadow:none;color:var(--sk-ink-2,#5c4d43)}
#sk-prompt-panel .sk-prompt-row .calm-home-settings svg {width:16px;height:16px}
#sk-prompt-panel .sk-prompt-row .sk-prompt-use {padding-inline-end:8px}

html body #sk-prompt-panel #chat-main .chat-prompt-area .calm-home-label-text {position:static;inset:auto;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}
html body #sk-prompt-panel #chat-main .chat-prompt-area .calm-home-label-sizer {display:none}
@media (min-width:768px) and (max-width:1100px) {
  #sk-prompt-panel .sk-prompt-use {padding:10px!important;gap:8px;font-size:13px}
  #sk-prompt-panel .sk-prompt-use>svg {width:18px;height:18px}
  html body #sk-prompt-panel #chat-main .chat-prompt-area :is(.calm-home-folder,.calm-standalone) > .chat-prompt-suggestion-btn {padding:10px!important;gap:8px;font-size:13px}
}

/* Insertion marker sits outside the chip skins, which own their own shadows. */
#sk-prompt-drop-marker {position:fixed;z-index:10020;height:3px;border-radius:3px;background:#4a7a68;box-shadow:0 0 0 1px var(--sk-card,#fffefb);pointer-events:none}
#sk-prompt-drop-marker[hidden] {display:none}
#sk-prompt-drop-marker::before,#sk-prompt-drop-marker::after {content:"";position:absolute;top:-2px;width:7px;height:7px;border-radius:50%;background:inherit}
#sk-prompt-drop-marker::before {left:0}
#sk-prompt-drop-marker::after {right:0}
[data-theme=dark] #sk-prompt-drop-marker {background:#b1d3c2}
/* Centre drop means containment; edge insertion markers remain separate. */
html body #sk-prompt-panel #chat-main .chat-prompt-area .calm-home-folder::before {
  transform-origin: bottom left;
  transition: transform 160ms ease-out;
}
html body #sk-prompt-panel #chat-main .chat-prompt-area .calm-home-folder.chip-drop-inside {
  outline: 2px solid var(--prompt-hover-ink, #3d725f) !important;
  outline-offset: 2px;
}
html body #sk-prompt-panel #chat-main .chat-prompt-area .calm-home-folder.chip-drop-inside::before {
  transform: scaleY(1.4);
}
html body #sk-prompt-panel #chat-main .chat-prompt-area .calm-home-folder.chip-drop-inside > .calm-folder-open::after {
  transform: rotate(135deg);
}
html body #sk-prompt-panel #chat-main .chat-prompt-area .calm-home-folder.chip-drop-inside > .calm-home-settings {
  visibility: hidden;
}
html[data-theme="dark"] body #sk-prompt-panel #chat-main .chat-prompt-area .calm-home-folder.chip-drop-inside {
  outline-color: #b1d3c2 !important;
}
@media (prefers-reduced-motion: reduce) {
  html body #sk-prompt-panel #chat-main .chat-prompt-area .calm-home-folder::before { transition: none !important; }
  html body #sk-prompt-panel #chat-main .chat-prompt-area .calm-home-folder.chip-drop-inside::before { transform: none; }
}

html body #sk-prompt-panel #chat-main .chat-prompt-area .calm-home-folder.chip-drop-inside {outline-offset:-2px}

/* Public preset controls use the existing public Chat dark palette. */
html[data-theme="dark"] body.sk-public-prompts #sk-prompt-panel .calm-home-folder {background:#34343a!important;border-color:rgba(168,176,196,.24)!important;color:#f0e8df!important}
html[data-theme="dark"] body.sk-public-prompts #sk-prompt-panel .calm-home-folder :is(button,svg) {color:#e8ddd4!important}
html[data-theme="dark"] body.sk-public-prompts #sk-prompt-panel .chat-prompt-create {background:#2c2925!important;border-color:#474139!important;color:#f0e8df!important}
