prism/server/public/index.css
2026-01-22 22:31:30 -08:00

325 lines
5.1 KiB
CSS

:root {
--bg-primary: #f5f5f5;
--bg-secondary: #fdfdfd;
--text-primary: #000;
--text-secondary: #666;
--border-color: rgba(0, 0, 0, 0.1);
--accent: #8159b8;
--success: #28a745;
--error: #dc3545;
--spinner-track: #e0e0e0;
}
@media (prefers-color-scheme: dark) {
:root {
--bg-primary: #1a1a1a;
--bg-secondary: #2d2d2d;
--text-primary: #e0e0e0;
--text-secondary: #a0a0a0;
--border-color: rgba(255, 255, 255, 0.1);
--success: #28a745;
--error: #ef4444;
--spinner-track: #4a4a4a;
}
}
[data-theme="light"] {
--bg-primary: #f5f5f5;
--bg-secondary: #fdfdfd;
--text-primary: #000;
--text-secondary: #666;
--border-color: rgba(0, 0, 0, 0.1);
--success: #28a745;
--error: #dc3545;
--spinner-track: #e0e0e0;
}
[data-theme="dark"] {
--bg-primary: #1a1a1a;
--bg-secondary: #2d2d2d;
--text-primary: #e0e0e0;
--text-secondary: #a0a0a0;
--border-color: rgba(255, 255, 255, 0.1);
--success: #28a745;
--error: #ef4444;
--spinner-track: #4a4a4a;
}
/* CSS Reset */
*,
*::before,
*::after {
box-sizing: border-box;
}
* {
margin: 0;
padding: 0;
}
body {
line-height: 1.5;
-webkit-font-smoothing: antialiased;
}
img,
picture,
video,
canvas,
svg {
display: block;
max-width: 100%;
}
input,
button,
textarea,
select {
font: inherit;
}
p,
h1,
h2,
h3,
h4,
h5,
h6 {
overflow-wrap: break-word;
}
/* Styles */
body {
font-family: system-ui;
max-width: 50rem;
margin: 1.25rem auto;
padding: 0 1.25rem 1.25rem;
background: var(--bg-primary);
color: var(--text-primary);
}
.card {
background: var(--bg-secondary);
border-radius: 0.5rem;
padding: 1.25rem;
margin-bottom: 1.25rem;
box-shadow: 0 0.125rem 0.25rem var(--border-color);
}
h2 {
margin-bottom: 1.25rem;
}
.status {
display: flex;
gap: 1rem;
flex-wrap: wrap;
}
.status-item {
padding: 0.625rem 1rem;
border-radius: 0.25rem;
font-weight: 500;
position: relative;
}
.status-item:has(.tooltip) {
cursor: help;
}
.status-item .tooltip {
visibility: hidden;
opacity: 0;
position: absolute;
bottom: 100%;
left: 50%;
transform: translateX(-50%);
margin-bottom: 0.5rem;
background: var(--bg-secondary);
color: var(--text-primary);
padding: 0.375rem 0.625rem;
border-radius: 0.25rem;
border: 1px solid var(--border-color);
font-size: 0.875rem;
font-weight: 400;
white-space: nowrap;
transition: opacity 0.2s;
pointer-events: none;
z-index: 10;
box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.2);
}
.status-item .tooltip::after {
content: "";
position: absolute;
top: 100%;
left: 50%;
transform: translateX(-50%);
border: 0.3125rem solid transparent;
border-top-color: var(--bg-secondary);
}
.status-item:hover .tooltip {
visibility: visible;
opacity: 1;
}
.theme-toggle {
position: fixed;
bottom: 1.5rem;
right: 1.5rem;
background: transparent;
border: none;
cursor: pointer;
font-size: 1.5rem;
padding: 0;
line-height: 1;
opacity: 0.4;
transition: opacity 0.2s;
z-index: 100;
}
.theme-toggle:hover {
opacity: 0.8;
}
.status-ok {
background: var(--success);
color: white;
}
.status-error {
background: var(--error);
color: white;
}
.endpoint-list {
list-style: none;
padding: 0;
max-height: 18.75rem;
overflow-y: auto;
}
.endpoint-item {
display: flex;
align-items: center;
padding: 0.5rem 0.75rem;
background: var(--bg-primary);
border-radius: 0.25rem;
margin-bottom: 0.375rem;
}
.endpoint-name {
font-size: 1.1em;
flex: 1;
}
.btn-delete {
padding: 0.375rem 0.75rem;
background: var(--error);
color: white;
border: none;
border-radius: 0.25rem;
cursor: pointer;
transition: filter 0.2s;
}
.btn-delete:hover {
filter: brightness(0.9);
}
.btn-cancel {
margin-top: 1rem;
padding: 0.5rem 1rem;
background: var(--text-secondary);
color: white;
border: none;
border-radius: 0.25rem;
cursor: pointer;
transition: filter 0.2s;
}
.btn-cancel:hover {
filter: brightness(0.9);
}
.unlink-details {
margin-top: 1rem;
}
.unlink-summary {
cursor: pointer;
font-weight: bold;
}
.unlink-instructions {
margin-top: 1rem;
}
.unlink-instructions ol {
margin-left: 1.25rem;
}
.qr-instructions {
font-size: 1.05em;
}
.qr-container {
margin-top: 1rem;
width: 18.75rem;
height: 18.75rem;
display: flex;
align-items: center;
justify-content: center;
}
.qr-image {
width: 100%;
height: 100%;
object-fit: contain;
}
.link-button {
display: inline-block;
padding: 0.625rem 1.25rem;
background: var(--accent);
color: white;
text-decoration: none;
border-radius: 0.25rem;
margin-top: 0.625rem;
border: none;
cursor: pointer;
transition: filter 0.2s;
}
.link-button:hover {
filter: brightness(0.9);
}
.loading {
color: var(--text-secondary);
display: flex;
align-items: center;
gap: 0.5rem;
}
.spinner {
width: 1.25rem;
height: 1.25rem;
border: 0.125rem solid var(--spinner-track);
border-top-color: var(--accent);
border-radius: 50%;
animation: spin 0.8s linear infinite;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
.loading-subtitle {
font-size: 0.875rem;
color: var(--text-secondary);
margin-top: 0.5rem;
}