/* Make map full screen */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

#map {
    height: 100vh;
    width: 100%;
    z-index: 0;
}

#areaResult {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    font-size: 16px;
    font-weight: bold;
    z-index: 1000;
    display: none;
}

#areaResult.active {
    display: block;
}

.controls {
    padding: 20px;
    background-color: #f5f5f5;
}

button {
    padding: 10px 20px;
    margin: 0 10px;
    cursor: pointer;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
}

button:hover {
    background-color: #45a049;
}

.loading {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    z-index: 1000;
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

#detectField {
    background-color: #2196F3;
}

#detectField:hover {
    background-color: #1976D2;
}

#drawCurve {
    background-color: #9C27B0;
}

#drawCurve:hover {
    background-color: #7B1FA2;
}

/* Profile Control Styles */
.profile-control {
    background: none;
    padding: 0;
    box-shadow: none;
    min-width: auto;
    margin-bottom: 10px;
}

.profile-header {
    text-align: center;
}

.profile-toggle {
    width: 30px;
    height: 30px;
    background-color: white;
    border: none;
    border-radius: 4px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.4);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: 0;
}

.profile-toggle:hover {
    background-color: #f4f4f4;
}

.profile-content {
    margin-top: 10px;
    padding: 10px;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.4);
    display: none;
}

.profile-content h3 {
    margin-top: 0;
    color: #333;
}

.logout-button {
    display: inline-block;
    background-color: #f44336;
    color: white;
    padding: 8px 15px;
    text-decoration: none;
    border-radius: 4px;
    margin-top: 10px;
}

.logout-button:hover {
    background-color: #d32f2f;
}

.error {
    color: #f44336;
}

.organizations-list {
    margin-top: 10px;
}

.organization-item {
    background-color: #f9f9f9;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 10px;
}

.organization-item p {
    margin: 5px 0;
}

.organization-item strong {
    color: #333;
}

/* Fields Control Styles */
.fields-control {
    background: none;
    padding: 0;
    box-shadow: none;
    min-width: auto;
    margin-bottom: 10px;
}

.fields-header {
    text-align: center;
}

.fields-toggle {
    width: 30px;
    height: 30px;
    background-color: white;
    border: none;
    border-radius: 4px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.4);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: 0;
}

.fields-toggle:hover {
    background-color: #f4f4f4;
}

.fields-content {
    margin-top: 10px;
    padding: 10px;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.4);
    display: none;
}

.fields-content h3 {
    margin-top: 0;
    color: #333;
}

#org-selector {
    margin-bottom: 15px;
}

#org-dropdown {
    width: 100%;
    padding: 5px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.fields-list {
    margin-top: 10px;
}

.field-item {
    background-color: #f9f9f9;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 10px;
    border-left: 4px solid #FF9800;
}

.field-item p {
    margin: 5px 0;
}

.field-item strong {
    color: #333;
}

.view-boundaries-btn {
    background-color: #FF9800;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 5px;
    font-size: 14px;
}

.view-boundaries-btn:hover {
    background-color: #F57C00;
}

/* Field popup styles */
.field-popup {
    min-width: 200px;
}

.field-popup h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
}

.field-popup p {
    margin: 5px 0;
}

.edit-boundary-btn, .save-boundary-btn, .cancel-edit-btn {
    margin-top: 10px;
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.edit-boundary-btn {
    background-color: #2196F3;
    color: white;
}

.edit-boundary-btn:hover {
    background-color: #1976D2;
}

.save-boundary-btn {
    background-color: #4CAF50;
    color: white;
    margin-right: 5px;
}

.save-boundary-btn:hover {
    background-color: #45a049;
}

.cancel-edit-btn {
    background-color: #f44336;
    color: white;
}

.cancel-edit-btn:hover {
    background-color: #d32f2f;
}

#load-all-fields {
    display: block;
    width: 100%;
    margin: 10px 0;
    padding: 8px;
    background-color: #FF9800;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#load-all-fields:hover {
    background-color: #F57C00;
}

/* Cursor styles for editing */
.leaflet-editing-icon {
    cursor: move;
}

.leaflet-editable-drawing-vertex {
    cursor: pointer;
}

.leaflet-editable-drawing-new-point {
    cursor: crosshair;
}

