stocks / static /css /playbook.css
user
python version
ee446e8
Raw History Blame Contribute Delete
6.57 kB
/* Playbook page β€” setups/patterns CRUD grid + modal form. */
.playbook-title {
font-size: var(--font-lg);
font-weight: 600;
color: var(--text);
}
.playbook-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(min(var(--split-card-min-mobile), 100%), 1fr));
gap: var(--space-md);
margin-top: var(--space-md);
}
.playbook-card {
background: var(--surface-raised);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
padding: var(--space-md);
display: flex;
flex-direction: column;
gap: var(--space-xs);
cursor: pointer;
}
.playbook-card__header {
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--space-sm);
}
.playbook-card__name {
font-weight: 600;
color: var(--text);
font-size: var(--font-md);
}
.playbook-card__badge {
background: var(--accent-bg, var(--surface));
color: var(--accent, var(--text-secondary));
border-radius: var(--radius-sm);
padding: var(--space-2xs) var(--space-xs);
font-size: var(--font-xs);
white-space: nowrap;
}
.playbook-card__timeframe {
color: var(--text-dim);
font-size: var(--font-xs);
}
.playbook-card__desc {
color: var(--text-secondary);
font-size: var(--font-sm);
margin: 0;
flex: 1;
}
.playbook-card__actions {
display: flex;
gap: var(--space-xs);
margin-top: var(--space-xs);
}
/* A few fields and a screenshot grid: the default .modal-content width (sm)
fits it, so this rule only owns the scroll. */
.playbook-modal-content {
max-height: 85vh;
max-height: 85dvh;
overflow-y: auto;
}
.playbook-card__thumb {
width: 100%;
/* The box comes from the ratio, not a hardcoded height: the card reserves
the space before the cover image loads instead of reflowing when it
does (the old fixed 140px shifted the whole grid on mobile). */
aspect-ratio: 2 / 1;
object-fit: cover;
border-radius: var(--radius-md);
margin-bottom: var(--space-xs);
}
.playbook-screenshots-grid {
display: flex;
flex-wrap: wrap;
gap: var(--space-xs);
margin-bottom: var(--space-xs);
}
.playbook-screenshot {
position: relative;
width: 88px;
aspect-ratio: 1 / 1;
display: flex;
}
.playbook-screenshot img {
width: 100%;
height: 100%;
object-fit: cover;
border-radius: var(--radius-sm);
border: 1px solid var(--border);
}
.playbook-screenshot__remove {
position: absolute;
top: -6px;
right: -6px;
width: var(--icon-size);
height: var(--icon-size);
border-radius: var(--radius-round);
border: none;
background: var(--danger);
color: var(--bg);
font-size: var(--font-xs);
line-height: 1;
cursor: pointer;
}
.playbook-dropzone {
border: 1px dashed var(--border);
border-radius: var(--radius-md);
padding: var(--space-md);
text-align: center;
color: var(--text-dim);
font-size: var(--font-sm);
margin-bottom: var(--space-xs);
transition: border-color var(--transition-base), color var(--transition-base);
}
.playbook-dropzone--active {
border-color: var(--accent, var(--text));
color: var(--text);
}
.playbook-card__thumb,
.playbook-screenshot img {
cursor: zoom-in;
}
.playbook-screenshot__cover {
position: absolute;
top: -6px;
left: -6px;
width: var(--icon-size);
height: var(--icon-size);
border-radius: var(--radius-round);
border: none;
background: var(--surface-raised);
color: var(--text-dim);
font-size: var(--font-xs);
line-height: 1;
cursor: pointer;
}
.playbook-screenshot--cover img {
outline: var(--radius-sm) solid var(--accent);
outline-offset: var(--radius-sm);
}
.playbook-screenshot--cover .playbook-screenshot__cover {
color: var(--accent, var(--text));
}
.playbook-lightbox-content {
position: relative;
max-width: 92vw;
max-height: 92vh;
max-height: 92dvh;
display: flex;
}
.playbook-lightbox-content img {
max-width: 92vw;
max-height: 92vh;
max-height: 92dvh;
object-fit: contain;
border-radius: var(--radius-sm);
}
/* Width comes from .modal-content--md; the base max-width already shrinks it
on a narrow screen, so this rule only owns the scroll and the layout. */
.playbook-preview-content {
max-height: 85vh;
max-height: 85dvh;
overflow: hidden auto;
display: flex;
flex-direction: column;
gap: var(--space-md);
}
.playbook-preview-header {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: var(--space-sm);
}
.playbook-preview-carousel {
display: flex;
align-items: center;
justify-content: center;
gap: var(--space-sm);
min-width: 0;
}
.playbook-preview-carousel img {
min-width: 0;
max-width: 100%;
max-height: 50vh;
max-height: 50dvh;
object-fit: contain;
border-radius: var(--radius-md);
}
.playbook-preview-nav {
width: var(--space-xl);
height: var(--space-xl);
flex-shrink: 0;
border-radius: var(--radius-round);
border: none;
background: var(--surface-raised);
color: var(--text);
font-size: var(--font-sm);
line-height: 1;
cursor: pointer;
}
.playbook-preview-counter {
display: block;
text-align: center;
color: var(--text-dim);
font-size: var(--font-xs);
}
.playbook-preview-section {
display: flex;
flex-direction: column;
gap: var(--space-xs);
}
.playbook-preview-text {
color: var(--text-secondary);
font-size: var(--font-sm);
margin: 0;
white-space: pre-wrap;
overflow-wrap: break-word;
}
.playbook-lightbox-close {
position: absolute;
top: -14px;
right: -14px;
width: var(--tab-height);
height: var(--tab-height);
border-radius: var(--radius-round);
border: none;
background: var(--surface-raised);
color: var(--text);
font-size: var(--font-sm);
line-height: 1;
cursor: pointer;
}
/* ── Phone: the close button hangs 14px outside a 92vw box, so on a 360px
screen it sits half off-viewport and is 28px wide β€” there is no reliable
way to dismiss the lightbox. Pin it inside the frame, give it a real
touch target, and let the lightbox go full-bleed with room for the notch
and the home indicator. ── */
@media (width <= 480px) {
.playbook-lightbox-content {
max-width: 100vw;
max-height: 100dvh;
padding: var(--space-md);
}
.playbook-lightbox-content img {
max-width: 100%;
}
.playbook-lightbox-close {
top: var(--space-sm);
right: var(--space-sm);
width: var(--touch-min);
height: var(--touch-min);
}
/* The lightbox close is already 44px above, by literal. This is the
shared touch-target contract for the two controls this page still
sizes in tokens; both used to be listed in common.css's touch-target
block, which made that file track this page's class inventory. */
.playbook-preview-nav,
.playbook-lightbox-close {
min-width: var(--touch-min);
min-height: var(--touch-min);
}
}