Pushing Cuts to repo. Still bugs however decently stable.

This commit is contained in:
2025-08-06 13:47:51 -06:00
parent 677fcf8f4e
commit 81d132afe3
35 changed files with 7155 additions and 67 deletions

View File

@@ -2395,3 +2395,147 @@
padding: 16px;
}
}
/* Cuts Section Styles */
.cuts-container {
display: flex;
flex-direction: column;
gap: 20px;
}
.cuts-map-section {
position: relative;
height: 500px;
background: #f5f5f5;
border-radius: 8px;
overflow: hidden;
border: 1px solid #ddd;
}
#cuts-map {
width: 100%;
height: 100%;
position: relative;
}
.cuts-form-section,
.cuts-list-section {
margin-top: 20px;
}
.cuts-filters {
display: grid;
grid-template-columns: 1fr 200px;
gap: 10px;
margin-bottom: 15px;
}
.cuts-filters input,
.cuts-filters select {
padding: 8px 12px;
border: 1px solid #ddd;
border-radius: 4px;
}
/* Button styles to match admin panel theme */
.btn-sm {
padding: 6px 12px;
font-size: 14px;
}
.btn-primary {
background-color: #007bff;
color: white;
border: 1px solid #007bff;
}
.btn-primary:hover:not(:disabled) {
background-color: #0056b3;
border-color: #0056b3;
}
.btn-secondary {
background-color: #6c757d;
color: white;
border: 1px solid #6c757d;
}
.btn-secondary:hover:not(:disabled) {
background-color: #545b62;
border-color: #545b62;
}
.btn-danger {
background-color: #dc3545;
color: white;
border: 1px solid #dc3545;
}
.btn-danger:hover:not(:disabled) {
background-color: #c82333;
border-color: #c82333;
}
.btn-success {
background-color: #28a745;
color: white;
border: 1px solid #28a745;
}
.btn-success:hover:not(:disabled) {
background-color: #218838;
border-color: #218838;
}
/* Responsive layout for cuts */
@media (min-width: 1200px) {
.cuts-container {
display: grid;
grid-template-columns: 1fr;
gap: 20px;
}
.cuts-form-section,
.cuts-list-section {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 20px;
margin-top: 0;
}
.cuts-form-section > *,
.cuts-list-section > * {
grid-column: span 1;
}
}
@media (max-width: 768px) {
.cuts-map-section {
height: 400px;
}
.cuts-filters {
grid-template-columns: 1fr;
}
}
/* Disabled form state */
.cut-form.disabled {
opacity: 0.7;
pointer-events: none;
}
.cut-form.disabled input:not(#start-drawing-btn):not(#reset-form-btn):not(#cancel-edit-btn),
.cut-form.disabled textarea,
.cut-form.disabled select {
background-color: #f5f5f5;
cursor: not-allowed;
}
.cut-form.disabled input:not(#start-drawing-btn):not(#reset-form-btn):not(#cancel-edit-btn):focus,
.cut-form.disabled textarea:focus,
.cut-form.disabled select:focus {
outline: none;
border-color: #ddd;
box-shadow: none;
}

View File

@@ -0,0 +1,996 @@
/* Cut Drawing Styles */
.cut-vertex-marker {
background: transparent;
border: none;
}
/* Enhanced vertex styling */
.cut-vertex-marker .vertex-point {
width: 12px;
height: 12px;
background: #3388ff;
border: 2px solid white;
border-radius: 50%;
box-shadow: 0 2px 4px rgba(0,0,0,0.3);
cursor: pointer;
transition: all 0.2s;
}
.cut-vertex-marker .vertex-point:hover {
background: #2c5aa0;
transform: scale(1.2);
}
/* First vertex special styling */
.cut-vertex-marker .vertex-point.first {
background: #28a745;
width: 16px;
height: 16px;
margin: -2px;
position: relative;
}
.cut-vertex-marker .vertex-point.first::after {
content: '';
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 24px;
height: 24px;
border: 2px solid #28a745;
border-radius: 50%;
animation: pulse-ring 1.5s ease-out infinite;
}
@keyframes pulse-ring {
0% {
opacity: 0.8;
transform: translate(-50%, -50%) scale(0.5);
}
100% {
opacity: 0;
transform: translate(-50%, -50%) scale(1.5);
}
}
/* Cut Drawing Toolbar - Improved compact layout */
.cut-drawing-toolbar {
position: absolute;
bottom: 20px;
left: 50%;
transform: translateX(-50%);
background: white;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0,0,0,0.2);
padding: 12px;
z-index: 1000;
display: none;
min-width: 400px;
}
.cut-drawing-toolbar.active {
display: block;
}
.cut-drawing-toolbar .toolbar-content {
display: flex;
align-items: center;
gap: 15px;
flex-wrap: wrap;
}
.cut-drawing-toolbar .vertex-count {
font-size: 14px;
color: #666;
display: flex;
align-items: center;
gap: 5px;
font-weight: 500;
white-space: nowrap;
}
.cut-drawing-toolbar .vertex-count::before {
content: "📍";
font-size: 16px;
}
/* Style controls in toolbar */
.cut-drawing-toolbar .style-controls {
display: flex;
align-items: center;
gap: 10px;
padding: 0 10px;
border-left: 1px solid #ddd;
border-right: 1px solid #ddd;
}
.cut-drawing-toolbar .color-control {
display: flex;
align-items: center;
gap: 5px;
}
.cut-drawing-toolbar .color-control label {
font-size: 12px;
color: #666;
font-weight: 500;
}
.cut-drawing-toolbar input[type="color"] {
width: 32px;
height: 24px;
border: 1px solid #ddd;
border-radius: 4px;
cursor: pointer;
padding: 0;
}
.cut-drawing-toolbar .opacity-control {
display: flex;
align-items: center;
gap: 5px;
}
.cut-drawing-toolbar .opacity-control label {
font-size: 12px;
color: #666;
font-weight: 500;
}
.cut-drawing-toolbar input[type="range"] {
width: 80px;
height: 4px;
}
.cut-drawing-toolbar .opacity-value {
font-size: 12px;
color: #666;
font-weight: 500;
min-width: 30px;
}
.cut-drawing-toolbar .toolbar-buttons {
display: flex;
gap: 5px;
}
.cut-drawing-toolbar button {
padding: 6px 12px;
border: 1px solid #ddd;
background: white;
border-radius: 4px;
cursor: pointer;
font-size: 13px;
transition: all 0.2s;
white-space: nowrap;
}
.cut-drawing-toolbar button:hover:not(:disabled) {
background: #f5f5f5;
transform: translateY(-1px);
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.cut-drawing-toolbar button:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.cut-drawing-toolbar button.primary {
background: #3388ff;
color: white;
border-color: #3388ff;
font-weight: 500;
}
.cut-drawing-toolbar button.primary:hover:not(:disabled) {
background: #2c5aa0;
border-color: #2c5aa0;
}
.cut-drawing-toolbar button.danger {
background: #dc3545;
color: white;
border-color: #dc3545;
}
.cut-drawing-toolbar button.danger:hover:not(:disabled) {
background: #c82333;
border-color: #c82333;
}
.cut-drawing-toolbar button.secondary {
background: #6c757d;
color: white;
border-color: #6c757d;
}
.cut-drawing-toolbar button.secondary:hover:not(:disabled) {
background: #5a6268;
border-color: #5a6268;
}
/* Leaflet tooltip styling for close polygon hint */
.leaflet-tooltip {
background: #333;
color: white;
border: none;
font-size: 12px;
padding: 4px 8px;
border-radius: 4px;
}
.leaflet-tooltip-top:before {
border-top-color: #333;
}
/* Responsive adjustments for mobile */
@media (max-width: 768px) {
.cut-drawing-toolbar {
bottom: 10px;
left: 10px;
right: 10px;
transform: none;
padding: 8px;
}
.cut-drawing-toolbar .toolbar-content {
flex-wrap: wrap;
gap: 5px;
}
.cut-drawing-toolbar .vertex-count {
width: 100%;
margin-bottom: 5px;
margin-right: 0;
justify-content: center;
}
.cut-drawing-toolbar .toolbar-buttons {
width: 100%;
justify-content: space-around;
}
.cut-drawing-toolbar button {
padding: 6px 10px;
font-size: 12px;
flex: 1;
}
}
/* Leaflet tooltip styling for close polygon hint */
.leaflet-tooltip {
background: #333;
color: white;
border: none;
font-size: 12px;
padding: 4px 8px;
border-radius: 4px;
}
.leaflet-tooltip-top:before {
border-top-color: #333;
}
/* Responsive adjustments for mobile */
@media (max-width: 768px) {
.cut-drawing-toolbar {
bottom: 10px;
left: 10px;
right: 10px;
transform: none;
padding: 8px;
}
.cut-drawing-toolbar .toolbar-content {
flex-wrap: wrap;
gap: 5px;
}
.cut-drawing-toolbar .vertex-count {
width: 100%;
margin-bottom: 5px;
margin-right: 0;
justify-content: center;
}
.cut-drawing-toolbar .toolbar-buttons {
width: 100%;
justify-content: space-around;
}
.cut-drawing-toolbar button {
padding: 6px 10px;
font-size: 12px;
flex: 1;
}
}
.cut-drawing-toolbar button.secondary:hover:not(:disabled) {
background: #5a6268;
border-color: #545b62;
}
/* Cut Management Panel */
.cuts-management-panel {
background: white;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
margin-bottom: 20px;
}
.cuts-management-panel .panel-header {
padding: 15px 20px;
border-bottom: 1px solid #eee;
display: flex;
justify-content: between;
align-items: center;
}
.cuts-management-panel .panel-title {
font-size: 18px;
font-weight: bold;
color: #333;
margin: 0;
}
.cuts-management-panel .panel-actions {
display: flex;
gap: 10px;
}
.cuts-management-panel .panel-content {
padding: 20px;
}
/* Cut Form */
.cut-form {
display: grid;
gap: 15px;
max-width: 500px;
}
.cut-form .form-group {
display: flex;
flex-direction: column;
}
.cut-form label {
font-weight: bold;
margin-bottom: 5px;
color: #333;
}
.cut-form input,
.cut-form textarea,
.cut-form select {
padding: 8px 12px;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 14px;
}
.cut-form textarea {
resize: vertical;
min-height: 80px;
}
.cut-form .color-opacity-group {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 15px;
}
.cut-form .color-input-group {
display: flex;
align-items: center;
gap: 10px;
}
.cut-form input[type="color"] {
width: 40px;
height: 40px;
border: 1px solid #ddd;
border-radius: 4px;
cursor: pointer;
}
.cut-form .opacity-input-group {
display: flex;
flex-direction: column;
}
.cut-form input[type="range"] {
margin-top: 5px;
}
.cut-form .opacity-value {
font-size: 12px;
color: #666;
text-align: center;
margin-top: 2px;
}
.cut-form .checkbox-group {
display: flex;
align-items: center;
gap: 8px;
}
.cut-form .checkbox-group input[type="checkbox"] {
width: auto;
}
.cut-form .form-actions {
display: flex;
gap: 10px;
justify-content: flex-end;
margin-top: 20px;
}
/* Cut List */
.cuts-list {
display: grid;
gap: 10px;
}
.cut-item {
border: 1px solid #ddd;
border-radius: 6px;
padding: 12px;
background: white;
transition: border-color 0.2s;
}
.cut-item:hover {
border-color: #3388ff;
}
.cut-item.active {
border-color: #3388ff;
background: #f8f9ff;
}
.cut-item-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 8px;
}
.cut-item-name {
font-weight: bold;
color: #333;
}
.cut-item-category {
font-size: 12px;
padding: 2px 8px;
border-radius: 12px;
background: #f0f0f0;
color: #666;
}
.cut-item-category.ward { background: #e8f5e8; color: #4CAF50; }
.cut-item-category.neighborhood { background: #fff3e0; color: #FF9800; }
.cut-item-category.district { background: #f3e5f5; color: #9C27B0; }
.cut-item-category.custom { background: #e3f2fd; color: #2196F3; }
.cut-item-description {
font-size: 13px;
color: #666;
margin-bottom: 8px;
line-height: 1.4;
}
.cut-item-meta {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 12px;
color: #999;
}
.cut-item-badges {
display: flex;
gap: 5px;
}
.cut-item-badge {
padding: 2px 6px;
border-radius: 8px;
font-size: 11px;
font-weight: bold;
text-transform: uppercase;
}
.cut-item-badge.public {
background: #e8f5e8;
color: #4CAF50;
}
.cut-item-badge.private {
background: #ffebee;
color: #f44336;
}
.cut-item-badge.official {
background: #e3f2fd;
color: #2196F3;
}
.cut-item-actions {
display: flex;
gap: 5px;
margin-top: 10px;
}
.cut-item-actions button {
padding: 4px 8px;
border: 1px solid #ddd;
background: white;
border-radius: 3px;
cursor: pointer;
font-size: 11px;
transition: background-color 0.2s;
}
.cut-item-actions button:hover {
background: #f5f5f5;
}
.cut-item-actions button.primary {
background: #3388ff;
color: white;
border-color: #3388ff;
}
.cut-item-actions button.danger {
background: #dc3545;
color: white;
border-color: #dc3545;
}
/* Map Cut Controls */
.map-cut-controls {
position: absolute;
top: 60px;
right: 10px;
background: white;
border-radius: 6px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
overflow: hidden;
z-index: 1000;
min-width: 200px;
}
.map-cut-controls .control-header {
padding: 10px 12px;
background: #f8f9fa;
border-bottom: 1px solid #eee;
font-weight: bold;
font-size: 13px;
color: #333;
}
.map-cut-controls .control-content {
padding: 8px;
}
.map-cut-controls select {
width: 100%;
padding: 6px 8px;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 13px;
background: white;
}
.map-cut-controls .cut-toggle {
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 8px;
padding: 4px 0;
}
.map-cut-controls .toggle-label {
font-size: 12px;
color: #666;
}
.map-cut-controls .toggle-switch {
position: relative;
width: 40px;
height: 20px;
background: #ddd;
border-radius: 10px;
cursor: pointer;
transition: background-color 0.3s;
}
.map-cut-controls .toggle-switch.active {
background: #3388ff;
}
.map-cut-controls .toggle-switch::after {
content: '';
position: absolute;
top: 2px;
left: 2px;
width: 16px;
height: 16px;
background: white;
border-radius: 50%;
transition: transform 0.3s;
}
.map-cut-controls .toggle-switch.active::after {
transform: translateX(20px);
}
/* Cut Legend */
.cut-legend {
position: absolute;
bottom: 20px;
right: 10px;
background: white;
border-radius: 6px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
max-width: 250px;
z-index: 1000;
opacity: 0;
transform: translateY(10px);
transition: all 0.3s ease;
}
.cut-legend.visible {
opacity: 1;
transform: translateY(0);
}
.cut-legend .legend-header {
padding: 8px 12px;
background: #f8f9fa;
border-bottom: 1px solid #eee;
cursor: pointer;
display: flex;
justify-content: space-between;
align-items: center;
}
.cut-legend .legend-title {
font-weight: bold;
font-size: 13px;
color: #333;
}
.cut-legend .legend-toggle {
font-size: 12px;
color: #666;
}
.cut-legend .legend-content {
padding: 10px 12px;
display: none;
}
.cut-legend .legend-content.expanded {
display: block;
}
.cut-legend .legend-item {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 6px;
}
.cut-legend .legend-item:last-child {
margin-bottom: 0;
}
.cut-legend .legend-color {
width: 16px;
height: 16px;
border-radius: 3px;
border: 1px solid #ddd;
}
.cut-legend .legend-info {
flex: 1;
}
.cut-legend .legend-name {
font-size: 12px;
font-weight: bold;
color: #333;
line-height: 1.2;
}
.cut-legend .legend-description {
font-size: 11px;
color: #666;
line-height: 1.2;
}
/* Additional styles for the cuts map section */
.cuts-map-section {
position: relative;
height: 500px;
background: #f5f5f5;
border-radius: 8px;
overflow: hidden;
margin-bottom: 20px;
}
#cuts-map {
width: 100%;
height: 100%;
}
/* Ensure proper stacking of map elements */
.cuts-map-section .leaflet-control-container {
z-index: 800;
}
.cuts-map-section .leaflet-pane {
z-index: 400;
}
/* Responsive Design */
@media (max-width: 768px) {
.cut-drawing-toolbar {
bottom: 10px;
left: 10px;
right: 10px;
transform: none;
min-width: auto;
padding: 10px;
}
.cut-drawing-toolbar .toolbar-content {
flex-direction: column;
gap: 10px;
}
.cut-drawing-toolbar .vertex-count {
font-size: 12px;
margin-bottom: 0;
padding: 6px;
text-align: center;
}
.cut-drawing-toolbar .style-controls {
padding: 8px 0;
border-left: none;
border-right: none;
border-top: 1px solid #ddd;
border-bottom: 1px solid #ddd;
justify-content: center;
gap: 15px;
}
.cut-drawing-toolbar .toolbar-buttons {
flex-wrap: wrap;
gap: 5px;
justify-content: center;
}
.cut-drawing-toolbar button {
padding: 8px 12px;
font-size: 12px;
min-width: auto;
flex: 1 1 45%;
}
.cuts-map-section {
height: 400px;
}
}
/* Animation for cut display */
@keyframes cutFadeIn {
from {
opacity: 0;
transform: scale(0.95);
}
to {
opacity: 1;
transform: scale(1);
}
}
.leaflet-overlay-pane .cut-layer {
animation: cutFadeIn 0.3s ease-out;
}
/* Preview polygon styling */
.cut-preview-polygon {
stroke-dasharray: 5, 5;
animation: dash-animation 20s linear infinite;
}
@keyframes dash-animation {
to {
stroke-dashoffset: -1000;
}
}
/* Ensure preview polygon is visible but clearly in preview mode */
.leaflet-overlay-pane .cut-preview-polygon {
pointer-events: none;
}
/* Multiple cuts legend styles */
.cut-legend-item {
display: flex;
align-items: center;
gap: 10px;
padding: 8px;
margin: 4px 0;
border-radius: 4px;
background-color: rgba(255, 255, 255, 0.1);
}
.cut-legend-item:hover {
background-color: rgba(255, 255, 255, 0.2);
}
.cut-toggle-btn {
background: none;
border: none;
font-size: 16px;
cursor: pointer;
padding: 4px;
border-radius: 4px;
opacity: 0.7;
transition: opacity 0.2s ease;
}
.cut-toggle-btn:hover {
opacity: 1;
background-color: rgba(255, 255, 255, 0.1);
}
.legend-actions {
margin-top: 10px;
padding-top: 10px;
border-top: 1px solid rgba(255, 255, 255, 0.2);
text-align: center;
}
.legend-actions .btn {
background-color: rgba(255, 255, 255, 0.1);
color: white;
border: 1px solid rgba(255, 255, 255, 0.3);
padding: 6px 12px;
border-radius: 4px;
font-size: 12px;
cursor: pointer;
transition: background-color 0.2s ease;
}
.legend-actions .btn:hover {
background-color: rgba(255, 255, 255, 0.2);
}
/* Mobile cut selection styles */
.overlay-actions {
display: flex;
gap: 10px;
margin-bottom: 20px;
padding-bottom: 10px;
border-bottom: 1px solid #eee;
}
.overlay-actions .btn {
flex: 1;
padding: 8px 12px;
border: 1px solid #ddd;
background: white;
border-radius: 4px;
cursor: pointer;
font-size: 13px;
transition: all 0.2s;
}
.overlay-actions .btn:hover {
background: #f5f5f5;
transform: translateY(-1px);
}
.cut-checkbox-label {
display: flex;
align-items: center;
gap: 10px;
padding: 10px;
border: 1px solid #eee;
border-radius: 6px;
margin-bottom: 8px;
cursor: pointer;
transition: all 0.2s;
}
.cut-checkbox-label:hover {
background-color: #f8f9fa;
border-color: #3388ff;
}
.cut-checkbox-label input[type="checkbox"] {
margin: 0;
transform: scale(1.2);
}
.cut-color-indicator {
width: 20px;
height: 20px;
border-radius: 4px;
border: 1px solid #ddd;
flex-shrink: 0;
}
.cut-info {
flex: 1;
}
.cut-name {
font-weight: bold;
color: #333;
margin-bottom: 2px;
}
.cut-category {
font-size: 12px;
color: #666;
margin-bottom: 4px;
}
.cut-description {
font-size: 11px;
color: #888;
line-height: 1.3;
}
.no-active-cuts {
color: #999;
font-style: italic;
text-align: center;
padding: 20px;
}
.active-overlay-item {
display: flex;
align-items: center;
gap: 10px;
padding: 8px;
margin: 4px 0;
border-radius: 4px;
background-color: #f8f9fa;
border: 1px solid #eee;
}
.active-overlay-item .overlay-color {
width: 16px;
height: 16px;
border-radius: 3px;
border: 1px solid #ddd;
flex-shrink: 0;
}
.active-overlay-item .overlay-details {
flex: 1;
}
.active-overlay-item .overlay-name {
font-weight: bold;
color: #333;
font-size: 13px;
}
.active-overlay-item .overlay-description {
font-size: 11px;
color: #666;
margin-top: 2px;
}

View File

@@ -96,14 +96,20 @@ path.leaflet-interactive {
cursor: pointer !important;
}
/* Override any conflicting styles */
.leaflet-container path.leaflet-interactive {
/* Override any conflicting styles - but allow cuts to manage their own opacity */
.leaflet-container path.leaflet-interactive:not(.cut-polygon) {
stroke: #ffffff !important;
stroke-opacity: 1 !important;
stroke-width: 2px !important;
fill-opacity: 0.8 !important;
}
/* Cut polygons - allow dynamic opacity (higher specificity to override) */
.leaflet-container path.leaflet-interactive.cut-polygon {
stroke-width: 2px !important;
/* Allow JavaScript to control fill-opacity - remove !important */
}
/* Marker being moved */
.location-marker.leaflet-drag-target {
cursor: move !important;

View File

@@ -70,3 +70,269 @@
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;
}
}

View File

@@ -152,3 +152,97 @@
.mobile-sidebar .btn:active {
transform: scale(0.95);
}
/* Mobile overlay modal styles */
.overlay-options {
display: flex;
flex-direction: column;
gap: 12px;
margin-bottom: 20px;
}
.overlay-option {
padding: 12px;
border: 2px solid #e0e0e0;
border-radius: var(--border-radius);
transition: var(--transition);
}
.overlay-option:hover {
border-color: var(--primary-color);
background-color: rgba(52, 152, 219, 0.05);
}
.overlay-option label {
display: flex;
align-items: center;
cursor: pointer;
font-weight: 500;
margin: 0;
width: 100%;
}
.overlay-option input[type="radio"] {
margin-right: 12px;
transform: scale(1.2);
accent-color: var(--primary-color);
}
.overlay-option.selected {
border-color: var(--primary-color);
background-color: rgba(52, 152, 219, 0.1);
}
.overlay-label {
flex: 1;
}
.current-overlay-info {
padding: 15px;
background-color: var(--light-color);
border-radius: var(--border-radius);
border-left: 4px solid var(--primary-color);
}
.current-overlay-info h3 {
margin: 0 0 12px 0;
color: var(--dark-color);
font-size: 16px;
}
.overlay-info-content {
display: flex;
align-items: center;
gap: 12px;
}
.overlay-color {
width: 24px;
height: 24px;
border-radius: 4px;
border: 2px solid rgba(0,0,0,0.2);
flex-shrink: 0;
}
.overlay-details {
flex: 1;
}
.overlay-name {
font-weight: 600;
color: var(--dark-color);
margin-bottom: 4px;
}
.overlay-description {
font-size: 14px;
color: #666;
line-height: 1.4;
}
/* Mobile overlay button active state */
.mobile-sidebar #mobile-overlay-btn.active {
background-color: var(--primary-color);
color: white;
border-color: var(--primary-color);
}

View File

@@ -16,4 +16,5 @@
@import url("modules/cache-busting.css");
@import url("modules/apartment-popup.css");
@import url("modules/apartment-marker.css");
@import url("modules/temp-user.css")
@import url("modules/temp-user.css");
@import url("modules/cuts.css");