.editing-active .leaflet-container {
    cursor: crosshair;
}

.editing-active .leaflet-interactive {
    cursor: pointer;
}

/* Tooltip styles */
.editing-tooltip {
    position: fixed;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    pointer-events: none;
    z-index: 1000;
}

.editing-indicator {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    margin-top: 10px;
    font-weight: bold;
    pointer-events: none;
}

/* Tutorial Overlay */
.tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.tutorial-content {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.tutorial-step {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.tutorial-number {
    background-color: #FF9800;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    margin-right: 15px;
    flex-shrink: 0;
}

.tutorial-text {
    flex-grow: 1;
}

.tutorial-text h3 {
    margin-top: 0;
    color: #333;
}

.tutorial-text img {
    max-width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 10px;
}

.tutorial-button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 10px;
}

.tutorial-button:hover {
    background-color: #45a049;
}

/* Editing Status Bar */
.editing-status-bar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(33, 150, 243, 0.9);
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    z-index: 1000;
    font-size: 14px;
    max-width: 80%;
}

.status-icon {
    margin-right: 10px;
}

.status-text {
    flex-grow: 1;
}

.keyboard-shortcuts {
    margin-left: 15px;
    display: flex;
    gap: 10px;
}

.keyboard-shortcuts kbd {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 2px 5px;
    border-radius: 3px;
    font-family: monospace;
}

/* Enhanced vertex styling */
.leaflet-editing-icon {
    transition: all 0.2s ease;
    border: 2px solid rgba(0, 0, 0, 0.5);
}

/* Highlight the active vertex */
.leaflet-editing-icon.active {
    background-color: #ff4081;
    border-color: #c2185b;
    transform: scale(1.3);
    z-index: 1000 !important;
}

/* Context Menu */
.polygon-context-menu {
    position: absolute;
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    min-width: 150px;
    overflow: hidden;
}

.menu-item {
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.menu-item:hover {
    background-color: #f5f5f5;
}

.edit-item:before {
    content: "✏️ ";
}

.center-item:before {
    content: "🎯 ";
}

.info-item:before {
    content: "ℹ️ ";
}

/* Field Info Panel */
.field-info-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 2000;
    width: 400px;
    max-width: 90%;
    overflow: hidden;
}

.info-header {
    background-color: #FF9800;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-header h2 {
    margin: 0;
    font-size: 18px;
}

.close-info-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.info-content {
    padding: 15px;
    max-height: 300px;
    overflow-y: auto;
}

.info-actions {
    padding: 15px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid #eee;
}

.info-actions button {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.edit-from-info-btn {
    background-color: #2196F3;
    color: white;
}

.center-from-info-btn {
    background-color: #FF9800;
    color: white;
}

/* Control button styles */
.control-button {
    width: 30px;
    height: 30px;
    background-color: white;
    border: none;
    border-radius: 4px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.4);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    color: #333;
    padding: 0;
    margin: 0;
}

.control-button:hover {
    background-color: #f4f4f4;
}

/* SVG icon styling */
.profile-toggle svg, .fields-toggle svg {
    fill: #333;
    width: 16px;
    height: 16px;
}

.profile-toggle:hover svg, .fields-toggle:hover svg {
    fill: #555;
}

/* Make sure the buttons are exactly the same size as Leaflet controls */
.profile-toggle, .fields-toggle {
    width: 30px;
    height: 30px;
    background-color: white;
    border: none;
    border-radius: 4px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.4);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: 0;
}

/* Match Leaflet control spacing */
.leaflet-control {
    margin-bottom: 10px !important;
}

.profile-control, .fields-control {
    margin-bottom: 10px !important;
}

/* Make the layers control button match the profile and fields buttons */
.leaflet-control-layers-toggle {
    width: 30px !important;
    height: 30px !important;
    background-size: 16px 16px !important;
    background-position: center !important;
    border-radius: 4px !important;
}

/* Ensure consistent spacing between controls */
.leaflet-control {
    margin-bottom: 10px !important;
    clear: both !important;
}

/* Fix for the layers control expanded state */
.leaflet-control-layers-expanded {
    padding: 6px 10px 6px 6px !important;
    background-color: white !important;
    border-radius: 4px !important;
    box-shadow: 0 1px 5px rgba(0,0,0,0.4) !important;
}

