:root {
    --primary-color: #013E7F;
    --secondary-color: #00853E;
    --text-color: #000000;
    --white: #ffffff;
    --light-gray: #f1f1f1;
    --medium-gray: #888;
    --dark-gray: #555;
    --border-radius: 5px;
    --box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    --transition: 0.3s ease-in-out;
}

/* Global Styles */
body {
    margin: 0;
    padding: 0;
    display: flex;
    min-height: 100vh;
    background:
        radial-gradient(circle at 30% 30%, rgba(255, 243, 205, 0.5) 0%, transparent 70%),
        radial-gradient(circle at 70% 40%, rgba(255, 228, 196, 0.5) 0%, transparent 70%),
        radial-gradient(circle at 50% 80%, rgba(255, 250, 205, 0.5) 0%, transparent 70%),
        radial-gradient(circle, #fff9e6, #faf1dc);
    background-blend-mode: multiply;
    overflow-x: hidden;
    align-items: center;
    justify-content: center;
    font-family: 'Roboto', sans-serif;
}

/* Leaflet Attribution Control Styling */
.leaflet-control-attribution {
    background: rgba(255, 255, 255, 0.8) !important;
    font-size: 10px !important;
    color: #666 !important;
    padding: 2px 4px !important;
    border-radius: 3px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    opacity: 0.7 !important;
    transition: opacity 0.3s ease !important;
}

.leaflet-control-attribution:hover {
    opacity: 1 !important;
}

.leaflet-control-attribution a {
    color: #666 !important;
    text-decoration: none !important;
}

.leaflet-control-attribution a:hover {
    color: #333 !important;
    text-decoration: underline !important;
}

h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #013E7F;
}

h2 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

p {
    font-size: 1rem;
    line-height: 1.4;
}

h1.center-lines {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 20px 0;
}

h1.center-lines:before,
h1.center-lines:after {
    content: "";
    flex: 1;
    border-bottom: 2px solid #00853E;
    margin: 0 10px;
    align-self: center;
}

/* Center the footer text below the map on all pages */
#page-container > p {
    text-align: center;
}

/* Map Styles */
#map {
    width: 100%;
    height: 600px;
    position: relative;
    border-radius: 0;
    transition: left 0.3s ease-in-out;
}

/* Desktop - Larger map for screens wider than 1024px */
@media only screen and (min-width: 1025px) {
    body {
        display: block; /* stop centering the entire page so content can span full width */
    }

    #page-container {
        width: 100%;
    }

    #map {
        height: 80vh; /* Use 80% of viewport height for larger screens */
        max-height: 900px; /* Cap it at 900px to prevent it from being too large */
        width: 100%; /* ensure map spans full container width */
    }
}

/* Large desktop - Even larger map for very wide screens */
@media only screen and (min-width: 1440px) {
    #map {
        height: 85vh; /* Use 85% of viewport height for very large screens */
        max-height: 1000px; /* Cap it at 1000px */
    }
}

#map.shifted {
    left: 0;
}

.leaflet-attribution-flag {
    display: none !important;
}

/* Project Details Panel */
#project-details {
    position: absolute;
    top: 0;
    right: 0;
    width: 350px;
    height: 100%;
    background-color: #ffffff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transform: translateX(calc(100% + 20px));
    transition: transform 0.3s ease-in-out;
    overflow: hidden;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

#project-details .header {
    background-color: #013E7F;
    color: #ffffff;
    font-size: 1rem;
    padding: 8px 16px;
    font-weight: bold;
    text-align: left;
    box-sizing: border-box;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    width: 100%;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

#project-details-content {
    padding: 1rem;
    overflow-y: auto;
    height: calc(100% - 80px);
    scrollbar-width: thin;
    scrollbar-color: #013E7F #f1f1f1;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

/* Add a subtle gradient fade at the bottom to indicate more content */
#project-details-content::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
    pointer-events: none;
}

#project-details-content::-webkit-scrollbar {
    width: 8px;
}

#project-details-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
    margin: 2px 0;
}

#project-details-content::-webkit-scrollbar-thumb {
    background: #013E7F;
    border-radius: 4px;
    border: 2px solid #f1f1f1;
}

