1242 lines
22 KiB
CSS

/* 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;
}
/* Cut Location Management Styles */
.cuts-location-section {
margin-top: 20px;
}
.location-filters {
background: #f8f9fa;
padding: 15px;
border-radius: 8px;
margin-bottom: 20px;
}
.location-filters h4 {
margin: 0 0 15px 0;
color: #495057;
font-size: 16px;
font-weight: 600;
}
.filter-row {
display: flex;
flex-wrap: wrap;
gap: 15px;
align-items: end;
}
.filter-group {
display: flex;
flex-direction: column;
min-width: 150px;
}
.filter-group label {
font-size: 12px;
color: #6c757d;
margin-bottom: 5px;
font-weight: 500;
}
.filter-group .form-control {
padding: 6px 10px;
font-size: 14px;
border: 1px solid #dee2e6;
border-radius: 4px;
}
.filter-group button {
white-space: nowrap;
}
/* Cut Statistics Styles */
.cut-statistics {
background: #e9ecef;
padding: 15px;
border-radius: 8px;
margin-bottom: 20px;
}
.cut-statistics h4 {
margin: 0 0 15px 0;
color: #495057;
font-size: 16px;
font-weight: 600;
}
.stats-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 10px;
}
.stat-item {
display: flex;
justify-content: space-between;
padding: 8px 12px;
background: white;
border-radius: 4px;
border-left: 4px solid #007bff;
}
.stat-label {
font-size: 14px;
color: #6c757d;
font-weight: 500;
}
.stat-value {
font-size: 14px;
color: #212529;
font-weight: 600;
}
/* Cut Settings Styles */
.cut-settings {
background: #f1f3f4;
padding: 15px;
border-radius: 8px;
}
.cut-settings h4 {
margin: 0 0 15px 0;
color: #495057;
font-size: 16px;
font-weight: 600;
}
.setting-row {
display: flex;
flex-wrap: wrap;
gap: 15px;
align-items: center;
}
.setting-group {
display: flex;
flex-direction: column;
min-width: 150px;
}
.setting-group label {
font-size: 14px;
color: #495057;
margin-bottom: 5px;
font-weight: 500;
display: flex;
align-items: center;
gap: 8px;
}
.setting-group input[type="checkbox"] {
margin: 0;
}
.setting-group input[type="text"],
.setting-group input[type="number"] {
padding: 6px 10px;
font-size: 14px;
border: 1px solid #dee2e6;
border-radius: 4px;
}
.setting-group span {
font-size: 14px;
color: #6c757d;
margin-left: 5px;
}
/* Button States for Location Management */
#toggle-location-visibility.active {
background-color: #28a745;
border-color: #28a745;
}
#toggle-location-visibility.inactive {
background-color: #6c757d;
border-color: #6c757d;
}
/* Responsive Design */
@media (max-width: 768px) {
.filter-row {
flex-direction: column;
align-items: stretch;
}
.filter-group {
min-width: 100%;
}
.setting-row {
flex-direction: column;
align-items: stretch;
}
.setting-group {
min-width: 100%;
}
.stats-grid {
grid-template-columns: 1fr;
}
}
/* Enhanced panel styling for location management */
.cuts-location-section .panel-header {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
}
.cuts-location-section .panel-title {
color: rgb(0, 0, 0);
}
.cuts-location-section .btn-sm {
font-size: 12px;
padding: 4px 8px;
}
/* Print View Styles */
@media print {
.cuts-location-section {
page-break-inside: avoid;
}
.location-filters,
.cut-settings {
display: none;
}
.cut-statistics {
border: 1px solid #000;
background: white !important;
}
}
/* Print-specific map styles */
@media screen {
.leaflet-container img {
max-width: none !important;
opacity: 1 !important;
}
.leaflet-tile-pane {
opacity: 1 !important;
}
.leaflet-overlay-pane {
opacity: 1 !important;
}
}
/* Ensure tiles are visible during capture */
.leaflet-tile {
opacity: 1 !important;
visibility: visible !important;
}
.leaflet-container .leaflet-tile-pane {
z-index: 1 !important;
}
.leaflet-container .leaflet-overlay-pane {
z-index: 2 !important;
}