/* Ensure all control buttons have the same appearance */
.leaflet-bar a, 
.leaflet-bar a:hover,
.profile-toggle, 
.fields-toggle {
    width: 30px !important;
    height: 30px !important;
    line-height: 30px !important;
    background-color: white !important;
    border-radius: 4px !important;
    box-shadow: 0 1px 5px rgba(0,0,0,0.4) !important;
}

/* Ensure consistent hover effects */
.leaflet-bar a:hover,
.profile-toggle:hover, 
.fields-toggle:hover {
    background-color: #f4f4f4 !important;
}

/* Guidance Lines Panel */
.guidance-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 2000;
    width: 500px;
    max-width: 90%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.guidance-header {
    background-color: #4CAF50;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.guidance-header h2 {
    margin: 0;
    font-size: 18px;
}

.close-guidance-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.guidance-content {
    padding: 15px;
    overflow-y: auto;
    flex-grow: 1;
}

.guidance-options {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.guidance-type-selector {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.guidance-settings {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.setting {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.setting input {
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.create-guidance-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
}

.create-guidance-btn:hover {
    background-color: #45a049;
}

.guidance-lines-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.guidance-line-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.guidance-line-actions {
    display: flex;
    gap: 10px;
}

.guidance-line-actions button {
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.show-hide-guidance {
    background-color: #2196F3;
    color: white;
}

.delete-guidance {
    background-color: #f44336;
    color: white;
}

.ab-point-marker {
    background-color: #2196F3;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 20px;
    font-weight: bold;
}

/* Guidance Line Popup Styles */
.guidance-line-popup {
    text-align: center;
    min-width: 200px;
}

.guidance-line-popup h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #333;
}

.guidance-popup-actions {
    display: flex;
    justify-content: space-between;
    margin: 15px 0 10px;
    gap: 8px;
}

.action-btn {
    flex: 1;
    padding: 5px 8px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

#edit-guidance {
    background-color: #2196F3;
}

#delete-guidance {
    background-color: #f44336;
}

.guidance-popup-note {
    font-size: 11px;
    color: #666;
    margin-top: 10px;
    font-style: italic;
}

/* Parallel Line Dialog Styles */
.parallel-line-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 2000;
    width: 300px;
    max-width: 90%;
    overflow: hidden;
}

.parallel-dialog-header {
    background-color: #2196F3;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.parallel-dialog-header h3 {
    margin: 0;
    font-size: 18px;
}

.close-dialog-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.parallel-dialog-content {
    padding: 15px;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.input-group input, .input-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.create-btn {
    width: 100%;
    padding: 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.create-btn:hover {
    background-color: #45a049;
}

/* Modern Guidance Instructions Panel */
.guidance-instructions {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: var(--shadow);
    z-index: 1000;
    width: 350px;
    max-width: 90%;
    overflow: hidden;
    transform: translateY(-10px);
    animation: fadeInDown 0.5s forwards;
}

@keyframes fadeInDown {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.instructions-header {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: var(--text-light);
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    user-select: none;
}

.instructions-header h3 {
    margin: 0;
    font-size: 18px;
}

.close-instructions-btn {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition);
}

.close-instructions-btn:hover {
    transform: scale(1.1);
    color: var(--accent-color);
}

.instructions-content {
    padding: 20px;
    color: var(--text-dark);
}

.guidance-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.guidance-buttons button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    transition: var(--transition);
}

#save-guidance-btn {
    background-color: var(--success-color);
    color: var(--text-light);
}

#save-guidance-btn:hover:not(:disabled) {
    background-color: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#save-guidance-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#cancel-guidance-btn {
    background-color: var(--accent-color);
    color: var(--text-light);
}

#cancel-guidance-btn:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Modern AB Point Markers */
.ab-point-marker {
    background: linear-gradient(to bottom right, var(--primary-color), var(--secondary-color));
    color: var(--text-light);
    border-radius: 50%;
    text-align: center;
    line-height: 20px;
    font-weight: bold;
    box-shadow: var(--shadow);
    border: 2px solid white;
}

/* Modern Guidance Line Name Dialog */
.guidance-name-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    width: 350px;
    max-width: 90%;
    overflow: hidden;
    animation: scaleIn 0.3s forwards;
}

