Files
vitfit-r2/V2/app/public/styles/components.css
T
2026-06-13 08:03:45 -04:00

308 lines
11 KiB
CSS

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: var(--space-2);
height: 44px;
padding: 0 var(--space-5);
border-radius: var(--radius-md);
font-size: var(--text-base);
font-weight: var(--weight-semibold);
border: none;
cursor: pointer;
transition: opacity var(--transition-fast);
white-space: nowrap;
text-decoration: none;
}
.btn:active { opacity: 0.75; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-primary { background: var(--color-primary); color: var(--text-on-primary); }
.btn-secondary { background: var(--surface-raised); color: var(--text-primary); }
.btn-danger { background: var(--color-danger); color: #fff; }
.btn-ghost { background: transparent; color: var(--color-primary); border: 1px solid var(--surface-border); }
.btn-sm { height: 36px; padding: 0 var(--space-4); font-size: var(--text-sm); }
.btn-lg { height: 52px; padding: 0 var(--space-6); font-size: var(--text-lg); }
.btn-full { width: 100%; }
/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
background: var(--surface-card);
border-radius: var(--radius-md);
border: 1px solid var(--surface-border);
padding: var(--space-5);
}
.card-header {
font-size: var(--text-lg);
font-weight: var(--weight-semibold);
color: var(--text-primary);
margin-bottom: var(--space-4);
}
.card-meta {
font-size: var(--text-sm);
color: var(--text-secondary);
}
.card-actions {
display: flex;
gap: var(--space-3);
margin-top: var(--space-4);
}
.card + .card { margin-top: var(--space-4); }
/* ── Forms ───────────────────────────────────────────────────────────────── */
.form-field { margin-bottom: var(--space-5); }
.form-label {
display: block;
font-size: var(--text-sm);
font-weight: var(--weight-medium);
color: var(--text-secondary);
margin-bottom: var(--space-2);
}
.form-input,
.form-select,
.form-textarea {
width: 100%;
height: 44px;
padding: 0 var(--space-4);
background: var(--surface-raised);
border: 1px solid var(--surface-border);
border-radius: var(--radius-sm);
color: var(--text-primary);
font-size: var(--text-base);
transition: border-color var(--transition-fast);
}
.form-textarea {
height: auto;
padding: var(--space-3) var(--space-4);
resize: vertical;
min-height: 100px;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
border-color: var(--color-primary);
outline: none;
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-muted); }
.form-error {
font-size: var(--text-sm);
color: var(--color-danger);
margin-top: var(--space-2);
}
.form-hint {
font-size: var(--text-sm);
color: var(--text-muted);
margin-top: var(--space-2);
}
.form-row {
display: grid;
grid-template-columns: 1fr 1fr;
gap: var(--space-4);
}
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }
/* ── Color input ─────────────────────────────────────────────────────────── */
.form-input[type="color"] {
height: 44px;
padding: var(--space-1) var(--space-2);
cursor: pointer;
}
/* ── Badges ──────────────────────────────────────────────────────────────── */
.badge {
display: inline-flex;
align-items: center;
padding: 2px var(--space-2);
border-radius: var(--radius-full);
font-size: var(--text-xs);
font-weight: var(--weight-semibold);
text-transform: uppercase;
letter-spacing: 0.04em;
white-space: nowrap;
}
.badge-success { background: color-mix(in srgb, var(--color-success) 15%, transparent); color: var(--color-success); }
.badge-danger { background: color-mix(in srgb, var(--color-danger) 15%, transparent); color: var(--color-danger); }
.badge-info { background: color-mix(in srgb, var(--color-info) 15%, transparent); color: var(--color-info); }
.badge-warning { background: color-mix(in srgb, var(--color-warning-ui) 15%, transparent); color: var(--color-warning-ui); }
.badge-neutral { background: var(--surface-raised); color: var(--text-secondary); }
/* ── Modal ───────────────────────────────────────────────────────────────── */
.modal-scrim {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.7);
z-index: calc(var(--z-modal) - 1);
display: flex;
align-items: center;
justify-content: center;
padding: var(--space-4);
opacity: 0;
pointer-events: none;
transition: opacity var(--transition-base);
}
.modal-scrim.open {
opacity: 1;
pointer-events: all;
}
.modal {
background: var(--surface-raised);
border-radius: var(--radius-lg);
border: 1px solid var(--surface-border);
width: 100%;
max-width: 480px;
max-height: 90dvh;
overflow-y: auto;
display: flex;
flex-direction: column;
}
.modal-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: var(--space-5) var(--space-6) var(--space-4);
border-bottom: 1px solid var(--surface-border);
}
.modal-title { font-size: var(--text-lg); font-weight: var(--weight-semibold); }
.modal-close {
width: 36px; height: 36px;
display: flex; align-items: center; justify-content: center;
background: none; border: none; cursor: pointer;
color: var(--text-secondary); font-size: 20px;
border-radius: var(--radius-sm);
transition: background var(--transition-fast);
}
.modal-close:hover { background: var(--surface-hover); color: var(--text-primary); }
.modal-body { padding: var(--space-6); flex: 1; }
.modal-footer {
padding: var(--space-4) var(--space-6);
border-top: 1px solid var(--surface-border);
display: flex;
justify-content: flex-end;
gap: var(--space-3);
}
/* ── Toast ───────────────────────────────────────────────────────────────── */
#toast-container {
position: fixed;
bottom: var(--space-6);
left: 50%;
transform: translateX(-50%);
z-index: var(--z-toast);
display: flex;
flex-direction: column;
align-items: center;
gap: var(--space-3);
pointer-events: none;
width: max-content;
max-width: min(360px, calc(100vw - 32px));
}
.toast {
padding: var(--space-3) var(--space-5);
border-radius: var(--radius-md);
font-size: var(--text-sm);
font-weight: var(--weight-medium);
box-shadow: 0 4px 16px rgba(0,0,0,0.4);
pointer-events: all;
animation: toastIn 200ms ease forwards;
}
@keyframes toastIn {
from { opacity: 0; transform: translateY(8px); }
to { opacity: 1; transform: translateY(0); }
}
.toast-success { background: var(--surface-raised); border-left: 3px solid var(--color-success); color: var(--text-primary); }
.toast-error { background: var(--surface-raised); border-left: 3px solid var(--color-danger); color: var(--text-primary); }
.toast-warning { background: var(--surface-raised); border-left: 3px solid var(--color-warning-ui); color: var(--text-primary); }
.toast-info { background: var(--surface-raised); border-left: 3px solid var(--color-info); color: var(--text-primary); }
/* ── Progress bar ────────────────────────────────────────────────────────── */
.progress-bar {
height: 8px;
background: var(--surface-border);
border-radius: var(--radius-full);
overflow: hidden;
}
.progress-fill {
height: 100%;
border-radius: var(--radius-full);
background: var(--color-primary);
transition: width var(--transition-slow);
}
.progress-fill.warning { background: var(--color-warning-ui); }
.progress-fill.danger { background: var(--color-danger); }
/* ── Table ───────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td {
padding: var(--space-3) var(--space-4);
text-align: left;
border-bottom: 1px solid var(--surface-border);
font-size: var(--text-sm);
}
th {
font-weight: var(--weight-semibold);
color: var(--text-secondary);
white-space: nowrap;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--surface-hover); }
/* ── Video card ──────────────────────────────────────────────────────────── */
.video-card { overflow: hidden; }
.video-card video {
width: 100%;
aspect-ratio: 16/9;
background: #000;
border-radius: var(--radius-sm);
margin-bottom: var(--space-3);
}
/* ── Upload progress ─────────────────────────────────────────────────────── */
.upload-progress { display: none; margin-top: var(--space-4); }
.upload-progress.visible { display: block; }
/* ── Empty state ─────────────────────────────────────────────────────────── */
.empty-state {
text-align: center;
padding: var(--space-16) var(--space-6);
color: var(--text-muted);
}
.empty-state-title { font-size: var(--text-lg); margin-bottom: var(--space-2); color: var(--text-secondary); }
/* ── Warning banner ──────────────────────────────────────────────────────── */
.warning-banner {
background: color-mix(in srgb, var(--color-warning-ui) 12%, transparent);
border: 1px solid var(--color-warning-ui);
border-radius: var(--radius-md);
padding: var(--space-3) var(--space-5);
font-size: var(--text-sm);
color: var(--color-warning-ui);
margin-bottom: var(--space-5);
}
/* ── Session expired overlay ─────────────────────────────────────────────── */
#session-expired-overlay {
position: fixed;
inset: 0;
background: rgba(0,0,0,0.8);
z-index: var(--z-overlay);
display: flex;
align-items: center;
justify-content: center;
display: none;
}
#session-expired-overlay.visible { display: flex; }
.session-expired-card {
background: var(--surface-card);
border-radius: var(--radius-lg);
padding: var(--space-8);
text-align: center;
max-width: 320px;
}
.session-expired-card h2 { margin-bottom: var(--space-4); }