#project-details-content::-webkit-scrollbar-thumb:hover {
    background: #002855;
}

#project-details h2 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    margin-top: 0;
}

#project-details .close-button {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.2rem;
    cursor: pointer;
}

#project-details-content p {
    font-size: 0.85rem;
    padding: 2px 0;
    margin: 0.25rem 0;
}

#project-details-content ul {
    padding-left: 20px;
    margin: 0.25rem 0;
}

#project-details-content li {
    margin-bottom: 0.25rem;
}

#project-details-content a {
    color: #013E7F;
    text-decoration: none;
}

#project-details-content a:hover {
    text-decoration: underline;
}

#project-details.show {
    transform: translateX(0%);
}

/* Pulsating Line Animation (glow effect, slower timing) */
.pulsating-line {
    animation: pulse 3s ease-in-out infinite;
}

/* Pulsating Arrowhead Animation (glow effect only, arrowhead stays opaque) */
.arrowhead-marker.pulsating {
    animation: pulseGlow 3s ease-in-out infinite;
    z-index: 30000 !important;
    opacity: 1 !important;
}

.leaflet-marker-icon.arrowhead-marker.pulsating {
    z-index: 30000 !important;
}

@keyframes pulse {
    0% {
        opacity: 0.2;
        filter: drop-shadow(0 0 12px var(--arrowhead-color)) drop-shadow(0 0 24px var(--arrowhead-color)) drop-shadow(0 0 48px var(--arrowhead-color));
    }
    50% {
        opacity: 0.7;
        filter: drop-shadow(0 0 20px var(--arrowhead-color)) drop-shadow(0 0 40px var(--arrowhead-color)) drop-shadow(0 0 80px var(--arrowhead-color)) drop-shadow(0 0 120px var(--arrowhead-color));
    }
    100% {
        opacity: 0.2;
        filter: drop-shadow(0 0 12px var(--arrowhead-color)) drop-shadow(0 0 24px var(--arrowhead-color)) drop-shadow(0 0 48px var(--arrowhead-color));
    }
}

@keyframes pulseGlow {
    0% {
        filter: drop-shadow(0 0 12px var(--arrowhead-color)) drop-shadow(0 0 24px var(--arrowhead-color)) drop-shadow(0 0 48px var(--arrowhead-color));
    }
    50% {
        filter: drop-shadow(0 0 20px var(--arrowhead-color)) drop-shadow(0 0 40px var(--arrowhead-color)) drop-shadow(0 0 80px var(--arrowhead-color)) drop-shadow(0 0 120px var(--arrowhead-color));
    }
    100% {
        filter: drop-shadow(0 0 12px var(--arrowhead-color)) drop-shadow(0 0 24px var(--arrowhead-color)) drop-shadow(0 0 48px var(--arrowhead-color));
    }
}

/* Legend Styles */
#legend {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background-color: #ffffff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    z-index: 1100;
    display: block;
    font-family: Helvetica, Arial, sans-serif;
    padding: 0;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    pointer-events: auto;
}

#legend.show {
    display: block;
}

#legend .legend-header {
    background-color: #013E7F;
    color: #ffffff;
    font-size: 1rem;
    padding: 8px 16px;
    font-weight: bold;
    text-align: left;
    box-sizing: border-box;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    width: 100%;
    position: relative;
}

#legend .close-button {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.2rem;
    cursor: pointer;
}

#legend #legend-content {
    padding: 8px;
    overflow-y: auto;
    font-size: 0.9rem;
    line-height: 1.3;
    scrollbar-width: thin;
    scrollbar-color: #013E7F #f1f1f1;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
    pointer-events: auto;
}

#legend #legend-content::-webkit-scrollbar {
    width: 8px;
}

#legend #legend-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
    margin: 2px 0;
}

#legend #legend-content::-webkit-scrollbar-thumb {
    background: #013E7F;
    border-radius: 4px;
    border: 2px solid #f1f1f1;
}

#legend #legend-content::-webkit-scrollbar-thumb:hover {
    background: #002855;
}

/* Add a subtle gradient fade at the bottom to indicate more content */
#legend #legend-content::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
   /* background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1)); */
    pointer-events: none;
}