@keyframes scaleIn {
    to {
        transform: translate(-50%, -50%) scale(1);
    }
}

.guidance-dialog-header {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: var(--text-light);
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.guidance-dialog-header h3 {
    margin: 0;
    font-size: 18px;
}

.close-dialog-btn {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition);
}

.close-dialog-btn:hover {
    transform: scale(1.1);
    color: var(--accent-color);
}

.guidance-dialog-content {
    padding: 20px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
}

.input-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: var(--transition);
}

.input-group input:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(76, 161, 175, 0.2);
    outline: none;
}

.create-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: var(--text-light);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: var(--transition);
}

.create-btn:hover {
    background: linear-gradient(to right, #34495e, #5dafbd);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Loading indicator */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    color: white;
    font-size: 18px;
}

.loading::after {
    content: '';
    width: 30px;
    height: 30px;
    border: 4px solid #fff;
    border-top-color: var(--secondary-color);
    border-radius: 50%;
    margin-left: 15px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Modern UI Theme - Global Styles */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #4ca1af;
    --accent-color: #e74c3c;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --text-light: #ffffff;
    --text-dark: #333333;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

button {
    cursor: pointer;
    transition: var(--transition);
}

/* Modern Field Popup Styling */
.field-popup-container {
    position: relative;
    padding: 0;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    min-width: 280px;
}

.field-info {
    padding: 15px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
}

.field-info h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
}

.field-info p {
    margin: 5px 0;
    font-size: 14px;
}

.field-action-buttons {
    display: flex;
    flex-direction: column;
    padding: 10px;
    background: rgba(0, 0, 0, 0.7);
}

.action-button {
    display: flex;
    align-items: center;
    margin: 5px 0;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-dark);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.5s forwards;
}

