.custom-pin {
    position: relative;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.custom-pin.standard-pin {
    width: 32px;
    height: 32px;
    border-radius: 50% 50% 50% 0;
    background: linear-gradient(135deg, #10b981, #3b82f6);
    border: 3px solid #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: rotate(-45deg);
}

.custom-pin.standard-pin::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
}

.custom-pin.standard-pin:hover {
    transform: rotate(-45deg) scale(1.2);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.custom-pin.standard-pin.active {
    background: linear-gradient(135deg, #ef4444, #f97316);
    transform: rotate(-45deg) scale(1.3);
}

.custom-pin.enhanced-pin.enhanced-fallback {
    width: 19px;
    height: 19px;
    border-radius: 50% 50% 50% 0;
    background: linear-gradient(135deg, #16a34a, #2563eb);
    border: 2px solid #fff;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
    transform: rotate(-45deg);
}

.custom-pin.enhanced-pin.enhanced-fallback::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
}

.custom-pin.enhanced-pin.enhanced-fallback:hover {
    transform: rotate(-45deg) scale(1.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.custom-pin.enhanced-pin.enhanced-fallback.active {
    background: linear-gradient(135deg, #dc2626, #ea580c);
    transform: rotate(-45deg) scale(1.3);
}

.custom-pin.enhanced-pin.enhanced-webp {
    width: 32px;
    height: 32px;
    transform: none;
    background: none;
    border: none;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px) saturate(170%);
    background: rgba(255, 255, 255, 0.05);
    position: relative;
    animation: pinMagnetic 5s ease-in-out infinite;
    box-shadow: 
        0 8px 32px rgba(31, 38, 135, 0.2),
        inset 0 2px 0 rgba(255, 255, 255, 0.8);
}

.custom-pin.enhanced-pin.enhanced-webp::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        transparent 70%
    );
    animation: pinMagneticField 4s ease-in-out infinite;
    z-index: -1;
}

@keyframes pinMagnetic {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 
            0 8px 32px rgba(31, 38, 135, 0.2),
            inset 0 2px 0 rgba(255, 255, 255, 0.8);
    }
    25% { 
        transform: scale(1.02) translateY(-1px);
        box-shadow: 
            0 12px 40px rgba(31, 38, 135, 0.25),
            inset 0 2px 0 rgba(255, 255, 255, 0.9);
    }
    50% { 
        transform: scale(1.04);
        box-shadow: 
            0 16px 48px rgba(31, 38, 135, 0.3),
            inset 0 3px 0 rgba(255, 255, 255, 0.95);
    }
    75% { 
        transform: scale(1.02) translateY(1px);
        box-shadow: 
            0 12px 40px rgba(31, 38, 135, 0.25),
            inset 0 2px 0 rgba(255, 255, 255, 0.9);
    }
}

@keyframes pinMagneticField {
    0%, 100% { 
        transform: scale(1);
        opacity: 0.3;
    }
    50% { 
        transform: scale(1.2);
        opacity: 0.6;
    }
}

.custom-pin.enhanced-pin.enhanced-webp:hover {
    transform: scale(1.18);
    border: 4px solid rgba(255, 255, 255, 1);
    backdrop-filter: blur(25px) saturate(200%);
    animation: pinMagneticHover 1.5s ease-in-out infinite;
}

@keyframes pinMagneticHover {
    0%, 100% { 
        transform: scale(1.18);
        box-shadow: 
            0 0 0 4px rgba(255, 255, 255, 0.3),
            0 20px 60px rgba(31, 38, 135, 0.4),
            inset 0 3px 0 rgba(255, 255, 255, 1);
    }
    50% { 
        transform: scale(1.22);
        box-shadow: 
            0 0 0 8px rgba(255, 255, 255, 0.2),
            0 24px 80px rgba(31, 38, 135, 0.5),
            inset 0 4px 0 rgba(255, 255, 255, 1);
    }
}

.custom-pin.enhanced-pin.enhanced-webp:hover::before {
    animation: pinMagneticFieldHover 1s ease-in-out infinite;
}

@keyframes pinMagneticFieldHover {
    0%, 100% { 
        transform: scale(1.5);
        opacity: 0.4;
    }
    50% { 
        transform: scale(1.8);
        opacity: 0.7;
    }
}

.custom-pin.enhanced-pin.enhanced-webp.active {
    border: 5px solid rgba(255, 255, 255, 1);
    background: rgba(165, 180, 252, 0.15);
    backdrop-filter: blur(30px) saturate(220%);
    transform: scale(1.3);
    animation: none;
    box-shadow: 
        0 0 0 12px rgba(165, 180, 252, 0.2),
        0 28px 100px rgba(165, 180, 252, 0.4),
        inset 0 4px 0 rgba(255, 255, 255, 1);
}

.custom-pin.enhanced-pin.enhanced-webp.active::before {
    background: radial-gradient(
        circle,
        rgba(165, 180, 252, 0.2) 0%,
        rgba(165, 180, 252, 0.1) 50%,
        transparent 70%
    );
    transform: scale(2);
    opacity: 0.8;
    animation: none;
}

.custom-pin.enhanced-pin.enhanced-webp .pin-webp-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: block;
}

.custom-pin.enhanced-pin.enhanced-webp:hover {
    transform: scale(1.25);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 1);
}

.custom-pin.enhanced-pin.enhanced-webp:hover .pin-webp-image {
    transform: scale(1.05);
    filter: brightness(1.1) contrast(1.1);
}


