rspace-online/modules/rvote/components/vote.css

202 lines
4.4 KiB
CSS

/* Vote module — dark theme */
folk-vote-dashboard {
display: block;
min-height: 400px;
padding: 20px;
}
/* ── Demo page layout ── */
.rd-page {
max-width: 720px;
margin: 0 auto;
padding: 2rem 1rem 4rem;
font-family: system-ui, -apple-system, sans-serif;
color: #e2e8f0;
}
.rd-hero {
text-align: center;
margin-bottom: 2rem;
}
.rd-hero h1 {
font-size: 2rem;
font-weight: 700;
margin: 0 0 0.5rem;
background: linear-gradient(to right, #818cf8, #c084fc);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.rd-hero p {
color: #94a3b8;
font-size: 1rem;
margin: 0;
}
.rd-toolbar {
display: flex;
align-items: center;
gap: 0.75rem;
margin-bottom: 1.5rem;
flex-wrap: wrap;
}
/* ── Connection badge ── */
.rd-status {
display: inline-flex;
align-items: center;
gap: 0.35rem;
padding: 0.25rem 0.75rem;
border-radius: 9999px;
font-size: 0.75rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.03em;
}
.rd-status::before {
content: "";
width: 8px;
height: 8px;
border-radius: 50%;
}
.rd-status--connected {
background: rgba(34, 197, 94, 0.1);
color: #22c55e;
border: 1px solid rgba(34, 197, 94, 0.25);
}
.rd-status--connected::before { background: #22c55e; }
.rd-status--disconnected {
background: rgba(239, 68, 68, 0.1);
color: #ef4444;
border: 1px solid rgba(239, 68, 68, 0.25);
}
.rd-status--disconnected::before { background: #ef4444; }
/* ── Buttons ── */
.rd-btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.4rem;
padding: 0.4rem 1rem;
border-radius: 8px;
border: 1px solid #475569;
background: #1e293b;
color: #e2e8f0;
font-size: 0.8rem;
font-weight: 500;
cursor: pointer;
transition: all 0.15s;
}
.rd-btn:hover:not(:disabled) { border-color: #818cf8; color: #818cf8; }
.rd-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.rd-btn--primary {
background: linear-gradient(to right, #818cf8, #6366f1);
border-color: transparent;
color: white;
}
.rd-btn--primary:hover:not(:disabled) { opacity: 0.9; color: white; }
.rd-btn--ghost {
background: transparent;
border: 1px solid #334155;
color: #94a3b8;
padding: 0;
border-radius: 6px;
font-weight: 700;
font-size: 1rem;
}
.rd-btn--ghost:hover:not(:disabled) { border-color: #f97316; color: #fb923c; }
/* ── Poll cards ── */
.rd-card {
background: #0f172a;
border: 1px solid #1e293b;
border-radius: 12px;
margin-bottom: 1rem;
overflow: hidden;
transition: border-color 0.2s;
}
.rd-card:hover { border-color: rgba(249, 115, 22, 0.35); }
.rd-card-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
padding: 1rem 1.25rem 0.5rem;
gap: 0.75rem;
}
.rd-card-title {
font-size: 1rem;
font-weight: 600;
color: #e2e8f0;
line-height: 1.4;
}
.rd-icon { margin-right: 0.35rem; }
.rd-card-body {
padding: 0.5rem 1.25rem 1.25rem;
}
/* ── Badges ── */
.rd-badge {
display: inline-flex;
padding: 0.15rem 0.5rem;
border-radius: 6px;
font-size: 0.7rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.03em;
flex-shrink: 0;
white-space: nowrap;
}
.rd-badge--orange { background: rgba(249, 115, 22, 0.15); color: #fb923c; }
.rd-badge--green { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.rd-badge--red { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.rd-badge--blue { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.rd-badge--slate { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }
/* ── Loading / empty ── */
.rd-loading {
text-align: center;
padding: 3rem 1rem;
color: #64748b;
}
.rd-loading-spinner {
width: 32px;
height: 32px;
border: 3px solid rgba(129, 140, 248, 0.2);
border-top-color: #818cf8;
border-radius: 50%;
animation: rd-spin 0.8s linear infinite;
margin: 0 auto 1rem;
}
@keyframes rd-spin { to { transform: rotate(360deg); } }
.rd-empty {
text-align: center;
padding: 3rem 1rem;
color: #475569;
font-size: 0.9rem;
}
.rd-empty-icon { font-size: 2rem; margin-bottom: 0.5rem; }
/* ── Footer link ── */
.rd-footer {
text-align: center;
margin-top: 2.5rem;
padding-top: 1.5rem;
border-top: 1px solid #1e293b;
}
.rd-footer a {
color: #64748b;
text-decoration: none;
font-size: 0.85rem;
}
.rd-footer a:hover { color: #818cf8; }
/* ── Responsive ── */
@media (max-width: 600px) {
.rd-page { padding: 1rem 0.75rem 3rem; }
.rd-hero h1 { font-size: 1.5rem; }
.rd-card-header { padding: 0.75rem 1rem 0.4rem; }
.rd-card-body { padding: 0.4rem 1rem 1rem; }
}