.action-button:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.action-button i {
    margin-right: 10px;
    font-size: 16px;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Make sure the leaflet popup has a transparent background */
.leaflet-popup-content-wrapper {
    background: transparent;
    box-shadow: none;
}

.leaflet-popup-tip-container {
    display: none;
}

/* Modern Control Buttons */
.leaflet-control-container .leaflet-bar a,
.leaflet-control-zoom-in, 
.leaflet-control-zoom-out,
.custom-control-button {
    background: white !important;
    color: var(--primary-color) !important;
    width: 36px !important;
    height: 36px !important;
    line-height: 36px !important;
    text-align: center !important;
    border-radius: 4px !important;
    margin-bottom: 5px !important;
    box-shadow: var(--shadow) !important;
    transition: var(--transition) !important;
    border: none !important;
}

.leaflet-control-container .leaflet-bar a:hover,
.leaflet-control-zoom-in:hover, 
.leaflet-control-zoom-out:hover,
.custom-control-button:hover {
    background: var(--secondary-color) !important;
    color: white !important;
    transform: translateY(-2px);
}

/* Modern Custom Controls */
.custom-map-control {
    margin-bottom: 10px !important;
}

.custom-control-button {
    display: block !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    padding: 0 10px !important;
    width: auto !important;
    white-space: nowrap !important;
}

/* Measurement Controls */
.measure-control-button,
.marker-control-button,
.field-detect-button,
.draw-curved-line-button {
    background: white !important;
    color: var(--primary-color) !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 8px 12px !important;
    margin: 5px 0 !important;
    font-weight: 500 !important;
    box-shadow: var(--shadow) !important;
    transition: var(--transition) !important;
}

.measure-control-button:hover,
.marker-control-button:hover,
.field-detect-button:hover,
.draw-curved-line-button:hover {
    background: var(--secondary-color) !important;
    color: white !important;
    transform: translateY(-2px);
}

.measure-control-button.active,
.marker-control-button.active,
.field-detect-button.active,
.draw-curved-line-button.active {
    background: var(--primary-color) !important;
    color: white !important;
}

/* Measurement result display */
.measurement-result {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 20px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    font-weight: 500;
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Modern tooltips */
.leaflet-tooltip {
    background: rgba(255, 255, 255, 0.9) !important;
    border: none !important;
    border-radius: 4px !important;
    box-shadow: var(--shadow) !important;
    padding: 8px 12px !important;
    font-weight: 500 !important;
}

.leaflet-tooltip-top:before {
    border-top-color: rgba(255, 255, 255, 0.9) !important;
}

.leaflet-tooltip-bottom:before {
    border-bottom-color: rgba(255, 255, 255, 0.9) !important;
}

.leaflet-tooltip-left:before {
    border-left-color: rgba(255, 255, 255, 0.9) !important;
}

.leaflet-tooltip-right:before {
    border-right-color: rgba(255, 255, 255, 0.9) !important;
}

/* Modern User Profile Panel */
.user-profile-panel {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    z-index: 1000;
    width: 350px;
    max-width: 90%;
    overflow: hidden;
    transform: translateY(-10px);
    animation: fadeInDown 0.5s forwards;
}

.profile-header {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: var(--text-light);
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.profile-header h3 {
    margin: 0;
    font-size: 18px;
}

.close-profile-btn {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition);
}

.close-profile-btn:hover {
    transform: scale(1.1);
    color: var(--accent-color);
}

.profile-content {
    padding: 20px;
}

.profile-info {
    margin-bottom: 20px;
}

.profile-info p {
    margin: 8px 0;
    display: flex;
    justify-content: space-between;
}

.profile-info strong {
    color: var(--primary-color);
}

.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.profile-actions button {
    padding: 12px;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    transition: var(--transition);
    background: var(--primary-color);
    color: var(--text-light);
}

.profile-actions button:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.logout-btn {
    background: var(--accent-color) !important;
}

.logout-btn:hover {
    background: #c0392b !important;
}

/* Modern Field List Panel */
.field-list-panel {
    position: fixed;
    top: 20px;
    left: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    z-index: 1000;
    width: 350px;
    max-width: 90%;
    max-height: calc(100vh - 40px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: translateY(-10px);
    animation: fadeInDown 0.5s forwards;
}

.field-list-header {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: var(--text-light);
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.field-list-header h3 {
    margin: 0;
    font-size: 18px;
}

.close-field-list-btn {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition);
}

.close-field-list-btn:hover {
    transform: scale(1.1);
    color: var(--accent-color);
}

.field-list-content {
    padding: 10px;
    overflow-y: auto;
    flex-grow: 1;
}

.field-search {
    margin-bottom: 15px;
    position: relative;
}

.field-search input {
    width: 100%;
    padding: 12px 15px 12px 40px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: var(--transition);
}

.field-search input:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(76, 161, 175, 0.2);
    outline: none;
}

.field-search::before {
    content: '\f002'; /* Font Awesome search icon */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.field-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.field-item {
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 8px;
    background: #f5f5f5;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.field-item:hover {
    background: #e9e9e9;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.field-item.active {
    background: rgba(76, 161, 175, 0.2);
    border-left: 3px solid var(--secondary-color);
}

.field-name {
    font-weight: 500;
    color: var(--primary-color);
}

.field-area {
    font-size: 14px;
    color: #666;
}

.field-actions {
    display: flex;
    gap: 5px;
}

.field-action-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.field-action-btn:hover {
    background: var(--secondary-color);
    color: white;
}

.create-field-btn {
    margin-top: 15px;
    padding: 12px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: var(--text-light);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.create-field-btn:hover {
    background: linear-gradient(to right, #34495e, #5dafbd);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Organization selector */
.org-selector {
    margin-bottom: 15px;
}

.org-selector select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    background-color: white;
    transition: var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

.org-selector select:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(76, 161, 175, 0.2);
    outline: none;
}

/* Empty state */
.empty-state {
    padding: 30px 20px;
    text-align: center;
    color: #999;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #ddd;
}

.empty-state p {
    margin-bottom: 20px;
}

/* Styles for minimum distance dialog */
.min-distance-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1500;
    width: 400px;
    max-width: 90%;
    overflow: hidden;
}

.min-distance-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background-color: #2196F3;
    color: white;
    border-bottom: 1px solid #e0e0e0;
}

.min-distance-header h3 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.min-distance-content {
    padding: 16px;
}

.slider-container {
    margin: 16px 0;
    width: 100%;
}

#min-distance-slider {
    width: 100%;
}

.guidance-settings {
    margin: 16px 0;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.settings-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background-color: #e0e0e0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.settings-btn:hover {
    background-color: #d0d0d0;
}

.min-distance-display {
    font-size: 14px;
    color: #666;
    margin-top: 4px;
}

/* Style for the buffer zone */
.leaflet-buffer-pane {
    z-index: 400; /* Below markers but above tiles */
}

/* Style for the AB point markers */
.ab-point-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #2196F3;
    color: white;
    border-radius: 50%;
    border: 2px solid white;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* Add these styles to your existing CSS */
.setting-description {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
    margin-bottom: 8px;
}

/* Style for the snapping visual indicator */
.snapping-indicator {
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: rgba(255, 87, 34, 0.5);
    border: 2px solid #FF5722;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1000;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.7;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

/* Add these styles to your existing CSS */
.settings-section {
    margin-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 15px;
}

.settings-section:last-child {
    border-bottom: none;
}

.settings-section h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #333;
}

.input-group {
    display: flex;
    align-items: center;
    margin-top: 8px;
}

.input-group input {
    width: 80px;
    padding: 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.input-group .unit {
    margin-left: 8px;
    color: #666;
    font-size: 14px;
}

.apply-btn {
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 15px;
    font-size: 14px;
    cursor: pointer;
    margin-top: 15px;
    width: 100%;
    transition: background-color 0.2s;
}

.apply-btn:hover {
    background-color: #0d8aee;
}

/* Route planning button */
#planFieldRoute {
    background-color: #FF5722;
}

#planFieldRoute:hover {
    background-color: #E64A19;
}

/* Route metrics popup */
.route-metrics {
    padding: 10px;
    max-width: 250px;
}

.route-metrics h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
    color: #333;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

.route-metrics p {
    margin: 5px 0;
    font-size: 14px;
}

/* Style for the Plan Field Route button in the field popup */
.plan-route-btn {
    background-color: #FF5722 !important;
    border-color: #E64A19 !important;
}

.plan-route-btn:hover {
    background-color: #E64A19 !important;
}

/* Styles for the route metrics panel */
.route-metrics-panel {
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.4);
    padding: 0;
    width: 250px;
    max-height: 300px;
    overflow-y: auto;
}