#legend-tab {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background-color: #013E7F;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    z-index: 1100;
    color: #fff;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 14px;
    font-weight: bold;
    display: none;
    pointer-events: auto;
}

/* Custom Tooltip */
.custom-tooltip {
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.leaflet-tooltip.custom-tooltip.leaflet-tooltip-fade {
    opacity: 0.9;
}

#copied-message {
    position: absolute;
    top: 50px;
    right: 10px;
    z-index: 1000;
    background: #4caf50;
    color: white;
    padding: 10px;
    border-radius: 5px;
    display: none;
}

/* Helpful Links Section */
.helpful-links {
    margin-top: 10px;
}

.helpful-links h3 {
    font-size: 1rem;
    margin-bottom: 4px;
    color: #013E7F;
}

.helpful-links ul {
    list-style-type: disc;
    padding-left: 20px;
    margin: 0;
}

.helpful-links li {
    margin-bottom: 5px;
}

/* Gallery Section */
.gallery-section {
    margin-top: 15px;
}

.gallery-section h3 {
    margin-bottom: 5px;
    font-size: 1.2rem;
    color: #013E7F;
}

.gallery-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.gallery-item {
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

.gallery-item.full-width {
    width: 100%;
}

.gallery-item.half-width {
    width: calc(50% - 10px);
}

.gallery-caption {
    margin-top: 8px;
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
    line-height: 1.4;
}

/* Extra margin on mobile to ensure captions are visible above the gradient */
@media (max-width: 768px) {
    .gallery-caption {
        margin-top: 10px;
        margin-bottom: 30px; /* Extra margin to clear the white gradient at bottom */
        padding-bottom: 5px;
    }
    
    /* Ensure last gallery item has extra bottom margin */
    .gallery-section .gallery-item:last-child {
        margin-bottom: 30px;
    }
}

/* Lightbox Styles */
#lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    transition: opacity 0.3s ease-in-out;
}

#lightbox.show {
    display: flex;
    opacity: 1;
}

.lightbox-prev,
.lightbox-next,
.lightbox-close {
    border: none;
    color: #fff;
    cursor: pointer;
    position: absolute;
    z-index: 1101;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    overflow: visible;
    border-radius: 5px;
    display: flex;
    align-items: center;
}

.lightbox-image-container {
    position: relative;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    width: 100%;
    height: auto;
    display: block;
}

.lightbox-caption {
    color: #fff;
    text-align: center;
    padding: 15px 20px;
    font-size: 0.95rem;
    line-height: 1.5;
    max-width: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 0 0 5px 5px;
    margin-top: 0;
}

.lightbox-prev {
    left: -50px;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 2rem;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.lightbox-prev:hover {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.lightbox-next {
    right: -50px;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 2rem;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.lightbox-next:hover {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.lightbox-close {
    top: 10px;
    right: 10px;
    transform: none;
    font-size: 1.2rem;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
    padding: 5px 10px;
    z-index: 1101;
}

.lightbox-close:hover {
    background-color: rgba(1, 62, 127, 0.8);
    border-radius: 50%;
}

/* Lightbox mobile adjustments */
@media only screen and (max-width: 768px) {
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-prev,
    .lightbox-next {
        font-size: 1.5rem;
        padding: 6px 10px;
    }
}

/* Mobile & Tablet (Portrait) Adjustments */
@media only screen and (max-width: 768px) and (orientation: portrait) {
    h1.center-lines {
        font-size: 1.2rem; /* Smaller from 2rem */
        margin: 10px 0;    /* Reduced from 20px */
    }

    #map {
        height: calc(100vh - 50px); /* Reduced from 80px */
        width: 100vw;
    }

    #project-details {
        width: 100%;
        height: calc(50% - 40px);
        bottom: 40px;
        left: 0;
        right: 0;
        top: auto;
        transform: translateY(100%);
        border-radius: 20px 20px 0 0;
    }

    #project-details.show {
        transform: translateY(0);
    }

    #project-details-content {
        height: calc(100% - 40px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        touch-action: pan-y;
        padding-bottom: 2rem;
    }

    #project-details h2 {
        font-size: 1.3rem;
        margin-bottom: 0.75rem;
    }

    #project-details-content p {
        font-size: 1rem;
        line-height: 1.4;
        margin: 0.4rem 0;
    }

    #project-details-content ul {
        font-size: 1rem;
        line-height: 1.4;
        margin: 0.4rem 0;
    }

    #project-details-content li {
        margin-bottom: 0.4rem;
    }

    /* Improve clickability of the close button in Project Details */
    #project-details button {
        z-index: 1050;
    }

    #legend {
        width: 100%;
        bottom: 0;
        left: 0;
        right: 0;
        transform: translateY(100%);
        border-radius: 20px 20px 0 0;
        pointer-events: auto;
    }

    #legend.show {
        transform: translateY(0);
    }

    #legend-tab {
        display: none;
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 40px;
        line-height: 40px;
        text-align: center;
        font-size: 1rem;
        background-color: #013E7F;
        color: #fff;
        cursor: pointer;
        z-index: 1100;
        border-radius: 0;
        padding: 0;
    }

    #legend #legend-content {
        height: calc(100% - 40px);
        padding-bottom: 2rem;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        touch-action: pan-y;
        pointer-events: auto;
    }

    #legend #legend-content::-webkit-scrollbar {
        width: 6px;
    }

    #legend #legend-content::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 3px;
        margin: 2px 0;
    }

    #legend #legend-content::-webkit-scrollbar-thumb {
        background: #013E7F;
        border-radius: 3px;
        border: 1px solid #f1f1f1;
    }
}

