CrowdProof-Observe-Chrome/sidepanel/sidepanel.css

554 lines
9.1 KiB
CSS
Raw Permalink Normal View History

2025-12-30 23:01:34 +00:00
/* Theme Variables - CSS-based theming for Chrome */
@media (prefers-color-scheme: dark) {
:root {
--theme-bg: #1c1b22;
--theme-text: #fbfbfe;
--theme-border: #5b5b66;
--theme-button-bg: #42414d;
--theme-highlight: #00ddff;
--theme-highlight-text: #1c1b22;
}
}
@media (prefers-color-scheme: light) {
:root {
--theme-bg: #ffffff;
--theme-text: #1a1a1a;
--theme-border: #cccccc;
--theme-button-bg: #f0f0f0;
--theme-highlight: #0060df;
--theme-highlight-text: #ffffff;
}
}
/* Reset */
*, *::before, *::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
/* Base */
html, body {
height: 100%;
background: var(--theme-bg, #1c1b22);
color: var(--theme-text, #fbfbfe);
font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
font-size: 14px;
line-height: 1.5;
}
/* Utility */
.hidden {
display: none !important;
}
/* Screens */
.screen {
padding: 16px;
}
/* Header */
.header {
display: flex;
flex-direction: column;
align-items: center;
padding-bottom: 12px;
margin-bottom: 16px;
border-bottom: 1px solid var(--theme-border, #5b5b66);
}
.header-title {
font-size: 16px;
font-weight: 600;
text-align: center;
}
.header-logo {
height: 80px;
max-width: 240px;
object-fit: contain;
}
.header-logo.hidden {
display: none;
}
.header-row {
flex-direction: row;
justify-content: space-between;
}
.header-actions {
display: flex;
gap: 8px;
align-self: flex-end;
margin-bottom: 12px;
}
.instance-name {
font-size: 14px;
font-weight: 500;
opacity: 0.8;
margin-top: 8px;
}
/* Tabs */
.tabs {
display: flex;
gap: 4px;
margin-bottom: 20px;
padding: 4px;
background: rgba(128, 128, 128, 0.15);
border-radius: 6px;
}
.tab {
flex: 1;
padding: 8px 6px;
background: transparent;
border: 1px solid transparent;
border-radius: 4px;
color: var(--theme-text, #fbfbfe) !important;
font-family: inherit;
font-size: 12px;
font-weight: 500;
cursor: pointer;
opacity: 0.7;
transition: all 0.15s;
text-align: center;
}
.tab:hover {
opacity: 1;
background: rgba(128, 128, 128, 0.2);
}
.tab.active {
opacity: 1;
background: rgba(10, 132, 255, 0.2);
border-color: #0a84ff;
color: #0a84ff !important;
}
/* Forms */
.form {
display: flex;
flex-direction: column;
gap: 16px;
}
/* Form Groups */
.form-group {
display: flex;
flex-direction: column;
gap: 6px;
}
.form-group label {
font-size: 12px;
font-weight: 500;
color: var(--theme-text, #fbfbfe);
opacity: 0.85;
}
/* Inputs */
input[type="text"],
input[type="url"],
input[type="password"],
input[type="email"],
textarea,
select {
width: 100%;
padding: 10px 12px;
background: var(--theme-button-bg, #42414d);
color: var(--theme-text, #fbfbfe);
border: 1px solid var(--theme-border, #5b5b66);
border-radius: 4px;
font-family: inherit;
font-size: 13px;
transition: border-color 0.15s, box-shadow 0.15s;
}
input[type="text"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
outline: none;
border-color: var(--theme-highlight, #00ddff);
box-shadow: 0 0 0 1px var(--theme-highlight, #00ddff);
}
input::placeholder,
textarea::placeholder {
color: var(--theme-text, #fbfbfe);
opacity: 0.4;
}
textarea {
min-height: 80px;
resize: vertical;
}
input[type="file"] {
padding: 8px 0;
font-size: 13px;
border: none;
background: none;
}
/* Buttons */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 10px 16px;
background: rgba(128, 128, 128, 0.2);
color: inherit;
border: 1px solid rgba(128, 128, 128, 0.4);
border-radius: 4px;
font-family: inherit;
font-size: 13px;
font-weight: 500;
cursor: pointer;
transition: background-color 0.15s;
}
.btn:hover {
background: rgba(128, 128, 128, 0.3);
}
.btn:active {
background: rgba(128, 128, 128, 0.4);
}
.btn-primary {
background: #0a84ff;
color: #ffffff;
border-color: #0a84ff;
}
.btn-primary:hover {
background: #0060df;
border-color: #0060df;
}
.btn-primary:active {
background: #003eaa;
border-color: #003eaa;
}
.btn-block {
width: 100%;
}
.btn-sm {
padding: 6px 12px;
font-size: 12px;
}
/* Submit button specific */
.btn-submit {
margin-top: 8px;
padding: 12px 16px;
font-size: 14px;
}
/* Loading */
#loading {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 200px;
gap: 12px;
opacity: 0.6;
}
/* Setup screen */
#setup {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
padding: 48px 24px;
gap: 16px;
}
#setup .header-title {
font-size: 18px;
}
#setup p {
opacity: 0.7;
max-width: 240px;
}
/* Login form */
#login .header {
justify-content: center;
}
/* Error messages */
.error-message {
color: #ff6b6b;
font-size: 13px;
padding: 8px 0;
}
/* Status messages */
.status {
margin-top: 16px;
padding: 12px;
border-radius: 4px;
text-align: center;
font-size: 13px;
font-weight: 500;
}
.status.success {
background: var(--theme-highlight, #00ddff);
color: var(--theme-highlight-text, #1c1b22);
}
.status.error {
background: rgba(255, 107, 107, 0.15);
border: 1px solid rgba(255, 107, 107, 0.3);
color: #ff6b6b;
}
/* Observation forms */
.obs-form {
display: flex;
flex-direction: column;
gap: 16px;
}
/* Form divider */
.form-divider {
border: none;
border-top: 1px solid rgba(128, 128, 128, 0.3);
margin: 4px 0;
}
/* Paste target */
.paste-target {
display: flex;
align-items: center;
justify-content: center;
min-height: 80px;
border: 2px dashed rgba(128, 128, 128, 0.5);
border-radius: 4px;
color: inherit;
opacity: 0.6;
cursor: pointer;
transition: border-color 0.15s, opacity 0.15s;
text-align: center;
font-size: 13px;
}
.paste-target:hover {
border-color: #0a84ff;
opacity: 1;
}
.paste-target:focus {
border-color: #30d158;
border-style: solid;
background: rgba(48, 209, 88, 0.1);
opacity: 1;
outline: none;
}
.paste-target.ready {
border-color: #0a84ff;
border-style: solid;
background: rgba(10, 132, 255, 0.1);
}
/* Drop target */
.drop-target {
display: flex;
align-items: center;
justify-content: center;
min-height: 80px;
border: 2px dashed rgba(128, 128, 128, 0.5);
border-radius: 4px;
color: inherit;
opacity: 0.6;
cursor: pointer;
transition: border-color 0.15s, opacity 0.15s;
text-align: center;
font-size: 13px;
}
.drop-target:hover,
.drop-target:focus,
.drop-target.dragover {
border-color: #0a84ff;
opacity: 1;
outline: none;
}
.drop-target.ready {
border-color: #0a84ff;
border-style: solid;
background: rgba(10, 132, 255, 0.1);
}
/* Image preview */
.image-preview {
display: flex;
justify-content: center;
padding: 8px 0;
}
.image-preview img {
max-width: 100%;
max-height: 150px;
border-radius: 4px;
object-fit: contain;
}
/* Access screen */
.access-hint {
font-size: 13px;
opacity: 0.7;
margin-bottom: 16px;
}
.observations-list {
display: flex;
flex-direction: column;
gap: 12px;
}
.loading-text {
text-align: center;
opacity: 0.6;
padding: 24px 0;
}
.observation-item {
padding: 12px;
background: rgba(128, 128, 128, 0.1);
border: 1px solid rgba(128, 128, 128, 0.2);
border-radius: 6px;
}
.observation-item.disabled {
opacity: 0.5;
}
.observation-header {
display: flex;
gap: 10px;
margin-bottom: 8px;
}
.observation-thumb {
width: 60px;
height: 60px;
border-radius: 4px;
object-fit: cover;
flex-shrink: 0;
background: rgba(128, 128, 128, 0.2);
}
.observation-info {
flex: 1;
min-width: 0;
}
.observation-name {
display: block;
font-size: 13px;
font-weight: 500;
margin-bottom: 4px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
color: #0a84ff;
text-decoration: none;
}
.observation-name:hover {
text-decoration: underline;
}
.observation-type {
font-size: 11px;
opacity: 0.6;
text-transform: capitalize;
margin-bottom: 4px;
}
.observation-detail {
font-size: 11px;
opacity: 0.7;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin-bottom: 2px;
}
.observation-detail strong {
opacity: 0.9;
}
.access-toggle {
display: flex;
gap: 4px;
}
.access-toggle button {
flex: 1;
padding: 6px 8px;
background: rgba(128, 128, 128, 0.2);
border: 1px solid rgba(128, 128, 128, 0.3);
border-radius: 4px;
color: inherit;
font-family: inherit;
font-size: 11px;
font-weight: 500;
cursor: pointer;
transition: all 0.15s;
}
.access-toggle button:hover:not(:disabled) {
background: rgba(128, 128, 128, 0.3);
}
.access-toggle button:disabled {
cursor: not-allowed;
opacity: 0.5;
}
.access-toggle button.active-none {
background: rgba(255, 179, 0, 0.25);
border-color: #ffb300;
color: #ffb300;
}
.access-toggle button.active-editor {
background: rgba(255, 179, 0, 0.25);
border-color: #ffb300;
color: #ffb300;
}
.access-toggle button.active-viewer {
background: rgba(48, 209, 88, 0.2);
border-color: #30d158;
color: #30d158;
}
.no-observations {
text-align: center;
opacity: 0.6;
padding: 24px 0;
font-size: 13px;
}