.route-metrics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #f5f5f5;
    border-bottom: 1px solid #ddd;
}

.route-metrics-header h3 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.close-metrics-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-metrics-btn:hover {
    color: #333;
}

.route-metrics-content {
    padding: 10px;
}

.metric-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.metric-label {
    font-weight: bold;
    color: #555;
}

.metric-value {
    color: #333;
}

/* Loading overlay styles */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top-color: #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loading-message {
    color: white;
    font-size: 18px;
    text-align: center;
    max-width: 80%;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Notification styles */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification {
    min-width: 250px;
    max-width: 350px;
    border-radius: 4px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
    overflow: hidden;
    animation: slideIn 0.3s ease-out;
}

.notification-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
}

.notification-message {
    flex-grow: 1;
    margin-right: 10px;
}

.notification-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
}

.notification-close:hover {
    opacity: 1;
}

.notification-info {
    background-color: #2196F3;
    color: white;
}

.notification-success {
    background-color: #4CAF50;
    color: white;
}

.notification-warning {
    background-color: #FF9800;
    color: white;
}

.notification-error {
    background-color: #F44336;
    color: white;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Route metrics container styles */
.route-metrics-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    width: 280px;
    overflow: hidden;
    max-height: 80vh;
    display: none; /* Initially hidden, will be shown when data is available */
    animation: fadeInOut 60s forwards;
}

/* Additional styling for the metrics content (already defined class) */
.route-metrics {
    padding: 15px;
}

/* Fade in and out animation */
@keyframes fadeInOut {
    0% { opacity: 0; }
    10% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

/* Add this to increase the size of the guidance name input field */
#guidance-name {
    width: 100%;
    padding: 8px 12px;
    font-size: 16px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

/* Also style the parent container to ensure proper sizing */
.guidance-form-group {
    margin-bottom: 15px;
    width: 100%;
}

/* Make the guidance dialog wider if needed */
.guidance-instructions {
    min-width: 320px;
    max-width: 450px; /* Increase from default */
}

/* Custom Guidance Dialog Styles - Updated with green button theme */
.custom-guidance-dialog {
    position: fixed;
    z-index: 1000;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    width: 320px;
    overflow: hidden;
    max-width: 450px;
}

.guidance-dialog-header {
    background-color: #4CAF50;
    color: white;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move; /* Indicate it's draggable */
}

.guidance-dialog-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}

