ccmdi_obsidian-map-plus/styles.css
2025-11-22 18:15:51 -05:00

632 lines
No EOL
13 KiB
CSS

.bases-view:has(.bases-map-container) {
padding: 0px;
}
.bases-map-container {
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
}
.bases-map {
width: 100%;
height: var(--bases-map-embed-height);
overflow: hidden;
position: relative;
}
.map-view-container {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
}
.map-search-container {
padding: 10px;
background: var(--background-secondary);
border-bottom: 1px solid var(--background-modifier-border);
}
.map-canvas-container {
flex: 1;
position: relative;
overflow: hidden;
}
.map-empty-state {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
color: var(--text-muted);
font-style: italic;
}
.map-loading-overlay {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: var(--background-primary);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
transition: opacity 0.3s ease;
}
.map-loading-overlay.fade-out {
opacity: 0;
}
.map-tooltip {
position: absolute;
left: var(--tooltip-x, 0);
top: var(--tooltip-y, 0);
padding: 10px 14px;
background: var(--background-primary);
color: var(--text-normal);
border-radius: 6px;
pointer-events: none;
opacity: 0;
z-index: 1000;
font-size: 13px;
box-shadow: 0 2px 12px rgba(0,0,0,0.4);
width: max-content;
max-width: 400px;
transition: opacity 0.15s ease;
.map-tooltip-property {
display: grid;
grid-template-columns: auto 1fr;
gap: 8px;
margin-top: 4px;
align-items: baseline;
}
.map-tooltip-tags {
margin-top: 8px;
display: flex;
gap: 4px;
flex-wrap: wrap;
}
.map-tooltip-property-label {
color: var(--text-muted);
font-size: 12px;
white-space: nowrap;
}
.map-tooltip-property-value {
font-size: 12px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
min-width: 0;
}
.map-tooltip-cover-image {
width: 100%;
max-height: 150px;
object-fit: cover;
border-radius: 4px;
margin-bottom: 8px;
display: block;
}
.map-tooltip-title {
font-weight: 600;
font-size: 14px;
margin-bottom: 2px;
}
.map-tooltip-property-container {
margin-top: 8px;
}
}
.map-tooltip.visible {
opacity: 1;
}
.map-canvas {
width: 100%;
height: 100%;
display: block;
}
.map-settings-container {
.setting-item-heading + .setting-item-description {
padding-top: 0px;
margin-top: 0px;
}
.delete-btn {
width: 24px;
height: 24px;
border: none;
color: var(--text-muted);
cursor: pointer;
font-size: 18px;
display: flex;
align-items: center;
justify-content: center;
line-height: 1;
padding: 0;
}
.delete-btn:hover {
color: var(--text-normal);
}
.spacer {
flex: 1;
}
.draggable-setting {
display: flex;
align-items: center;
padding: 12px;
margin: 4px 0;
background: var(--background-secondary);
border-radius: 6px;
cursor: grab;
border: 1px solid var(--background-modifier-border);
transition: opacity 0.2s ease, background 0.15s ease;
}
.draggable-setting.dragging {
opacity: 0.5;
}
.draggable-setting.drag-over {
background: var(--background-modifier-hover);
}
.drag-handle {
margin-right: 12px;
color: var(--text-muted);
font-size: 16px;
cursor: grab;
}
.tag-label {
min-width: 120px;
margin-right: 12px;
font-weight: 500;
}
.color-input {
width: 40px;
height: 30px;
border: none;
border-radius: 4px;
margin-right: 12px;
cursor: pointer;
padding: 0;
}
.color-input::-webkit-color-swatch-wrapper {
padding: 0;
height: 100%;
}
.color-input::-webkit-color-swatch {
border: none;
border-radius: 4px;
height: 100%;
}
.icon-btn {
width: 40px;
height: 30px;
min-width: 40px;
min-height: 30px;
border: 1px solid var(--background-modifier-border);
border-radius: 4px;
margin-right: 12px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
background: var(--background-primary);
}
.tag-customizations-container {
padding: 10px;
margin-bottom: 20px;
& .map-empty-state {
color: var(--text-muted);
font-style: italic;
text-align: center;
padding: 20px;
}
}
}
.add-tag-modal {
.color-icon-container {
display: flex;
gap: 10px;
align-items: center;
margin-bottom: 20px;
}
.color-input {
width: 40px;
height: 40px;
border: none;
border-radius: 4px;
cursor: pointer;
padding: 0;
}
.color-input::-webkit-color-swatch-wrapper {
padding: 0;
height: 100%;
}
.color-input::-webkit-color-swatch {
border: none;
border-radius: 4px;
height: 100%;
}
.icon-container {
display: flex;
gap: 8px;
align-items: center;
flex: 1;
}
.icon-preview {
width: 40px;
height: 40px;
min-width: 40px;
display: flex;
align-items: center;
justify-content: center;
border: 1px solid var(--background-modifier-border);
border-radius: 4px;
}
.icon-btn {
flex: 1;
height: 40px;
}
.button-container {
display: flex;
gap: 10px;
justify-content: flex-end;
}
}
.icon-picker-modal {
.search-container {
margin-bottom: 10px;
input {
width: 100%;
}
}
.icons-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
grid-auto-rows: min-content;
align-content: start;
gap: 8px;
height: 400px;
overflow-y: auto;
padding: 10px;
border: 1px solid var(--background-modifier-border);
border-radius: 4px;
}
.icon-picker-item {
width: 50px;
height: 50px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 4px;
cursor: pointer;
background: var(--background-primary);
&.selected {
border: 2px solid var(--interactive-accent);
}
&:hover {
background: var(--background-modifier-hover);
}
border: 1px solid var(--background-modifier-border);
}
.button-container {
display: flex;
gap: 10px;
justify-content: flex-end;
margin-top: 10px;
}
}
.map-container {
width: 100%;
height: var(--bases-map-height);
position: relative;
}
.bases-timeline-slider {
position: absolute;
top: 6px;
right: 6px;
width: 320px;
padding: 12px 16px 8px 16px;
background: var(--background-primary);
border: 1px solid var(--background-modifier-border);
border-radius: 8px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
z-index: 10;
display: flex;
flex-direction: column;
gap: 0;
transition: padding-bottom 0.3s ease;
}
.bases-timeline-slider:has(.timeline-playback-controls.expanded) {
padding-bottom: 12px;
}
.timeline-input-container {
display: flex;
gap: 8px;
margin-bottom: 16px;
}
.timeline-date-input {
flex: 1;
padding: 6px 8px;
border: 1px solid var(--background-modifier-border);
border-radius: 4px;
background: var(--background-secondary);
color: var(--text-normal);
font-size: 13px;
}
.timeline-granularity-select {
flex: 1;
padding: 6px 8px;
border: 1px solid var(--background-modifier-border);
border-radius: 4px;
background: var(--background-secondary);
color: var(--text-normal);
font-size: 13px;
cursor: pointer;
}
.timeline-date-display {
font-size: 12px;
color: var(--text-muted);
font-weight: 500;
text-align: center;
}
.timeline-slider {
width: 100% !important;
height: 6px;
margin: 0 0 8px 0 !important;
padding: 0 !important;
border-radius: 3px;
background: var(--background-modifier-border);
outline: none;
-webkit-appearance: none;
box-sizing: border-box;
}
.timeline-slider::-webkit-slider-thumb {
-webkit-appearance: none;
appearance: none;
width: 16px;
height: 16px;
border-radius: 50%;
background: var(--interactive-accent);
cursor: pointer;
transition: transform 0.15s ease;
}
.timeline-slider::-webkit-slider-thumb:hover {
transform: scale(1.2);
}
.timeline-slider::-moz-range-thumb {
width: 16px;
height: 16px;
border-radius: 50%;
background: var(--interactive-accent);
cursor: pointer;
border: none;
transition: transform 0.15s ease;
}
.timeline-slider::-moz-range-thumb:hover {
transform: scale(1.2);
}
.timeline-controls-toggle {
display: flex;
justify-content: center;
}
.timeline-toggle-button {
width: 100%;
height: 14px;
padding: 0;
margin: 0;
border: none;
background: transparent !important;
color: var(--text-faint);
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: color 0.15s ease;
outline: none;
box-shadow: none !important;
}
.timeline-toggle-button:hover {
color: var(--text-muted);
background: transparent !important;
box-shadow: none !important;
}
.timeline-toggle-button:active {
background: transparent !important;
box-shadow: none !important;
}
.timeline-toggle-button svg {
width: 13px;
height: 13px;
transition: transform 0.3s ease;
}
.timeline-toggle-button.expanded svg {
transform: rotate(180deg);
}
.timeline-playback-controls {
display: flex;
gap: 8px;
align-items: center;
max-height: 0;
overflow: hidden;
opacity: 0;
padding: 0;
margin: 0;
transition: max-height 0.3s ease, opacity 0.3s ease, margin-top 0.3s ease, padding-top 0.3s ease;
}
.timeline-playback-controls.expanded {
max-height: 100px;
opacity: 1;
margin-top: 8px;
}
.timeline-play-button {
width: 36px;
height: 28px;
padding: 0;
border: 1px solid var(--background-modifier-border);
border-radius: 4px;
background: var(--background-secondary);
color: var(--text-normal);
font-size: 14px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: background 0.15s ease;
}
.timeline-play-button:hover {
background: var(--background-modifier-hover);
}
.timeline-speed-select {
flex: 1;
padding: 6px 8px;
border: 1px solid var(--background-modifier-border);
border-radius: 4px;
background: var(--background-secondary);
color: var(--text-normal);
font-size: 13px;
cursor: pointer;
}
.map-draggable {
cursor: move;
& .dragging {
position: absolute;
z-index: 1000;
}
& .move {
bottom: auto;
right: auto;
}
}
/* should be specific enough */
.input-row:has(input[placeholder="[[minLat, minLng], [maxLat, maxLng]]"]) .input-row-label::after {
content: " (local images only)";
color: var(--text-muted);
font-style: italic;
font-size: 0.9em;
}
/* Map search box */
.bases-map-search-container {
position: absolute;
top: 8px;
left: 8px;
width: 280px;
background: var(--background-primary);
border: 1px solid var(--background-modifier-border);
border-radius: 8px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
z-index: 10;
padding: 8px;
}
.map-search-input {
width: 100%;
padding: 8px 12px;
border: 1px solid var(--background-modifier-border);
border-radius: 6px;
background: var(--background-secondary);
color: var(--text-normal);
font-size: 13px;
}
.map-search-input:focus {
outline: none;
border-color: var(--interactive-accent);
}
.map-search-results {
margin-top: 4px;
max-height: 200px;
overflow-y: auto;
border-radius: 6px;
background: var(--background-secondary);
opacity: 0;
transform: translateY(-8px);
pointer-events: none;
transition: opacity 0.2s ease, transform 0.2s ease;
}
.map-search-results.visible {
opacity: 1;
transform: translateY(0);
pointer-events: all;
}
.map-search-result-item {
padding: 8px 12px;
cursor: pointer;
font-size: 12px;
color: var(--text-normal);
border-bottom: 1px solid var(--background-modifier-border);
}
.map-search-result-item:last-child {
border-bottom: none;
}
.map-search-result-item:hover {
background: var(--background-modifier-hover);
}