/* Mobile Landscape Adjustments */
@media only screen and (max-width: 768px) and (orientation: landscape) {
    #map {
        height: 80vh;
        width: 100vw;
    }

    #project-details {
        width: 350px;
        height: 100%;
        right: 0;
        bottom: 0;
        top: 0;
        transform: translateX(100%);
        border-radius: 0 0 0 0;
    }

    #project-details.show {
        transform: translateX(0);
    }

    #project-details-content {
        height: calc(100% - 40px);
    }

    #legend {
        width: 350px;
        height: 100%;
        left: 0;
        bottom: 0;
        top: 0;
        transform: translateX(-100%);
        border-radius: 0 0 0 0;
    }

    #legend.show {
        transform: translateX(0);
    }

    #legend-tab {
        display: none;
    }
}

/* Fullscreen toggle button */
#fullscreen-toggle {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1001;
    background: white;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    padding: 7px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 75px;
    min-width: 30px;
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#fullscreen-toggle:hover {
    background: #f4f4f4;
    border-color: rgba(0, 0, 0, 0.3);
}

#fullscreen-toggle i {
    font-size: 1.2rem;
    color: #333;
    pointer-events: none;
}

#fullscreen-toggle.fullscreen {
    position: fixed;
    top: 20px;
    right: 20px;
    left: auto;
    margin-top: 0;
}

/* Markers toggle button */
#markers-toggle {
    position: absolute;
    top: 7px;
    left: 10px;
    z-index: 1001;
    background: white;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    padding: 7px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 125px; /* 75px (fullscreen) + 10px (gap) + 40px (fullscreen height) = 125px */
    width: 35px; /* Match fullscreen button width: 30px min-width + 7px padding on each side */
    height: 35px; /* Match fullscreen button height: 30px min-height + 7px padding on each side */
    display: flex;
    align-items: center;
    justify-content: center;
}

#markers-toggle:hover {
    background: #f4f4f4;
    border-color: rgba(0, 0, 0, 0.3);
}

#markers-toggle i {
    font-size: 1.2rem;
    color: #333;
    pointer-events: none;
}

/* Ensure the buttons are visible on mobile */
@media (max-width: 768px) {
    #fullscreen-toggle {
        top: 10px;
        left: 10px;
        margin-top: 75px;
    }
    
    #markers-toggle {
        top: 10px;
        left: 10px;
        margin-top: 125px; /* Same spacing as desktop */
        width: 44px; /* Match fullscreen button width */
        height: 44px; /* Match fullscreen button height */
    }
}

/* Fullscreen styles */
#map.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
}

#map.fullscreen ~ #legend {
    z-index: 1100;
}

#map.fullscreen ~ #legend-tab {
    z-index: 1100;
}

#map.fullscreen ~ #project-details {
    z-index: 1100;
}