.close-dialog-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.guidance-dialog-content {
    padding: 15px;
}

.guidance-info {
    margin-bottom: 15px;
}

.guidance-info p {
    margin: 8px 0;
    font-size: 14px;
}

.guidance-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.guidance-actions .action-btn {
    padding: 10px 0;
    background-color: #4CAF50; /* Green button color */
    color: white; /* White text */
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.guidance-actions .action-btn:hover {
    background-color: #45a049; /* Darker green on hover */
}

/* Guidance metrics container styles */
.guidance-metrics-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    width: 280px;
    overflow: hidden;
    max-height: 80vh;
}

/* Make sure the guidance metrics don't conflict with route metrics */
.route-metrics-container.guidance-metrics-container {
    bottom: 20px;
    right: 20px;
}

.route-metrics-container:not(.guidance-metrics-container) {
    bottom: 20px;
    right: 320px; /* Move to the left when both are visible */
}

/* Headland Dialog Styles */
.create-headland-btn {
    background-color: #4CAF50;
    color: white;
    margin-top: 5px;
}

.create-headland-btn:hover {
    background-color: #45a049;
}

/* Notification styles - if not already present */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1500;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 350px;
}

.notification {
    padding: 12px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease-out;
}

.notification-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-message {
    flex-grow: 1;
    margin-right: 10px;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
}

.notification-close:hover {
    opacity: 1;
}

.notification-success {
    background-color: #4CAF50;
    color: white;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.buttons-container {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.buttons-container button {
    flex: 1;
}

.clear-btn {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
}

.clear-btn:hover {
    background-color: #d32f2f;
}

/* Headland metrics container */
.headland-metrics-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 1500;
    width: 280px;
    overflow: hidden;
    display: block;
}

/* Position adjustment when route metrics are also visible */
.headland-metrics-container.with-route-metrics {
    bottom: 20px;
    right: 310px;
} 

.headland-metrics-container.guidance-metrics-container {
    bottom: 20px;
    right: 310px;
} 

/* Make sure the guidance metrics don't conflict with route metrics */
.route-metrics-container.guidance-metrics-container {
    bottom: 20px;
    right: 20px;
}

.route-metrics-container:not(.guidance-metrics-container) {
    bottom: 20px;
    right: 320px; /* Move to the left when both are visible */
}

/* Make sure the guidance metrics don't conflict with route metrics */
.guidance-metrics-container.route-metrics-container {
    bottom: 20px;
    right: 20px;
}

.guidance-metrics-container:not(.route-metrics-container) {
    bottom: 20px;
    right: 320px; /* Move to the left when both are visible */
}

.guidance-metrics-container.headland-metrics-container {
    bottom: 20px;
    right: 20px;
}

.guidance-metrics-container:not(.headland-metrics-container) {
    bottom: 20px;
    right: 320px; /* Move to the left when both are visible */
}

.context-menu {
    position: absolute;
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: none; /* Hidden by default */
}

.context-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.context-menu li {
    padding: 8px 12px;
    cursor: pointer;
}

.context-menu li:hover {
    background-color: #f0f0f0; /* Highlight on hover */
}

/* Simulation controls */
.simulation-controls {
    margin: 15px 0;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 4px;
}

.speed-control {
    margin-top: 10px;
    padding: 8px;
    background-color: white;
    border-radius: 4px;
}

.speed-control label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 14px;
}

.speed-control input[type="range"] {
    width: 100%;
    margin: 5px 0;
}

/* Tractor icon */
.tractor-icon {
    width: 30px !important;
    height: 30px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

/* Covered area styling */
.leaflet-covered-area {
    animation: fade-in 0.5s ease-out;
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 0.5; }
}

/* Style for the draggable guidance line */
.draggable-line {
    cursor: move;
    transition: stroke-width 0.2s ease;
}

.draggable-line:hover {
    stroke-width: 6px !important;
    opacity: 0.8 !important;
}

/* Add a tooltip class for the guidance line */
.guidance-line-tooltip {
    background-color: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 4px;
    color: black;
    padding: 4px 8px;
    font-size: 12px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.4);
}