mirror of
https://github.com/hanzoai/site.git
synced 2026-11-21 01:07:08 +00:00
36 lines
3.2 KiB
CSS
36 lines
3.2 KiB
CSS
/* DetailSheet (components/v2, Wave 2 "Proof" chat). See DetailSheet.jsx for usage. */
|
|
/* a native <dialog> (showModal): full-viewport and transparent, so the panel slides inside it and a click on the
|
|
dialog itself (outside the panel) closes it */
|
|
dialog.pf-sheet { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: inherit; overflow: hidden; }
|
|
dialog.pf-sheet::backdrop { background: rgba(0, 0, 0, .34); opacity: 0; transition: opacity .4s cubic-bezier(.4, 0, .2, 1); }
|
|
dialog.pf-sheet[data-open='true']::backdrop { opacity: 1; }
|
|
.pf-sheet-panel { position: absolute; top: 12px; right: 12px; bottom: 12px; width: min(640px, calc(100vw - 24px)); display: flex; flex-direction: column; background: #fff; color: var(--ink); border-radius: 28px; box-shadow: 0 40px 120px -30px rgba(0, 0, 0, .45); transform: translate3d(calc(100% + 24px), 0, 0); transition: transform .5s cubic-bezier(.16, 1, .3, 1); overflow: hidden; }
|
|
.pf-sheet.wide .pf-sheet-panel { width: min(1040px, calc(100vw - 24px)); }
|
|
.pf-sheet[data-open='true'] .pf-sheet-panel { transform: none; }
|
|
.pf-sheet[data-open='false'] .pf-sheet-panel { transition-duration: .4s; }
|
|
.pf-sheet-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 32px 32px 20px; border-bottom: 1px solid var(--line); }
|
|
.pf-sheet-top .pf-sheet-cap { margin: 10px 0 0; }
|
|
.pf-sheet-x { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #f0f0f2; color: var(--ink); cursor: pointer; transition: background-color .25s, transform .3s var(--ease); }
|
|
.pf-sheet-x:hover { background: #e4e4e8; }
|
|
.pf-sheet-x:active { transform: scale(.94); }
|
|
.pf-sheet-x:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
|
|
.pf-sheet-body { flex: 1; overflow: auto; overscroll-behavior: contain; padding: 24px 32px 40px; font-size: 17px; line-height: 1.6; color: var(--soft); }
|
|
.pf-sheet-body h3 { margin: 28px 0 8px; font-size: 19px; font-weight: 560; letter-spacing: -.015em; color: var(--ink); }
|
|
.pf-sheet-body h3:first-child { margin-top: 0; }
|
|
.pf-sheet-body p { margin: 0 0 14px; }
|
|
.pf-sheet-body table { width: 100%; border-collapse: collapse; font-size: 15px; }
|
|
.pf-sheet-body th, .pf-sheet-body td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
|
|
.pf-sheet-body th { font-weight: 560; color: var(--ink); }
|
|
.pf-sheet-body a { color: var(--ink); }
|
|
|
|
@media (max-width: 900px) {
|
|
.pf-sheet-panel, .pf-sheet.wide .pf-sheet-panel { top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-height: 90svh; border-radius: 28px 28px 0 0; transform: translate3d(0, 100%, 0); }
|
|
.pf-sheet-panel::before { content: ''; position: absolute; top: 8px; left: 50%; width: 40px; height: 5px; margin-left: -20px; border-radius: 5px; background: rgba(0, 0, 0, .16); }
|
|
.pf-sheet-top { padding: 28px 20px 16px; }
|
|
.pf-sheet-body { padding: 20px 20px 36px; font-size: 16px; }
|
|
.pf-sheet-body table { font-size: 14px; }
|
|
}
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.pf-sheet-panel, dialog.pf-sheet::backdrop { transition-duration: .01s !important; }
|
|
}
|