Files
Pigmento/style.css
2026-04-03 13:57:11 +02:00

316 lines
6.3 KiB
CSS

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: system-ui, sans-serif;
background: #f5f5f5;
color: #222;
min-height: 100vh;
}
header {
background: #fff;
border-bottom: 1px solid #ddd;
padding: 1rem 1.5rem;
position: sticky;
top: 0;
z-index: 10;
}
header h1 { font-size: 2rem; margin-bottom: 0; }
nav { display: flex; gap: 0.5rem; }
.tab-btn {
padding: 0.4rem 1rem;
border: 1px solid #ccc;
border-radius: 6px;
background: #fff;
cursor: pointer;
font-size: 0.9rem;
}
.tab-btn.active {
background: #222;
color: #fff;
border-color: #222;
}
main { padding: 1.5rem; max-width: 900px; margin: 0 auto; }
.tab-content { display: none; }
.tab-content.active { display: block; }
/* --- Shared component classes (used across tabs) --- */
.color-preview {
width: 100%;
height: 80px;
border-radius: 8px;
border: 1px solid #ddd;
margin-bottom: 0.75rem;
}
.color-codes {
display: flex;
gap: 1rem;
flex-wrap: wrap;
margin-bottom: 1rem;
}
.color-code-group { display: flex; flex-direction: column; gap: 0.25rem; }
.color-code-group label { font-size: 0.75rem; color: #666; text-transform: uppercase; }
.color-code-group input {
padding: 0.4rem 0.6rem;
border: 1px solid #ccc;
border-radius: 6px;
font-family: monospace;
font-size: 0.9rem;
width: 140px;
}
button.action-btn {
padding: 0.4rem 0.9rem;
border: 1px solid #ccc;
border-radius: 6px;
background: #fff;
cursor: pointer;
font-size: 0.85rem;
}
button.action-btn:hover { background: #f0f0f0; }
.swatch {
display: inline-block;
width: 40px;
height: 40px;
border-radius: 6px;
border: 1px solid #ddd;
cursor: pointer;
vertical-align: middle;
}
#picker-dropzone {
border: 2px dashed #ccc;
border-radius: 8px;
padding: 2rem;
text-align: center;
margin-bottom: 1rem;
background: #fafafa;
}
#picker-dropzone.drag-over {
border-color: #222;
background: #f0f0f0;
}
#picker-dropzone p { margin-bottom: 0.75rem; color: #666; font-size: 0.9rem; }
/* --- Harmonien-Tab --- */
.subtitle { font-size: 0.85rem; color: #666; margin-bottom: 0.5rem; }
.harmony-header { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.5rem; }
.harmony-row h3 { font-size: 0.9rem; margin-bottom: 0; }
.harmony-swatches { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: flex-start; }
.harmony-info { position: relative; display: inline-flex; align-items: center; }
.harmony-info-icon {
font-size: 0.75rem;
color: #aaa;
cursor: default;
user-select: none;
line-height: 1;
}
.harmony-tooltip {
display: none;
position: absolute;
left: 1.4rem;
top: 50%;
transform: translateY(-50%);
background: #333;
color: #fff;
font-size: 0.78rem;
padding: 0.4rem 0.65rem;
border-radius: 6px;
white-space: nowrap;
z-index: 100;
pointer-events: none;
max-width: 320px;
white-space: normal;
width: max-content;
max-width: 280px;
}
.harmony-info:hover .harmony-tooltip { display: block; }
.harmony-swatch {
display: flex;
flex-direction: column;
align-items: center;
gap: 0.25rem;
}
.harmony-swatch .swatch { width: 56px; height: 56px; }
.harmony-swatch span { font-size: 0.75rem; font-family: monospace; }
/* --- Utility classes --- */
.swatch-cell {
display: inline-flex;
flex-direction: column;
align-items: center;
gap: 0.25rem;
margin: 0.25rem;
}
.harmony-btn-row {
display: flex;
gap: 0.25rem;
}
.btn-row {
display: flex;
gap: 0.5rem;
}
/* --- Modal --- */
.modal-overlay {
position: fixed;
inset: 0;
background: rgba(0,0,0,0.45);
z-index: 200;
display: flex;
align-items: center;
justify-content: center;
padding: 1rem;
}
.modal {
background: #fff;
border-radius: 12px;
padding: 1.5rem;
width: 100%;
max-width: 460px;
max-height: 90vh;
overflow-y: auto;
box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}
.modal-field {
display: flex;
flex-direction: column;
gap: 0.3rem;
margin-bottom: 0.75rem;
}
.modal-field label { font-size: 0.75rem; color: #666; text-transform: uppercase; }
.modal-field input {
padding: 0.4rem 0.6rem;
border: 1px solid #ccc;
border-radius: 6px;
font-size: 0.9rem;
}
.schema-farben-preview {
display: flex;
gap: 0.5rem;
flex-wrap: wrap;
min-height: 20px;
margin-bottom: 1rem;
}
.schema-dropzone {
border: 2px dashed #ccc;
border-radius: 8px;
padding: 1rem;
text-align: center;
background: #fafafa;
font-size: 0.85rem;
color: #666;
}
.schema-dropzone p { margin-bottom: 0.5rem; }
/* Vorschaubild im Modal */
.schema-bild-preview {
width: 56px;
height: 56px;
border-radius: 8px;
border: 2px dashed #ddd;
background: #f5f5f5;
background-size: cover;
background-position: center;
flex-shrink: 0;
}
.schema-bild-preview.hat-bild { border-style: solid; border-color: #ccc; }
/* --- Schema-Hierarchie --- */
.schema-card {
border: 1px solid #ddd;
border-radius: 8px;
padding: 1rem;
margin-bottom: 0.75rem;
background: #fff;
transition: border-color 0.15s, box-shadow 0.15s;
}
.schema-card-nested {
background: #fafafa;
}
.schema-card.schema-drag-over {
border-color: #4a90d9;
box-shadow: 0 0 0 3px rgba(74,144,217,0.2);
}
.schema-card.schema-dragging { opacity: 0.45; }
.schema-children {
margin-top: 0.75rem;
padding-left: 1rem;
border-left: 3px solid #f0f0f0;
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.schema-children .schema-card { margin-bottom: 0; }
.schema-root-dropzone {
border: 2px dashed #ddd;
border-radius: 8px;
padding: 0.75rem;
text-align: center;
font-size: 0.8rem;
color: #bbb;
margin-top: 0.5rem;
transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.schema-root-dropzone.active {
border-color: #4a90d9;
background: #f0f7ff;
color: #4a90d9;
}
/* Thumbnail in der Sammlung */
.schema-thumb {
width: 40px;
height: 40px;
border-radius: 6px;
border: 1px solid #ddd;
background-size: cover;
background-position: center;
flex-shrink: 0;
}
/* --- Finale Styles --- */
h2 { font-size: 1.1rem; margin-bottom: 1rem; }
h3 { font-size: 0.95rem; margin-bottom: 0.5rem; }
.tab-content { padding-top: 0.5rem; }
.color-preview { transition: background 0.15s; }
.action-btn:active { transform: scale(0.97); }
@media (max-width: 600px) {
nav { flex-wrap: wrap; }
.color-codes { flex-direction: column; }
.color-code-group input { width: 100%; }
}