.custom-pin.enhanced-pin.enhanced-webp.active .pin-webp-image {
    transform: scale(1.1);
    filter: brightness(1.2) contrast(1.2) saturate(1.3);
}

.custom-pin.enhanced-pin.enhanced-webp .pin-webp-image {
    opacity: 0;
    animation: fadeInWebP 0.5s ease-in-out 0.1s forwards;
}

@keyframes fadeInWebP {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.custom-pin.enhanced-pin.enhanced-fallback {
    transition: opacity 0.3s ease-in-out;
}
.map-toggle-button {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 100;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(20px) saturate(180%);
    color: #374151;
    font-family: 'Poppins', Arial, sans-serif;
    font-weight: 500;
    font-size: 13px;
    outline: none;
    padding: 10px 16px;
    text-align: center;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    width: var(--toggle-button-width);
    min-width: var(--toggle-button-width);
    max-width: var(--toggle-button-width);
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    background-image: linear-gradient(45deg, 
        rgba(167, 243, 208, 0.1) 0%, 
        rgba(196, 181, 253, 0.1) 25%, 
        rgba(252, 165, 165, 0.1) 50%, 
        rgba(254, 240, 138, 0.1) 75%, 
        rgba(165, 243, 252, 0.1) 100%);
    background-size: 300% 300%;
    animation: glassAurora 8s ease-in-out infinite;
}

@keyframes glassAurora {
    0%, 100% { background-position: 0% 0%; }
    33% { background-position: 100% 0%; }
    66% { background-position: 100% 100%; }
}

.map-toggle-button:hover {
    transform: scale(1.02);
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.35), 
                inset 0 1px 0 rgba(255, 255, 255, 0.5),
                0 0 0 1px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(25px) saturate(200%);
    background-image: linear-gradient(45deg, 
        rgba(167, 243, 208, 0.15) 0%, 
        rgba(196, 181, 253, 0.15) 25%, 
        rgba(252, 165, 165, 0.15) 50%, 
        rgba(254, 240, 138, 0.15) 75%, 
        rgba(165, 243, 252, 0.15) 100%);
}

.map-toggle-button:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

.map-toggle-button:focus {
    outline: none;
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.35), 
                inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.map-toggle-button.active {
    background: rgba(191, 219, 254, 0.18);
    border: 1px solid rgba(191, 219, 254, 0.35);
    color: #ffffff;
    box-shadow: 0 12px 40px rgba(191, 219, 254, 0.25), 
                inset 0 1px 0 rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(25px) saturate(200%);
    background-image: linear-gradient(135deg, 
        rgba(191, 219, 254, 0.12) 0%, 
        rgba(219, 234, 254, 0.08) 50%, 
        rgba(239, 246, 255, 0.12) 100%);
    background-size: 200% 200%;
    animation: blueGlassShimmer 6s ease-in-out infinite;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    -webkit-text-stroke: 0.5px rgba(0, 0, 0, 0.4);
    text-stroke: 0.5px rgba(0, 0, 0, 0.4);
}

@keyframes blueGlassShimmer {
    0%, 100% { background-position: 0% 0%; }
    50% { background-position: 100% 100%; }
}

.map-toggle-button.active:hover {
    transform: scale(1.02);
    background: rgba(191, 219, 254, 0.22);
    border: 1px solid rgba(191, 219, 254, 0.45);
    color: #ffffff;
    box-shadow: 0 16px 48px rgba(191, 219, 254, 0.3), 
                inset 0 1px 0 rgba(255, 255, 255, 0.5);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    -webkit-text-stroke: 0.5px rgba(0, 0, 0, 0.5);
    text-stroke: 0.5px rgba(0, 0, 0, 0.5);
}

.map-toggle-button.active:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

.map-toggle-button.active:focus {
    outline: none;
    box-shadow: 0 16px 48px rgba(191, 219, 254, 0.3), 
                inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.map-toggle-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
    animation: none;
    background-image: none;
    transform: none;
}

.leaflet-control-zoom.leaflet-bar {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

.leaflet-control-zoom.leaflet-bar a {
  background: rgba(255, 255, 255, 0.15) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: none !important;
  color: rgba(17, 17, 17, 0.7) !important;
  font-weight: 400 !important;
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  transition: all 0.25s ease !important;
}

.leaflet-control-zoom-in {
  border-top-left-radius: 12px !important;
  border-top-right-radius: 12px !important;
}

.leaflet-control-zoom-out {
  border-bottom-left-radius: 12px !important;
  border-bottom-right-radius: 12px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.leaflet-control-zoom.leaflet-bar a:hover {
  background: rgba(255, 255, 255, 0.25) !important;
  color: rgba(17, 17, 17, 0.9) !important;
  box-shadow: none !important;
  transform: none !important;
}

.leaflet-control-zoom.leaflet-bar a:active {
  transform: scale(0.96) !important;
  box-shadow: none !important;
}

.leaflet-control-zoom.leaflet-bar a.leaflet-disabled {
  opacity: 0.4 !important;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: none !important;
}

.map-toggle-button,
.quality-toggle-btn {
  width: var(--toggle-button-width);
  min-width: var(--toggle-button-width);
  max-width: var(--toggle-button-width);
  height: auto;         
  min-height: unset;    
  line-height: 1.2;
  padding: 10px 16px;  
}
