freealberta/map/app/public/css/modules/map-controls.css

339 lines
6.0 KiB
CSS

/* Map controls */
.map-controls {
position: absolute;
top: 20px;
right: 20px;
display: flex;
flex-direction: column;
gap: 10px;
z-index: 1000;
}
/* Move Controls */
.move-controls {
position: fixed;
top: 20px;
left: 50%;
transform: translateX(-50%);
background: white;
padding: 20px;
border-radius: 8px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
z-index: 12200;
min-width: 300px;
text-align: center;
}
/* Crosshair for location selection */
.crosshair {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
pointer-events: none;
z-index: 999;
}
.crosshair.hidden {
display: none;
}
.crosshair-x,
.crosshair-y {
position: absolute;
background-color: rgba(44, 90, 160, 0.8);
}
.crosshair-x {
width: 40px;
height: 2px;
left: -20px;
top: -1px;
}
.crosshair-y {
width: 2px;
height: 40px;
left: -1px;
top: -20px;
}
.crosshair-info {
position: absolute;
top: 30px;
left: 50%;
transform: translateX(-50%);
background-color: rgba(44, 62, 80, 0.9);
color: white;
padding: 5px 10px;
border-radius: var(--border-radius);
font-size: 12px;
white-space: nowrap;
}
/* Cut Selector Styles */
.cut-selector-container {
position: relative;
}
.cut-selector {
appearance: none;
-webkit-appearance: none;
-moz-appearance: none;
background-color: var(--secondary-color);
color: white;
border: none;
padding: 10px 32px 10px 16px;
border-radius: var(--border-radius);
font-size: 14px;
font-weight: 500;
cursor: pointer;
transition: var(--transition);
min-width: 150px;
max-width: 200px;
outline: none;
text-align: left;
font-family: inherit;
}
.cut-selector:hover {
background-color: #7f8c8d;
transform: translateY(-1px);
box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
.cut-selector:focus {
background-color: #7f8c8d;
box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.5);
}
/* Custom dropdown arrow */
.cut-selector-container::after {
content: '▼';
position: absolute;
right: 10px;
top: 50%;
transform: translateY(-50%);
pointer-events: none;
color: white;
font-size: 10px;
}
/* Mobile styles for cut selector */
@media (max-width: 768px) {
.cut-selector {
min-width: 120px;
max-width: 150px;
font-size: 13px;
padding: 8px 28px 8px 12px;
}
.cut-selector-container::after {
right: 8px;
font-size: 9px;
}
}
/* Multi-select cut dropdown styles - enhanced */
.cut-checkbox-container {
position: absolute;
top: 100%;
left: 0;
right: 0;
background: white;
border: 1px solid #ddd;
border-radius: 4px;
box-shadow: 0 2px 8px rgba(0,0,0,0.15);
z-index: 1001;
max-height: 300px;
overflow-y: auto;
margin-top: 2px;
display: none;
}
/* Remove the focus-within rule that auto-shows the dropdown */
/* This was causing the dropdown to show automatically on focus */
.cut-checkbox-header {
padding: 8px;
border-bottom: 1px solid #eee;
display: flex;
gap: 8px;
justify-content: space-between;
}
.cut-checkbox-header .btn {
font-size: 12px;
padding: 4px 8px;
}
.cut-checkbox-list {
padding: 4px;
}
.cut-checkbox-item {
display: flex;
align-items: center;
padding: 6px 8px;
cursor: pointer;
transition: background-color 0.2s;
user-select: none;
}
.cut-checkbox-item:hover {
background-color: #f5f5f5;
}
.cut-checkbox-item * {
pointer-events: none;
}
.cut-checkbox-item input[type="checkbox"] {
pointer-events: auto;
margin-right: 8px;
cursor: pointer;
}
.cut-color-box {
width: 16px;
height: 16px;
border: 1px solid #ccc;
border-radius: 2px;
margin-right: 8px;
flex-shrink: 0;
}
.cut-checkbox-item .cut-name {
flex: 1;
font-size: 14px;
}
.cut-checkbox-item .badge {
margin-left: 8px;
font-size: 11px;
padding: 2px 6px;
border-radius: 3px;
background: #28a745;
color: white;
}
/* Cut legend styles */
.cut-legend {
position: absolute;
bottom: 20px;
left: 20px;
background: white;
border: 1px solid #ddd;
border-radius: 4px;
box-shadow: 0 2px 8px rgba(0,0,0,0.15);
min-width: 200px;
max-width: 300px;
z-index: 1000;
display: none;
}
.cut-legend.visible {
display: block;
}
.cut-legend-content {
padding: 12px;
}
.legend-header h3 {
margin: 0 0 10px 0;
font-size: 16px;
color: #333;
}
/* Updated legend styles for multiple cuts */
.legend-cuts-list {
max-height: 200px;
overflow-y: auto;
}
.legend-cut-item {
display: flex;
align-items: center;
padding: 6px 0;
border-bottom: 1px solid #eee;
}
.legend-cut-item:last-child {
border-bottom: none;
}
.legend-cut-item .cut-color-box {
width: 20px;
height: 20px;
margin-right: 10px;
}
.legend-cut-item .cut-name {
flex: 1;
font-size: 14px;
}
.btn-remove-cut {
background: none;
border: none;
color: #dc3545;
font-size: 20px;
cursor: pointer;
padding: 0 5px;
opacity: 0.7;
transition: opacity 0.2s;
}
.btn-remove-cut:hover {
opacity: 1;
}
/* Mobile overlay styles */
.mobile-overlay-list {
padding: 10px 0;
}
.mobile-overlay-item {
display: flex;
align-items: center;
padding: 12px 15px;
border-bottom: 1px solid #eee;
}
.mobile-overlay-item:last-child {
border-bottom: none;
}
.mobile-overlay-item input[type="checkbox"] {
margin-right: 12px;
transform: scale(1.2);
}
.overlay-actions {
padding: 15px;
border-bottom: 1px solid #eee;
display: flex;
gap: 10px;
justify-content: space-between;
}
/* Mobile responsive adjustments for multi-select */
@media (max-width: 768px) {
.cut-checkbox-container {
position: fixed;
top: 50%;
left: 10px;
right: 10px;
transform: translateY(-50%);
max-height: 70vh;
}
.cut-legend {
left: 10px;
right: 10px;
bottom: 80px;
max-width: none;
}
}