#map.fullscreen ~ #fullscreen-toggle {
    z-index: 1100;
}

#page-container.fullscreen {
    overflow: hidden;
}

/* Coordinate Display Tool */
#coordinate-display {
    position: fixed;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 10px 14px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    z-index: 2000;
    display: none;
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    line-height: 1.4;
}

#coordinate-display div {
    margin: 2px 0;
}

#coordinate-display div:last-child {
    font-weight: bold;
    color: #4CAF50;
}

/* Coordinate Point Markers */
.coordinate-point-marker {
    cursor: pointer;
    transition: all 0.2s ease;
}

.coordinate-point-marker:hover {
    transform: scale(1.2);
}

/* Arrowhead Styles */
.arrowhead-icon {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.arrowhead-marker {
    pointer-events: auto !important;
    z-index: 1000 !important;
}

.test-arrowhead-marker {
    pointer-events: auto !important;
    z-index: 9999 !important;
}

/* Ensure arrowhead markers are always visible */
.leaflet-marker-icon.arrowhead-marker,
.leaflet-marker-icon.test-arrowhead-marker {
    z-index: 1000 !important;
    pointer-events: auto !important;
}

/* Interactive arrowheads (Line Editor mode) */
.leaflet-marker-icon.arrowhead-marker.interactive {
    cursor: grab !important;
}

.leaflet-marker-icon.arrowhead-marker.interactive:hover {
    cursor: grabbing !important;
}

.leaflet-marker-icon.arrowhead-marker.interactive:active {
    cursor: grabbing !important;
}

/* Non-interactive arrowheads (main map) */
.leaflet-marker-icon.arrowhead-marker:not(.interactive) {
    cursor: default !important;
}



/* Mobile adjustments for coordinate display */
@media (max-width: 768px) {
    #coordinate-display {
        top: 5px;
        right: 5px;
        font-size: 11px;
        padding: 8px 10px;
    }
}

/* Line Editor Styles */
.edit-marker {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.edit-marker:hover {
    transform: scale(1.2);
}

#line-editor {
    font-family: 'Roboto', sans-serif;
}

#line-editor button {
    transition: all 0.2s ease;
}

#line-editor button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

#line-editor button:active {
    transform: translateY(0);
}

#generated-code {
    font-family: 'Courier New', monospace;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

#generated-code:focus {
    outline: none;
    border-color: #013E7F;
    box-shadow: 0 0 0 2px rgba(1, 62, 127, 0.25);
}

/* Point coordinate marker styles - prevent jiggling */
.coordinate-point-marker {
    position: relative !important;
    will-change: auto !important;
    transform: none !important;
}

/* Point coordinate tooltip styles */
.point-coordinate-tooltip {
    background: rgba(255, 255, 255, 0.98) !important;
    border: 2px solid #013E7F !important;
    border-radius: 6px !important;
    padding: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    font-family: 'Roboto', sans-serif !important;
    white-space: normal !important;
    max-width: 200px !important;
    z-index: 10000 !important;
}

.point-coordinate-tooltip code {
    font-family: 'Courier New', monospace !important;
    font-size: 10px !important;
}

/* Snap mode - prevents jiggling by making tooltips non-interactive and fixed */
.point-coordinate-tooltip.snap-mode {
    pointer-events: none !important;
    position: fixed !important;
    transform: none !important;
    will-change: auto !important;
    transition: none !important;
}

.point-coordinate-tooltip.snap-mode * {
    pointer-events: none !important;
}

/* Prevent Leaflet tooltip container from interfering with point coordinate tooltips */
.leaflet-tooltip-container .point-coordinate-tooltip {
    pointer-events: none !important;
}

/* Mobile adjustments for line editor */
@media (max-width: 768px) {
    #line-editor {
        width: 250px;
        max-width: calc(100vw - 20px);
        padding: 10px;
        top: 5px;
        right: 5px;
    }
    
    #line-editor button {
        padding: 8px 6px;
        font-size: 10px;
    }
    
    #generated-code {
        height: 60px;
        font-size: 9px;
    }
    
    #line-editor h4 {
        font-size: 12px;
    }
    
    #line-editor p {
        font-size: 10px;
    }
}