1808 lines
41 KiB
CSS
1808 lines
41 KiB
CSS
/* ============================================================
|
|
PettyUI Showcase — Premium Dark SaaS Theme
|
|
============================================================ */
|
|
|
|
/* --- Design Tokens --- */
|
|
:root {
|
|
/* ── Gray palette (Slate) ── */
|
|
--gray-1: #f4f6f9;
|
|
--gray-2: #f1f5f9;
|
|
--gray-3: #e2e8f0;
|
|
--gray-4: #cbd5e1;
|
|
--gray-5: #94a3b8;
|
|
--gray-6: #64748b;
|
|
--gray-7: #475569;
|
|
--gray-8: #334155;
|
|
--gray-9: #1e293b;
|
|
--gray-10: #0f172a;
|
|
|
|
/* ── Accent palette (Aperture Blue) ── */
|
|
--accent-1: #edf9fe;
|
|
--accent-2: #d4f1fd;
|
|
--accent-3: #a8e3fb;
|
|
--accent-4: #6dcef5;
|
|
--accent-5: #36c0f1;
|
|
--accent-6: #1fa8d8;
|
|
--accent-7: #1890ba;
|
|
--accent-8: #14769a;
|
|
--accent-contrast: #ffffff;
|
|
|
|
/* ── Semantic colors ── */
|
|
--color-bg: var(--gray-1);
|
|
--color-surface: #ffffff;
|
|
--color-surface-raised: var(--gray-2);
|
|
--color-surface-sunken: var(--gray-3);
|
|
--color-border: var(--gray-3);
|
|
--color-border-strong: var(--gray-4);
|
|
--color-text: var(--gray-10);
|
|
--color-text-secondary: var(--gray-6);
|
|
--color-text-tertiary: var(--gray-5);
|
|
--color-accent: var(--accent-5);
|
|
--color-accent-hover: var(--accent-6);
|
|
--color-accent-subtle: var(--accent-1);
|
|
--color-accent-muted: rgba(54, 192, 241, 0.08);
|
|
--color-danger: #dc2626;
|
|
--color-danger-subtle: #fef2f2;
|
|
--color-warning: #d97706;
|
|
--color-warning-subtle: #fffbeb;
|
|
--color-success: #16a34a;
|
|
--color-success-subtle: #f0fdf4;
|
|
|
|
/* ── Typography ── */
|
|
--font-sans: "Geist", -apple-system, system-ui, sans-serif;
|
|
--font-mono: "Geist Mono", ui-monospace, monospace;
|
|
--text-xs: 0.75rem;
|
|
--text-sm: 0.8125rem;
|
|
--text-base: 0.875rem;
|
|
--text-lg: 1rem;
|
|
--text-xl: 1.125rem;
|
|
--text-2xl: 1.5rem;
|
|
--text-3xl: 1.875rem;
|
|
--text-4xl: 2.25rem;
|
|
--text-hero: clamp(3rem, 8vw, 5rem);
|
|
--weight-normal: 400;
|
|
--weight-medium: 500;
|
|
--weight-semibold: 600;
|
|
--weight-bold: 700;
|
|
--leading-tight: 1.15;
|
|
--leading-normal: 1.5;
|
|
--leading-relaxed: 1.7;
|
|
|
|
/* ── Spacing (4px base) ── */
|
|
--space-1: 0.25rem;
|
|
--space-2: 0.5rem;
|
|
--space-3: 0.75rem;
|
|
--space-4: 1rem;
|
|
--space-5: 1.25rem;
|
|
--space-6: 1.5rem;
|
|
--space-8: 2rem;
|
|
--space-10: 2.5rem;
|
|
--space-12: 3rem;
|
|
--space-16: 4rem;
|
|
--space-20: 5rem;
|
|
--space-24: 6rem;
|
|
|
|
/* ── Radius ── */
|
|
--radius-xs: 4px;
|
|
--radius-sm: 6px;
|
|
--radius-md: 8px;
|
|
--radius-lg: 12px;
|
|
--radius-xl: 16px;
|
|
--radius-pill: 999px;
|
|
|
|
/* ── Elevation ── */
|
|
--elevation-0: none;
|
|
--elevation-1: 0 1px 2px rgba(0,0,0,0.05), 0 1px 3px rgba(0,0,0,0.04);
|
|
--elevation-2: 0 2px 4px rgba(0,0,0,0.05), 0 2px 8px rgba(0,0,0,0.04);
|
|
--elevation-3: 0 4px 8px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
|
|
--elevation-4: 0 8px 16px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
|
|
|
|
/* ── State layers ── */
|
|
--state-hover: rgba(0, 0, 0, 0.04);
|
|
--state-focus: rgba(0, 0, 0, 0.06);
|
|
--state-pressed: rgba(0, 0, 0, 0.08);
|
|
|
|
/* ── Motion (M3 Expressive) ── */
|
|
--ease-standard: cubic-bezier(0.2, 0, 0, 1);
|
|
--ease-expressive: cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
--ease-effects: cubic-bezier(0.4, 0, 0.2, 1);
|
|
--duration-fast: 150ms;
|
|
--duration-normal: 250ms;
|
|
--duration-emphasis: 400ms;
|
|
|
|
/* ── Legacy aliases (used in component styles) ── */
|
|
--c-bg: var(--color-bg);
|
|
--c-surface: var(--color-surface);
|
|
--c-surface-solid: var(--color-surface);
|
|
--c-surface-2: var(--color-surface-raised);
|
|
--c-surface-3: var(--color-surface-sunken);
|
|
--c-border: var(--color-border);
|
|
--c-border-2: var(--color-border-strong);
|
|
--c-green: var(--color-accent);
|
|
--c-green-dim: var(--color-accent-hover);
|
|
--c-green-glow: var(--color-accent-muted);
|
|
--c-green-glow-md: rgba(37, 99, 235, 0.12);
|
|
--c-pink: var(--color-danger);
|
|
--c-yellow: var(--color-warning);
|
|
--c-blue: var(--color-accent);
|
|
--c-text: var(--color-text);
|
|
--c-text-2: var(--color-text-secondary);
|
|
--c-text-3: var(--color-text-tertiary);
|
|
--c-font: var(--font-sans);
|
|
--c-mono: var(--font-mono);
|
|
}
|
|
|
|
/* --- Reset --- */
|
|
*, *::before, *::after {
|
|
box-sizing: border-box;
|
|
margin: 0;
|
|
}
|
|
|
|
html {
|
|
scroll-behavior: smooth;
|
|
}
|
|
|
|
body {
|
|
background: var(--color-bg);
|
|
background-image: linear-gradient(135deg, rgba(54, 192, 241, 0.03) 0%, transparent 40%, rgba(54, 192, 241, 0.02) 100%);
|
|
background-attachment: fixed;
|
|
color: var(--color-text);
|
|
font-family: var(--font-sans);
|
|
font-weight: var(--weight-normal);
|
|
font-size: 15px;
|
|
line-height: 1.6;
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
overflow-x: hidden;
|
|
}
|
|
|
|
/* --- Accessibility: Skip Nav --- */
|
|
.skip-link {
|
|
position: absolute;
|
|
top: -100px;
|
|
left: 1rem;
|
|
background: var(--c-green);
|
|
color: #fff;
|
|
padding: 8px 16px;
|
|
border-radius: var(--radius-sm);
|
|
font-size: 0.8125rem;
|
|
font-weight: 600;
|
|
z-index: 10000;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.skip-link:focus {
|
|
top: 1rem;
|
|
}
|
|
|
|
/* --- Screen Reader Only --- */
|
|
.sr-only {
|
|
position: absolute;
|
|
width: 1px;
|
|
height: 1px;
|
|
padding: 0;
|
|
margin: -1px;
|
|
overflow: hidden;
|
|
clip: rect(0, 0, 0, 0);
|
|
white-space: nowrap;
|
|
border: 0;
|
|
}
|
|
|
|
/* --- Page Container --- */
|
|
.page {
|
|
max-width: 1200px;
|
|
margin: 0 auto;
|
|
padding: 0 clamp(1.5rem, 5vw, 3rem) 8rem;
|
|
}
|
|
|
|
/* ============================================================
|
|
HERO
|
|
============================================================ */
|
|
.hero {
|
|
min-height: 85vh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
align-items: center;
|
|
text-align: center;
|
|
position: relative;
|
|
padding: 8rem 0 6rem;
|
|
}
|
|
|
|
.hero::before {
|
|
content: "";
|
|
position: absolute;
|
|
top: 10%;
|
|
left: 50%;
|
|
width: 800px;
|
|
height: 500px;
|
|
transform: translateX(-50%);
|
|
background: radial-gradient(ellipse at center, rgba(54, 192, 241, 0.07) 0%, transparent 65%);
|
|
pointer-events: none;
|
|
filter: blur(80px);
|
|
}
|
|
|
|
.hero-pill {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: var(--space-2);
|
|
background: var(--color-accent-subtle);
|
|
border: 1px solid var(--accent-3);
|
|
border-radius: var(--radius-pill);
|
|
padding: 6px 16px;
|
|
font-family: var(--font-sans);
|
|
font-size: var(--text-sm);
|
|
font-weight: var(--weight-medium);
|
|
color: var(--color-accent);
|
|
letter-spacing: 0.01em;
|
|
margin-bottom: var(--space-8);
|
|
position: relative;
|
|
}
|
|
|
|
.hero-pill .pill-dot {
|
|
width: 6px;
|
|
height: 6px;
|
|
border-radius: 50%;
|
|
background: var(--color-accent);
|
|
}
|
|
|
|
.hero h1 {
|
|
font-family: var(--font-sans);
|
|
font-size: clamp(3.5rem, 10vw, 6rem);
|
|
font-weight: var(--weight-bold);
|
|
letter-spacing: -0.045em;
|
|
line-height: 1;
|
|
position: relative;
|
|
color: var(--color-text);
|
|
}
|
|
|
|
.hero-sub {
|
|
color: var(--color-text-secondary);
|
|
font-family: var(--font-sans);
|
|
font-size: clamp(1rem, 1.8vw, 1.125rem);
|
|
font-weight: var(--weight-normal);
|
|
line-height: var(--leading-relaxed);
|
|
margin-top: var(--space-5);
|
|
max-width: 48ch;
|
|
position: relative;
|
|
}
|
|
|
|
|
|
/* Stats row */
|
|
.hero-stats {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: var(--space-4);
|
|
margin-top: var(--space-8);
|
|
}
|
|
|
|
.hero-stat {
|
|
font-size: var(--text-base);
|
|
color: var(--color-text-secondary);
|
|
}
|
|
|
|
.hero-stat petty-counter {
|
|
font-weight: var(--weight-bold);
|
|
font-variant-numeric: tabular-nums;
|
|
color: var(--color-text);
|
|
}
|
|
|
|
.hero-stat-dot {
|
|
width: 4px;
|
|
height: 4px;
|
|
border-radius: 50%;
|
|
background: var(--color-border-strong);
|
|
}
|
|
|
|
/* Custom element display */
|
|
petty-typewriter {
|
|
display: inline;
|
|
}
|
|
|
|
petty-reveal {
|
|
display: block;
|
|
}
|
|
|
|
petty-counter {
|
|
font-variant-numeric: tabular-nums;
|
|
}
|
|
|
|
/* ============================================================
|
|
VALUE PROPS
|
|
============================================================ */
|
|
.value-props {
|
|
margin-top: 0;
|
|
padding: var(--space-16) 0;
|
|
border-top: 1px solid var(--color-border);
|
|
}
|
|
|
|
.value-list {
|
|
display: flex;
|
|
gap: var(--space-12);
|
|
margin: 0;
|
|
}
|
|
|
|
.value-item {
|
|
flex: 1;
|
|
}
|
|
|
|
.value-item dt {
|
|
font-size: var(--text-lg);
|
|
font-weight: var(--weight-semibold);
|
|
color: var(--color-text);
|
|
margin-bottom: var(--space-2);
|
|
}
|
|
|
|
.value-item dd {
|
|
margin: 0;
|
|
font-size: var(--text-base);
|
|
color: var(--color-text-secondary);
|
|
line-height: var(--leading-relaxed);
|
|
}
|
|
|
|
/* ============================================================
|
|
SECTIONS
|
|
============================================================ */
|
|
|
|
/* Separator between major areas */
|
|
.section-separator {
|
|
position: relative;
|
|
height: 1px;
|
|
margin: 0;
|
|
}
|
|
|
|
.section-separator::before {
|
|
content: "";
|
|
position: absolute;
|
|
left: 50%;
|
|
top: 0;
|
|
transform: translateX(-50%);
|
|
width: 100%;
|
|
max-width: 600px;
|
|
height: 1px;
|
|
background: linear-gradient(
|
|
90deg,
|
|
transparent 0%,
|
|
var(--c-border-2) 30%,
|
|
var(--c-border-2) 70%,
|
|
transparent 100%
|
|
);
|
|
}
|
|
|
|
/* Ambient gradient between sections */
|
|
.section-glow {
|
|
position: relative;
|
|
}
|
|
|
|
.section-glow::before {
|
|
content: "";
|
|
position: absolute;
|
|
top: -200px;
|
|
left: 50%;
|
|
width: 700px;
|
|
height: 400px;
|
|
transform: translateX(-50%);
|
|
background: radial-gradient(
|
|
ellipse at center,
|
|
rgba(34, 197, 94, 0.03) 0%,
|
|
transparent 70%
|
|
);
|
|
pointer-events: none;
|
|
filter: blur(80px);
|
|
}
|
|
|
|
.section {
|
|
margin-top: 96px;
|
|
position: relative;
|
|
}
|
|
|
|
.section-title {
|
|
font-family: var(--font-sans);
|
|
font-size: clamp(1.75rem, 4vw, 2.5rem);
|
|
font-weight: var(--weight-bold);
|
|
letter-spacing: -0.035em;
|
|
line-height: var(--leading-tight);
|
|
color: var(--color-text);
|
|
}
|
|
|
|
.section-desc {
|
|
font-family: var(--font-sans);
|
|
font-size: var(--text-lg);
|
|
font-weight: var(--weight-normal);
|
|
color: var(--color-text-secondary);
|
|
margin-top: var(--space-3);
|
|
max-width: 50ch;
|
|
margin-bottom: 40px;
|
|
max-width: 48ch;
|
|
line-height: 1.6;
|
|
}
|
|
|
|
/* ============================================================
|
|
CARD GRID
|
|
============================================================ */
|
|
.grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
|
|
gap: var(--space-6);
|
|
}
|
|
|
|
.demo-card {
|
|
background: rgba(255, 255, 255, 0.85);
|
|
backdrop-filter: blur(12px);
|
|
-webkit-backdrop-filter: blur(12px);
|
|
border: 1px solid rgba(255, 255, 255, 0.6);
|
|
border-radius: var(--radius-lg);
|
|
padding: var(--space-8);
|
|
box-shadow: var(--elevation-2), 0 0 0 1px rgba(0, 0, 0, 0.03);
|
|
}
|
|
|
|
.demo-card h3 {
|
|
font-family: var(--font-sans);
|
|
font-size: var(--text-lg);
|
|
font-weight: var(--weight-semibold);
|
|
color: var(--color-text);
|
|
margin-bottom: var(--space-5);
|
|
padding-bottom: var(--space-4);
|
|
border-bottom: 1px solid var(--color-border);
|
|
}
|
|
|
|
.demo-card .tag-name {
|
|
font-family: var(--font-mono);
|
|
font-size: var(--text-xs);
|
|
font-weight: var(--weight-normal);
|
|
color: var(--color-text-tertiary);
|
|
margin-top: var(--space-6);
|
|
}
|
|
|
|
.demo-area {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-4);
|
|
}
|
|
|
|
.demo-row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-3);
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.demo-row-loose {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-4);
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.demo-row-spacious {
|
|
display: flex;
|
|
align-items: flex-end;
|
|
gap: var(--space-6);
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.wide {
|
|
grid-column: 1 / -1;
|
|
}
|
|
|
|
.muted-sm {
|
|
color: var(--c-text-3);
|
|
font-size: 0.75rem;
|
|
}
|
|
|
|
/* ============================================================
|
|
FOOTER
|
|
============================================================ */
|
|
.footer-section {
|
|
text-align: center;
|
|
padding-top: 48px;
|
|
margin-top: 128px;
|
|
}
|
|
|
|
.footer-text {
|
|
margin-top: 24px;
|
|
font-size: 0.8125rem;
|
|
color: var(--c-text-3);
|
|
}
|
|
|
|
.st3-sig {
|
|
text-align: right;
|
|
padding: 48px 0 16px;
|
|
font-family: var(--c-mono);
|
|
font-size: 0.5625rem;
|
|
color: var(--c-text-3);
|
|
letter-spacing: 0.2em;
|
|
opacity: 0.3;
|
|
}
|
|
|
|
/* ============================================================
|
|
COMPONENT STYLES: Buttons
|
|
============================================================ */
|
|
petty-button button {
|
|
background: var(--color-surface);
|
|
border: 1px solid var(--color-border-strong);
|
|
border-radius: var(--radius-pill);
|
|
color: var(--color-text);
|
|
cursor: pointer;
|
|
font-family: var(--font-sans);
|
|
font-size: var(--text-base);
|
|
font-weight: var(--weight-medium);
|
|
padding: 10px 24px;
|
|
line-height: 1.25;
|
|
height: 40px;
|
|
transition: background var(--duration-normal) var(--ease-effects), border-color var(--duration-fast), box-shadow var(--duration-normal) var(--ease-effects);
|
|
}
|
|
|
|
petty-button button:hover {
|
|
background: var(--color-surface-raised);
|
|
box-shadow: var(--elevation-1);
|
|
}
|
|
|
|
petty-button button:disabled, petty-button[disabled] button {
|
|
opacity: 0.38;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
petty-button[data-state="loading"] button {
|
|
opacity: 0.38;
|
|
cursor: wait;
|
|
}
|
|
|
|
petty-button button.primary {
|
|
background: var(--color-accent);
|
|
border-color: var(--color-accent);
|
|
color: var(--accent-contrast);
|
|
font-weight: var(--weight-medium);
|
|
box-shadow: var(--elevation-1);
|
|
}
|
|
|
|
petty-button button.primary:hover {
|
|
background: var(--color-accent-hover);
|
|
border-color: var(--color-accent-hover);
|
|
box-shadow: var(--elevation-2);
|
|
}
|
|
|
|
.btn-outline {
|
|
background: var(--color-surface);
|
|
border: 1px solid var(--color-border-strong);
|
|
color: var(--color-text);
|
|
cursor: pointer;
|
|
font-family: var(--font-sans);
|
|
font-size: var(--text-base);
|
|
font-weight: var(--weight-medium);
|
|
padding: 10px 24px;
|
|
height: 40px;
|
|
border-radius: var(--radius-pill);
|
|
transition: background var(--duration-normal) var(--ease-effects), box-shadow var(--duration-normal);
|
|
}
|
|
|
|
.btn-outline:hover {
|
|
background: var(--color-surface-raised);
|
|
box-shadow: var(--elevation-1);
|
|
}
|
|
|
|
.hint-text {
|
|
cursor: help;
|
|
border-bottom: 1px dashed var(--c-text-3);
|
|
color: var(--c-text-2);
|
|
font-size: 0.875rem;
|
|
padding-bottom: 2px;
|
|
}
|
|
|
|
/* ============================================================
|
|
COMPONENT STYLES: Badge & Avatar
|
|
============================================================ */
|
|
petty-badge {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
font-family: var(--c-mono);
|
|
font-size: 0.6875rem;
|
|
height: 32px;
|
|
font-weight: 500;
|
|
padding: 3px 12px;
|
|
border-radius: var(--radius-md);
|
|
border: 1px solid var(--c-border-2);
|
|
background: var(--c-surface-2);
|
|
color: var(--c-text-2);
|
|
}
|
|
|
|
petty-badge[data-variant="success"] {
|
|
border-color: rgba(34, 197, 94, 0.3);
|
|
color: var(--c-green);
|
|
background: var(--c-green-glow);
|
|
}
|
|
|
|
petty-badge[data-variant="error"] {
|
|
border-color: rgba(244, 63, 94, 0.3);
|
|
color: var(--c-pink);
|
|
background: rgba(244, 63, 94, 0.08);
|
|
}
|
|
|
|
petty-badge[data-variant="warning"] {
|
|
border-color: rgba(234, 179, 8, 0.3);
|
|
color: var(--c-yellow);
|
|
background: rgba(234, 179, 8, 0.08);
|
|
}
|
|
|
|
petty-avatar {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 36px;
|
|
height: 36px;
|
|
border-radius: 50%;
|
|
background: var(--c-surface-3);
|
|
color: var(--c-text-2);
|
|
font-family: var(--c-font);
|
|
font-size: 0.75rem;
|
|
font-weight: 600;
|
|
}
|
|
|
|
petty-avatar img {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
border-radius: 50%;
|
|
}
|
|
|
|
/* ============================================================
|
|
COMPONENT STYLES: Separator
|
|
============================================================ */
|
|
petty-separator {
|
|
display: block;
|
|
height: 1px;
|
|
background: var(--c-border);
|
|
margin: 12px 0;
|
|
}
|
|
|
|
/* ============================================================
|
|
COMPONENT STYLES: Skeleton & Card
|
|
============================================================ */
|
|
petty-skeleton {
|
|
display: block;
|
|
height: 0.75rem;
|
|
border-radius: var(--radius-sm);
|
|
background: linear-gradient(
|
|
90deg,
|
|
var(--gray-3) 0%,
|
|
var(--gray-2) 40%,
|
|
var(--gray-3) 80%
|
|
);
|
|
background-size: 300% 100%;
|
|
animation: shimmer 1.8s ease-in-out infinite;
|
|
}
|
|
|
|
@keyframes shimmer {
|
|
0% { background-position: 200% 0; }
|
|
100% { background-position: -200% 0; }
|
|
}
|
|
|
|
.skeleton-stack {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
}
|
|
|
|
.skel-80 {
|
|
width: 80%;
|
|
height: 10px;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.skel-60 {
|
|
width: 60%;
|
|
height: 10px;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.skel-70 {
|
|
width: 70%;
|
|
height: 10px;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.skel-btn {
|
|
width: 5rem;
|
|
height: 1.75rem;
|
|
border-radius: var(--radius-sm);
|
|
}
|
|
|
|
petty-card {
|
|
display: block;
|
|
border: 1px solid var(--c-border);
|
|
border-radius: var(--radius-lg);
|
|
background: var(--c-surface);
|
|
overflow: hidden;
|
|
}
|
|
|
|
petty-card-header {
|
|
display: block;
|
|
padding: 20px 20px 0;
|
|
}
|
|
|
|
petty-card-header h4 {
|
|
font-family: var(--c-font);
|
|
font-size: 0.875rem;
|
|
font-weight: 600;
|
|
}
|
|
|
|
petty-card-content {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
padding: 12px 20px;
|
|
color: var(--c-text-2);
|
|
font-size: 0.8125rem;
|
|
}
|
|
|
|
petty-card-footer {
|
|
display: flex;
|
|
gap: 8px;
|
|
padding: 0 20px 20px;
|
|
}
|
|
|
|
/* ============================================================
|
|
COMPONENT STYLES: Text Field
|
|
============================================================ */
|
|
petty-text-field {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 6px;
|
|
}
|
|
|
|
petty-text-field [data-part="label"] {
|
|
font-family: var(--c-font);
|
|
font-size: 0.8125rem;
|
|
font-weight: 500;
|
|
color: var(--c-text-2);
|
|
}
|
|
|
|
petty-text-field input[data-part="control"] {
|
|
background: var(--c-bg);
|
|
border: 1px solid var(--c-border-2);
|
|
border-radius: var(--radius-sm);
|
|
color: var(--c-text);
|
|
font-family: var(--c-font);
|
|
font-size: 0.8125rem;
|
|
padding: 16px;
|
|
height: 56px;
|
|
outline: none;
|
|
transition: border-color var(--duration-fast) var(--ease-effects), box-shadow var(--duration-fast) var(--ease-effects);
|
|
}
|
|
|
|
petty-text-field input:focus {
|
|
border-color: var(--c-green);
|
|
border-width: 2px;
|
|
padding: 15px;
|
|
box-shadow: 0 0 0 2px var(--c-green-glow);
|
|
}
|
|
|
|
petty-text-field [data-part="error"] {
|
|
color: var(--c-pink);
|
|
font-size: 0.75rem;
|
|
min-height: 0.875rem;
|
|
}
|
|
|
|
petty-text-field [data-part="description"] {
|
|
color: var(--c-text-3);
|
|
font-size: 0.75rem;
|
|
}
|
|
|
|
/* ============================================================
|
|
COMPONENT STYLES: Checkbox & Switch
|
|
============================================================ */
|
|
petty-checkbox {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
cursor: pointer;
|
|
min-height: 48px;
|
|
}
|
|
|
|
petty-checkbox input[data-part="control"] {
|
|
appearance: none;
|
|
width: 18px;
|
|
height: 18px;
|
|
border: 1.5px solid var(--c-border-2);
|
|
border-radius: 2px;
|
|
background: var(--c-bg);
|
|
cursor: pointer;
|
|
transition: background var(--duration-fast) var(--ease-effects), border-color var(--duration-fast) var(--ease-effects), transform var(--duration-normal) var(--ease-expressive);
|
|
}
|
|
|
|
petty-checkbox input:checked {
|
|
background: var(--color-accent);
|
|
border-color: var(--color-accent);
|
|
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3E%3C/svg%3E");
|
|
background-size: 12px;
|
|
background-position: center;
|
|
background-repeat: no-repeat;
|
|
transform: scale(1.1);
|
|
}
|
|
|
|
petty-checkbox input:not(:checked) {
|
|
transform: scale(1);
|
|
}
|
|
|
|
petty-checkbox [data-part="label"] {
|
|
font-family: var(--c-font);
|
|
font-size: 0.8125rem;
|
|
color: var(--c-text-2);
|
|
cursor: pointer;
|
|
}
|
|
|
|
petty-switch {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
min-height: 48px;
|
|
}
|
|
|
|
petty-switch button[data-part="control"] {
|
|
position: relative;
|
|
width: 52px;
|
|
height: 32px;
|
|
border-radius: 16px;
|
|
border: none;
|
|
background: var(--c-surface-3);
|
|
cursor: pointer;
|
|
transition: background var(--duration-normal) var(--ease-effects);
|
|
padding: 0;
|
|
}
|
|
|
|
petty-switch[data-state="on"] button[data-part="control"] {
|
|
background: var(--c-green);
|
|
}
|
|
|
|
petty-switch [data-part="thumb"] {
|
|
display: block;
|
|
width: 16px;
|
|
height: 16px;
|
|
border-radius: 50%;
|
|
background: white;
|
|
position: absolute;
|
|
top: 8px;
|
|
left: 6px;
|
|
transition: transform var(--duration-normal) var(--ease-expressive), width var(--duration-normal) var(--ease-expressive), height var(--duration-normal) var(--ease-expressive), top var(--duration-normal) var(--ease-expressive);
|
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
|
|
}
|
|
|
|
petty-switch[data-state="on"] [data-part="thumb"] {
|
|
width: 24px;
|
|
height: 24px;
|
|
top: 4px;
|
|
transform: translateX(22px);
|
|
}
|
|
|
|
petty-switch [data-part="label"] {
|
|
font-family: var(--c-font);
|
|
font-size: 0.8125rem;
|
|
color: var(--c-text-2);
|
|
}
|
|
|
|
/* ============================================================
|
|
COMPONENT STYLES: Radio Group
|
|
============================================================ */
|
|
petty-radio-group {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 6px;
|
|
}
|
|
|
|
petty-radio-item {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
cursor: pointer;
|
|
font-family: var(--c-font);
|
|
font-size: 0.8125rem;
|
|
color: var(--c-text-2);
|
|
padding: 4px 0;
|
|
min-height: 48px;
|
|
transition: color var(--duration-fast) var(--ease-effects);
|
|
}
|
|
|
|
petty-radio-item[data-state="checked"] {
|
|
color: var(--c-text);
|
|
}
|
|
|
|
petty-radio-item::before {
|
|
content: "";
|
|
width: 20px;
|
|
height: 20px;
|
|
border-radius: 50%;
|
|
border: 1.5px solid var(--c-border-2);
|
|
background: var(--c-bg);
|
|
transition: border-color var(--duration-fast) var(--ease-effects), border-width var(--duration-normal) var(--ease-expressive);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
petty-radio-item[data-state="checked"]::before {
|
|
border-color: var(--c-green);
|
|
border-width: 5px;
|
|
}
|
|
|
|
/* ============================================================
|
|
COMPONENT STYLES: Toggle & Toggle Group
|
|
============================================================ */
|
|
petty-toggle button[data-part="control"] {
|
|
background: var(--color-surface);
|
|
border: 1px solid var(--color-border-strong);
|
|
border-radius: var(--radius-pill);
|
|
color: var(--color-text-secondary);
|
|
cursor: pointer;
|
|
font-family: var(--font-sans);
|
|
font-size: var(--text-base);
|
|
font-weight: var(--weight-medium);
|
|
padding: 10px 20px;
|
|
height: 40px;
|
|
transition: all var(--duration-normal) var(--ease-effects);
|
|
}
|
|
|
|
petty-toggle[data-state="on"] button[data-part="control"] {
|
|
background: var(--color-accent-subtle);
|
|
border-color: var(--color-accent);
|
|
color: var(--color-accent);
|
|
}
|
|
|
|
petty-toggle-group {
|
|
display: inline-flex;
|
|
border-radius: var(--radius-pill);
|
|
overflow: hidden;
|
|
border: 1px solid var(--color-border-strong);
|
|
}
|
|
|
|
petty-toggle-group-item {
|
|
background: var(--color-surface);
|
|
border: none;
|
|
border-right: 1px solid var(--color-border);
|
|
color: var(--color-text-secondary);
|
|
cursor: pointer;
|
|
font-family: var(--font-sans);
|
|
font-size: var(--text-base);
|
|
font-weight: var(--weight-medium);
|
|
padding: 10px 20px;
|
|
height: 40px;
|
|
flex: 1;
|
|
text-align: center;
|
|
transition: all var(--duration-fast) var(--ease-effects);
|
|
}
|
|
|
|
petty-toggle-group-item:last-child {
|
|
border-right: none;
|
|
}
|
|
|
|
petty-toggle-group-item[data-state="on"] {
|
|
background: var(--color-accent);
|
|
color: var(--accent-contrast);
|
|
}
|
|
|
|
/* ============================================================
|
|
COMPONENT STYLES: Slider & Number Field
|
|
============================================================ */
|
|
petty-slider {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
}
|
|
|
|
petty-slider [data-part="label"] {
|
|
font-family: var(--c-font);
|
|
font-size: 0.8125rem;
|
|
font-weight: 500;
|
|
color: var(--c-text-2);
|
|
}
|
|
|
|
petty-slider input[type="range"] {
|
|
-webkit-appearance: none;
|
|
appearance: none;
|
|
width: 100%;
|
|
height: 6px;
|
|
background: var(--color-surface-sunken);
|
|
border-radius: var(--radius-pill);
|
|
outline: none;
|
|
}
|
|
|
|
petty-slider input[type="range"]::-webkit-slider-thumb {
|
|
-webkit-appearance: none;
|
|
width: 20px;
|
|
height: 20px;
|
|
border-radius: 50%;
|
|
background: var(--color-accent);
|
|
cursor: pointer;
|
|
box-shadow: var(--elevation-2);
|
|
transition: transform var(--duration-normal) var(--ease-expressive);
|
|
}
|
|
|
|
petty-slider input[type="range"]::-webkit-slider-thumb:hover {
|
|
transform: scale(1.15);
|
|
}
|
|
|
|
petty-slider input[type="range"]:active::-webkit-slider-thumb {
|
|
transform: scale(1.25);
|
|
}
|
|
|
|
petty-slider [data-part="output"] {
|
|
font-family: var(--c-mono);
|
|
font-size: 0.8125rem;
|
|
color: var(--c-text-2);
|
|
align-self: flex-end;
|
|
}
|
|
|
|
petty-number-field {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
}
|
|
|
|
petty-number-field [data-part="label"] {
|
|
font-family: var(--c-font);
|
|
font-size: 0.8125rem;
|
|
font-weight: 500;
|
|
color: var(--c-text-2);
|
|
margin-right: 12px;
|
|
}
|
|
|
|
petty-number-field button {
|
|
background: var(--c-surface-2);
|
|
border: 1px solid var(--c-border-2);
|
|
color: var(--c-text-2);
|
|
cursor: pointer;
|
|
font-size: 0.875rem;
|
|
width: 32px;
|
|
height: 32px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
transition: background var(--duration-fast) var(--ease-effects), color var(--duration-fast) var(--ease-effects);
|
|
}
|
|
|
|
petty-number-field button:hover {
|
|
background: var(--c-surface-3);
|
|
color: var(--c-text);
|
|
}
|
|
|
|
petty-number-field [data-part="decrement"] {
|
|
border-radius: var(--radius-sm) 0 0 var(--radius-sm);
|
|
}
|
|
|
|
petty-number-field [data-part="increment"] {
|
|
border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
|
|
}
|
|
|
|
petty-number-field input[data-part="control"] {
|
|
-moz-appearance: textfield;
|
|
appearance: textfield;
|
|
background: var(--c-bg);
|
|
border: 1px solid var(--c-border-2);
|
|
border-left: none;
|
|
border-right: none;
|
|
color: var(--c-text);
|
|
font-family: var(--c-mono);
|
|
font-size: 0.8125rem;
|
|
text-align: center;
|
|
width: 48px;
|
|
height: 32px;
|
|
outline: none;
|
|
}
|
|
|
|
petty-number-field input::-webkit-inner-spin-button,
|
|
petty-number-field input::-webkit-outer-spin-button {
|
|
-webkit-appearance: none;
|
|
margin: 0;
|
|
}
|
|
|
|
/* ============================================================
|
|
COMPONENT STYLES: Tags Input
|
|
============================================================ */
|
|
petty-tags-input {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
align-items: center;
|
|
gap: 6px;
|
|
background: var(--c-bg);
|
|
border: 1px solid var(--c-border-2);
|
|
border-radius: var(--radius-sm);
|
|
padding: 6px 10px;
|
|
transition: border-color var(--duration-fast) var(--ease-effects), box-shadow var(--duration-fast) var(--ease-effects);
|
|
}
|
|
|
|
petty-tags-input:focus-within {
|
|
border-color: var(--c-green);
|
|
box-shadow: 0 0 0 3px var(--c-green-glow);
|
|
}
|
|
|
|
petty-tags-input [data-part="tags"] {
|
|
display: contents;
|
|
}
|
|
|
|
petty-tags-input [data-part="tag"] {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
background: var(--c-green-glow);
|
|
border: 1px solid rgba(34, 197, 94, 0.2);
|
|
border-radius: 4px;
|
|
color: var(--c-green);
|
|
font-family: var(--c-mono);
|
|
font-size: 0.75rem;
|
|
font-weight: 500;
|
|
padding: 2px 8px;
|
|
}
|
|
|
|
petty-tags-input [data-part="tag-remove"] {
|
|
background: none;
|
|
border: none;
|
|
color: var(--c-green-dim);
|
|
cursor: pointer;
|
|
font-size: 0.75rem;
|
|
padding: 0;
|
|
line-height: 1;
|
|
}
|
|
|
|
petty-tags-input [data-part="tag-remove"]:hover {
|
|
color: var(--c-pink);
|
|
}
|
|
|
|
petty-tags-input input[data-part="input"] {
|
|
background: transparent;
|
|
border: none;
|
|
color: var(--c-text);
|
|
font-family: var(--c-font);
|
|
font-size: 0.8125rem;
|
|
flex: 1;
|
|
min-width: 80px;
|
|
outline: none;
|
|
padding: 4px 0;
|
|
}
|
|
|
|
petty-tags-input input[data-part="input"]::placeholder {
|
|
color: var(--c-text-3);
|
|
}
|
|
|
|
/* ============================================================
|
|
COMPONENT STYLES: Select
|
|
============================================================ */
|
|
petty-select {
|
|
display: inline-block;
|
|
}
|
|
|
|
petty-select [data-part="trigger"] {
|
|
background: var(--c-surface-2);
|
|
border: 1px solid var(--c-border-2);
|
|
border-radius: var(--radius-sm);
|
|
color: var(--c-text-2);
|
|
cursor: pointer;
|
|
font-family: var(--c-font);
|
|
font-size: 0.8125rem;
|
|
padding: 8px 12px;
|
|
min-width: 150px;
|
|
text-align: left;
|
|
anchor-name: --petty-select-anchor;
|
|
transition: border-color var(--duration-fast) var(--ease-effects);
|
|
}
|
|
|
|
petty-select [data-part="trigger"]:hover {
|
|
border-color: var(--c-text-3);
|
|
}
|
|
|
|
petty-select [data-part="listbox"] {
|
|
background: var(--c-surface-2);
|
|
border: 1px solid var(--c-border-2);
|
|
border-radius: var(--radius-md);
|
|
box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1);
|
|
min-width: 150px;
|
|
padding: 4px;
|
|
margin: 0;
|
|
position-anchor: --petty-select-anchor;
|
|
inset: unset;
|
|
top: anchor(bottom);
|
|
left: anchor(left);
|
|
margin-top: 4px;
|
|
}
|
|
|
|
petty-select-option {
|
|
display: block;
|
|
border-radius: var(--radius-xs);
|
|
color: var(--c-text-2);
|
|
cursor: pointer;
|
|
font-size: 0.8125rem;
|
|
padding: 8px 10px;
|
|
transition: background var(--duration-fast) var(--ease-effects), color var(--duration-fast) var(--ease-effects);
|
|
}
|
|
|
|
petty-select-option:hover,
|
|
petty-select-option[data-highlighted] {
|
|
background: var(--c-surface-3);
|
|
color: var(--c-text);
|
|
}
|
|
|
|
petty-select-option[aria-selected="true"] {
|
|
color: var(--c-green);
|
|
}
|
|
|
|
/* ============================================================
|
|
COMPONENT STYLES: Tabs
|
|
============================================================ */
|
|
[role="tablist"] {
|
|
display: flex;
|
|
border-bottom: 1px solid var(--c-border);
|
|
gap: 0;
|
|
}
|
|
|
|
petty-tab {
|
|
background: none;
|
|
border: none;
|
|
border-bottom: 3px solid transparent;
|
|
color: var(--c-text-3);
|
|
cursor: pointer;
|
|
font-family: var(--c-font);
|
|
font-size: 0.8125rem;
|
|
font-weight: 500;
|
|
margin-bottom: -1px;
|
|
padding: 12px 16px;
|
|
height: 48px;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
transition: color var(--duration-fast) var(--ease-effects), border-color var(--duration-fast) var(--ease-effects);
|
|
}
|
|
|
|
petty-tab:hover {
|
|
color: var(--c-text-2);
|
|
}
|
|
|
|
petty-tab[data-state="active"] {
|
|
color: var(--c-text);
|
|
border-bottom-color: var(--c-green);
|
|
}
|
|
|
|
petty-tab-panel {
|
|
display: block;
|
|
padding: 20px 0;
|
|
color: var(--c-text-2);
|
|
font-size: 0.875rem;
|
|
line-height: 1.7;
|
|
}
|
|
|
|
petty-tab-panel[hidden] {
|
|
display: none;
|
|
}
|
|
|
|
/* ============================================================
|
|
COMPONENT STYLES: Accordion
|
|
============================================================ */
|
|
petty-accordion {
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
petty-accordion-item {
|
|
display: block;
|
|
border-bottom: 1px solid var(--c-border);
|
|
}
|
|
|
|
petty-accordion-item summary {
|
|
color: var(--c-text-2);
|
|
cursor: pointer;
|
|
font-family: var(--c-font);
|
|
font-size: 0.875rem;
|
|
font-weight: 500;
|
|
list-style: none;
|
|
padding: 16px 0;
|
|
transition: color var(--duration-fast) var(--ease-effects);
|
|
}
|
|
|
|
petty-accordion-item summary::-webkit-details-marker {
|
|
display: none;
|
|
}
|
|
|
|
petty-accordion-item details[open] summary {
|
|
color: var(--c-text);
|
|
}
|
|
|
|
petty-accordion-item [data-part="content"] {
|
|
color: var(--c-text-3);
|
|
font-size: 0.875rem;
|
|
padding-bottom: 16px;
|
|
line-height: 1.7;
|
|
}
|
|
|
|
/* ============================================================
|
|
COMPONENT STYLES: Breadcrumbs & Pagination
|
|
============================================================ */
|
|
petty-breadcrumbs {
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
petty-breadcrumbs ol {
|
|
display: flex;
|
|
align-items: center;
|
|
list-style: none;
|
|
padding: 0;
|
|
margin: 0;
|
|
}
|
|
|
|
petty-breadcrumb-item {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
font-size: 0.8125rem;
|
|
}
|
|
|
|
petty-breadcrumb-item::after {
|
|
content: "/";
|
|
color: var(--c-text-3);
|
|
margin: 0 8px;
|
|
}
|
|
|
|
petty-breadcrumb-item:last-child::after {
|
|
display: none;
|
|
}
|
|
|
|
petty-breadcrumb-item a {
|
|
color: var(--c-text-3);
|
|
text-decoration: none;
|
|
transition: color var(--duration-fast) var(--ease-effects);
|
|
}
|
|
|
|
petty-breadcrumb-item a:hover {
|
|
color: var(--c-text);
|
|
}
|
|
|
|
petty-breadcrumb-item[data-state="current"] {
|
|
color: var(--c-text);
|
|
font-weight: 500;
|
|
}
|
|
|
|
petty-pagination nav {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
}
|
|
|
|
petty-pagination-item {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
min-width: 32px;
|
|
height: 32px;
|
|
border-radius: var(--radius-sm);
|
|
background: var(--c-surface-2);
|
|
border: 1px solid var(--c-border);
|
|
color: var(--c-text-3);
|
|
cursor: pointer;
|
|
font-family: var(--c-font);
|
|
font-size: 0.8125rem;
|
|
font-weight: 500;
|
|
padding: 0 8px;
|
|
transition: background var(--duration-fast) var(--ease-effects), color var(--duration-fast) var(--ease-effects);
|
|
}
|
|
|
|
petty-pagination-item:hover {
|
|
background: var(--c-surface-3);
|
|
color: var(--c-text);
|
|
}
|
|
|
|
petty-pagination-item[data-state="active"] {
|
|
background: var(--c-text);
|
|
color: var(--c-bg);
|
|
border-color: var(--c-text);
|
|
}
|
|
|
|
petty-pagination-item[disabled] {
|
|
opacity: 0.38;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
/* ============================================================
|
|
COMPONENT STYLES: Dialog
|
|
============================================================ */
|
|
dialog {
|
|
background: rgba(255, 255, 255, 0.88);
|
|
backdrop-filter: blur(20px) saturate(1.2);
|
|
-webkit-backdrop-filter: blur(20px) saturate(1.2);
|
|
border: 1px solid rgba(255, 255, 255, 0.5);
|
|
border-radius: 28px;
|
|
box-shadow: 0 24px 80px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
|
|
color: var(--color-text);
|
|
max-width: min(90vw, 28rem);
|
|
padding: var(--space-8);
|
|
margin: auto;
|
|
inset: 0;
|
|
position: fixed;
|
|
}
|
|
|
|
dialog::backdrop {
|
|
background: rgba(15, 23, 42, 0.4);
|
|
backdrop-filter: blur(6px);
|
|
}
|
|
|
|
dialog h2 {
|
|
font-family: var(--c-font);
|
|
font-size: 1.125rem;
|
|
font-weight: 600;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
dialog p {
|
|
color: var(--c-text-2);
|
|
font-size: 0.875rem;
|
|
margin-bottom: 24px;
|
|
line-height: 1.7;
|
|
}
|
|
|
|
/* ============================================================
|
|
COMPONENT STYLES: Popover & Tooltip
|
|
============================================================ */
|
|
[popover] {
|
|
background: rgba(255, 255, 255, 0.9);
|
|
backdrop-filter: blur(16px) saturate(1.2);
|
|
-webkit-backdrop-filter: blur(16px) saturate(1.2);
|
|
border: 1px solid rgba(255, 255, 255, 0.5);
|
|
border-radius: var(--radius-lg);
|
|
box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.04);
|
|
color: var(--color-text);
|
|
font-size: var(--text-base);
|
|
padding: var(--space-4) var(--space-5);
|
|
margin: 0;
|
|
}
|
|
|
|
petty-popover {
|
|
display: inline-block;
|
|
}
|
|
|
|
petty-popover button[popovertarget] {
|
|
anchor-name: --popover-anchor;
|
|
}
|
|
|
|
petty-popover [popover] {
|
|
position-anchor: --popover-anchor;
|
|
inset: unset;
|
|
top: anchor(bottom);
|
|
left: anchor(left);
|
|
margin-top: 6px;
|
|
}
|
|
|
|
petty-tooltip {
|
|
display: inline-block;
|
|
}
|
|
|
|
petty-tooltip [data-part="trigger"] {
|
|
anchor-name: --tooltip-anchor;
|
|
}
|
|
|
|
petty-tooltip [data-part="content"] {
|
|
background: var(--c-text);
|
|
color: var(--c-bg);
|
|
font-size: 0.75rem;
|
|
font-weight: 500;
|
|
padding: 6px 12px;
|
|
border: none;
|
|
border-radius: var(--radius-xs);
|
|
position-anchor: --tooltip-anchor;
|
|
inset: unset;
|
|
top: anchor(bottom);
|
|
left: anchor(center);
|
|
translate: -50% 0;
|
|
margin-top: 6px;
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
}
|
|
|
|
/* ============================================================
|
|
COMPONENT STYLES: Dropdown Menu
|
|
============================================================ */
|
|
petty-dropdown-menu {
|
|
display: inline-block;
|
|
}
|
|
|
|
petty-dropdown-menu [data-part="trigger"] {
|
|
anchor-name: --menu-anchor;
|
|
}
|
|
|
|
petty-dropdown-menu [data-part="content"] {
|
|
min-width: 10rem;
|
|
padding: 4px;
|
|
border-radius: 4px;
|
|
position-anchor: --menu-anchor;
|
|
inset: unset;
|
|
top: anchor(bottom);
|
|
left: anchor(left);
|
|
margin-top: 4px;
|
|
}
|
|
|
|
petty-menu-item {
|
|
display: block;
|
|
border-radius: var(--radius-xs);
|
|
color: var(--c-text-2);
|
|
cursor: pointer;
|
|
font-size: 0.8125rem;
|
|
padding: 8px 10px;
|
|
transition: background var(--duration-fast) var(--ease-effects), color var(--duration-fast) var(--ease-effects);
|
|
}
|
|
|
|
petty-menu-item:hover,
|
|
petty-menu-item:focus {
|
|
background: var(--c-surface-3);
|
|
color: var(--c-text);
|
|
outline: none;
|
|
}
|
|
|
|
petty-menu-item[disabled] {
|
|
color: var(--c-text-3);
|
|
opacity: 0.38;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
petty-menu-item[disabled]:hover {
|
|
background: transparent;
|
|
color: var(--c-text-3);
|
|
}
|
|
|
|
/* ============================================================
|
|
COMPONENT STYLES: Alert
|
|
============================================================ */
|
|
petty-alert {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
gap: var(--space-3);
|
|
padding: var(--space-4) var(--space-5);
|
|
border-radius: var(--radius-lg);
|
|
border: 1px solid var(--color-border);
|
|
background: var(--color-surface);
|
|
font-size: var(--text-base);
|
|
}
|
|
|
|
petty-alert[data-variant="success"] {
|
|
border-color: #bbf7d0;
|
|
background: var(--color-success-subtle);
|
|
}
|
|
|
|
petty-alert[data-variant="error"] {
|
|
border-color: #fecaca;
|
|
background: var(--color-danger-subtle);
|
|
}
|
|
|
|
petty-alert[data-variant="warning"] {
|
|
border-color: #fde68a;
|
|
background: var(--color-warning-subtle);
|
|
}
|
|
|
|
.alert-icon {
|
|
flex-shrink: 0;
|
|
width: 20px;
|
|
height: 20px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 0.875rem;
|
|
margin-top: 1px;
|
|
}
|
|
|
|
petty-alert[data-variant="success"] .alert-icon { color: var(--color-success); }
|
|
petty-alert[data-variant="error"] .alert-icon { color: var(--color-danger); }
|
|
petty-alert[data-variant="warning"] .alert-icon { color: var(--color-warning); }
|
|
|
|
petty-alert [data-part="title"] {
|
|
font-weight: var(--weight-semibold);
|
|
font-size: var(--text-base);
|
|
margin-bottom: var(--space-1);
|
|
color: var(--color-text);
|
|
}
|
|
|
|
petty-alert [data-part="description"] {
|
|
color: var(--color-text-secondary);
|
|
font-size: var(--text-sm);
|
|
line-height: var(--leading-relaxed);
|
|
}
|
|
|
|
/* ============================================================
|
|
COMPONENT STYLES: Progress & Meter
|
|
============================================================ */
|
|
petty-progress { display: block; }
|
|
petty-meter { display: block; }
|
|
|
|
.progress-field {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-2);
|
|
}
|
|
|
|
.progress-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
font-size: var(--text-sm);
|
|
color: var(--color-text);
|
|
font-weight: var(--weight-medium);
|
|
}
|
|
|
|
.progress-header .meter-low { color: var(--color-success); }
|
|
.progress-header .meter-high { color: var(--color-danger); }
|
|
|
|
petty-progress [data-part="track"],
|
|
petty-meter [data-part="track"] {
|
|
height: 10px;
|
|
background: var(--color-surface-sunken);
|
|
border-radius: var(--radius-pill);
|
|
overflow: hidden;
|
|
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
|
|
}
|
|
|
|
petty-progress [data-part="fill"] {
|
|
height: 100%;
|
|
background: var(--color-accent);
|
|
border-radius: var(--radius-pill);
|
|
width: calc(var(--petty-progress, 0) * 100%);
|
|
transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
|
|
box-shadow: 0 0 8px rgba(54, 192, 241, 0.3);
|
|
}
|
|
|
|
petty-progress [data-part="label"] { display: none; }
|
|
|
|
petty-meter [data-part="fill"] {
|
|
height: 100%;
|
|
border-radius: var(--radius-pill);
|
|
width: calc(var(--petty-meter-value, 0) * 100%);
|
|
transition: width 0.6s var(--ease-standard);
|
|
}
|
|
|
|
petty-meter [data-part="fill"] {
|
|
transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
|
|
}
|
|
|
|
petty-meter[data-state="low"] [data-part="fill"] { background: var(--color-danger); box-shadow: 0 0 8px rgba(220, 38, 38, 0.3); }
|
|
petty-meter[data-state="medium"] [data-part="fill"] { background: var(--color-warning); box-shadow: 0 0 8px rgba(217, 119, 6, 0.3); }
|
|
petty-meter[data-state="high"] [data-part="fill"] { background: var(--color-success); box-shadow: 0 0 8px rgba(22, 163, 74, 0.3); }
|
|
petty-meter[data-state="optimum"] [data-part="fill"] { background: var(--color-accent); box-shadow: 0 0 8px rgba(54, 192, 241, 0.3); }
|
|
|
|
/* ============================================================
|
|
COMPONENT STYLES: Toast
|
|
============================================================ */
|
|
petty-toast-region {
|
|
position: fixed;
|
|
bottom: 24px;
|
|
right: 24px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
max-width: 22rem;
|
|
width: 100%;
|
|
z-index: 9997;
|
|
pointer-events: none;
|
|
}
|
|
|
|
[data-part="toast"] {
|
|
background: var(--color-surface);
|
|
color: var(--color-text);
|
|
border: 1px solid var(--color-border);
|
|
border-radius: var(--radius-md);
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 16px 32px rgba(0, 0, 0, 0.06);
|
|
display: grid;
|
|
grid-template-columns: 1fr auto;
|
|
gap: var(--space-1);
|
|
padding: 16px;
|
|
pointer-events: auto;
|
|
animation: toastIn 0.4s var(--ease-expressive);
|
|
}
|
|
|
|
[data-part="toast"][data-type="success"] {
|
|
background: var(--color-success-subtle);
|
|
border-color: #bbf7d0;
|
|
}
|
|
|
|
[data-part="toast"][data-type="error"] {
|
|
background: var(--color-danger-subtle);
|
|
border-color: #fecaca;
|
|
}
|
|
|
|
[data-part="toast-title"] {
|
|
font-family: var(--font-sans);
|
|
font-size: var(--text-base);
|
|
font-weight: var(--weight-semibold);
|
|
line-height: 1.4;
|
|
}
|
|
|
|
[data-part="toast"][data-type="success"] [data-part="toast-title"] { color: var(--color-success); }
|
|
[data-part="toast"][data-type="error"] [data-part="toast-title"] { color: var(--color-danger); }
|
|
|
|
[data-part="toast-description"] {
|
|
color: var(--color-text-secondary);
|
|
font-size: var(--text-sm);
|
|
line-height: 1.5;
|
|
grid-column: 1;
|
|
}
|
|
|
|
[data-part="toast-close"] {
|
|
background: none;
|
|
border: none;
|
|
color: var(--color-text-tertiary);
|
|
cursor: pointer;
|
|
font-size: 1rem;
|
|
padding: 4px;
|
|
line-height: 1;
|
|
grid-row: 1;
|
|
grid-column: 2;
|
|
align-self: start;
|
|
transition: color var(--duration-fast);
|
|
}
|
|
|
|
[data-part="toast-close"]:hover {
|
|
color: var(--color-text);
|
|
}
|
|
|
|
@keyframes toastIn {
|
|
from {
|
|
transform: translateY(100%) scale(0.9);
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
transform: translateY(0) scale(1);
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
/* ============================================================
|
|
COMPONENT STYLES: Link & Collapsible
|
|
============================================================ */
|
|
petty-link a {
|
|
color: var(--c-green);
|
|
text-decoration: none;
|
|
font-size: 0.875rem;
|
|
transition: opacity var(--duration-fast) var(--ease-effects);
|
|
}
|
|
|
|
petty-link a:hover {
|
|
opacity: 0.8;
|
|
}
|
|
|
|
petty-collapsible summary {
|
|
color: var(--c-text-2);
|
|
cursor: pointer;
|
|
font-family: var(--c-font);
|
|
font-size: 0.875rem;
|
|
font-weight: 500;
|
|
list-style: none;
|
|
padding: 8px 0;
|
|
}
|
|
|
|
petty-collapsible summary::-webkit-details-marker {
|
|
display: none;
|
|
}
|
|
|
|
petty-collapsible [data-part="content"] {
|
|
color: var(--c-text-3);
|
|
font-size: 0.875rem;
|
|
padding: 8px 0;
|
|
line-height: 1.7;
|
|
}
|
|
|
|
/* ============================================================
|
|
RESPONSIVE
|
|
============================================================ */
|
|
@media (max-width: 768px) {
|
|
.hero-stats {
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.grid {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.value-list {
|
|
flex-direction: column;
|
|
gap: var(--space-8);
|
|
}
|
|
|
|
.section {
|
|
margin-top: 64px;
|
|
}
|
|
|
|
.footer-section {
|
|
margin-top: 80px;
|
|
}
|
|
|
|
.hero {
|
|
min-height: 70vh;
|
|
padding: 6rem 0 4rem;
|
|
}
|
|
}
|