/* Morph Popover (morph-popover.js): a plain-CSS port of KokonutUI's Morph Popover (MIT), in Front Page's colours. */
.morph-popover{display:inline-block;max-width:100%;vertical-align:top}
.morph-popover[data-morph="open"],.morph-popover[data-morph="sending"]{display:block}
.morph-shell{box-sizing:border-box;width:max-content;max-width:100%;overflow:hidden;border:1px solid var(--line);border-radius:18px;background:var(--panel);color:var(--text);box-shadow:0 1px 2px rgba(9,9,11,.05)}
.morph-popover[data-align="end"] .morph-shell{margin-left:auto}
.morph-popover[data-morph="open"] .morph-shell,.morph-popover[data-morph="sending"] .morph-shell{width:min(var(--morph-width,340px),100%);border-radius:16px;box-shadow:0 20px 25px -5px rgba(9,9,11,.1),0 8px 10px -6px rgba(9,9,11,.1)}
:root:not(.light) .morph-popover[data-morph="open"] .morph-shell,:root:not(.light) .morph-popover[data-morph="sending"] .morph-shell{box-shadow:0 20px 25px -5px rgba(0,0,0,.4),0 8px 10px -6px rgba(0,0,0,.4)}
/* The shell clips the button, so its focus ring is drawn on the shell. */
.morph-shell:has(.morph-trigger:focus-visible){outline:2px solid var(--accent);outline-offset:2px}
.morph-trigger,.morph-sent{display:flex;align-items:center;gap:8px;height:34px;margin:0;padding:0 14px;border:0;background:transparent;color:inherit;font:inherit;font-size:14px;font-weight:500;line-height:1;white-space:nowrap}
.morph-trigger{cursor:pointer;transition:background-color .15s}
.morph-trigger:hover{background:var(--panel2)}
.morph-trigger:focus-visible{outline:none}
.morph-icon{display:inline-grid;place-items:center;color:var(--muted)}
.morph-icon svg{display:block;width:16px;height:16px}
.morph-label{display:inline-block}
.morph-title{display:flex;align-items:center;gap:8px;padding:10px 14px 0;font-size:14px;font-weight:500}
.morph-body{display:flex;flex-direction:column;animation:morph-body-in .2s cubic-bezier(.23,1,.32,1) .08s both}
@keyframes morph-body-in{from{opacity:0;transform:translateY(4px);filter:blur(4px)}}
.morph-body textarea{box-sizing:border-box;display:block;width:100%;margin:0;padding:8px 14px 0;border:0;outline:0;resize:none;background:transparent;color:var(--text);font:inherit;font-size:14px;line-height:1.6}
.morph-body textarea::placeholder{color:var(--dim)}
.morph-body textarea[readonly]{opacity:.6}
.morph-error{margin:4px 14px 6px;font-size:12px;color:var(--red)}
.morph-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 12px;border-top:1px solid var(--line);background:var(--panel2)}
.morph-hint{display:flex;align-items:center;gap:4px;font-size:12px;color:var(--dim)}
.morph-hint kbd{padding:0 4px;border:1px solid var(--line);border-radius:4px;background:var(--panel);color:var(--muted);font:inherit;font-size:11px}
.morph-hint span{margin-left:4px}
@media (hover:none){.morph-hint{visibility:hidden}}
.morph-send{display:flex;align-items:center;gap:6px;height:28px;padding:0 12px;border:0;border-radius:8px;background:var(--text);color:var(--panel);font:inherit;font-size:12px;font-weight:500;cursor:pointer;transition:opacity .15s}
.morph-send:hover:not(:disabled){opacity:.88}
.morph-send:disabled{background:var(--line);color:var(--dim);cursor:not-allowed}
.morph-send:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.morph-spinner{width:14px;height:14px;animation:morph-spin .8s linear infinite}
@keyframes morph-spin{to{transform:rotate(360deg)}}
.morph-sent{animation:morph-sent-in .2s cubic-bezier(.23,1,.32,1) .1s both}
@keyframes morph-sent-in{from{opacity:0;filter:blur(4px)}}
.morph-tick{width:16px;height:16px;color:#10b981}
.morph-tick path{stroke-dasharray:1;stroke-dashoffset:1;animation:morph-tick .3s cubic-bezier(.23,1,.32,1) .2s forwards}
@keyframes morph-tick{to{stroke-dashoffset:0}}
.morph-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
@media (prefers-reduced-motion:reduce){.morph-body,.morph-sent,.morph-spinner{animation:none}.morph-tick path{animation:none;stroke-dashoffset:0}}
