/* Route Manager - Compact glassmorphism style */

/* Google Places Autocomplete dropdown - must be above panel */
.pac-container {
    z-index: 9999 !important;
    background: rgba(20, 20, 40, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(139, 92, 246, 0.4) !important;
    border-radius: 12px !important;
    margin-top: 4px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
}

.pac-item {
    padding: 10px 14px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    cursor: pointer !important;
}

.pac-item:hover {
    background: rgba(139, 92, 246, 0.3) !important;
}

.pac-item-query {
    color: #fff !important;
    font-weight: 600 !important;
}

.pac-matched {
    color: rgba(139, 92, 246, 1) !important;
    font-weight: 700 !important;
}

.pac-icon {
    display: none !important;
}

/* Floating button */
.route-manager-btn {
    position: fixed !important;
    right: -160px !important;
    top: 60% !important;
    transform: translateY(-50%) !important;
    z-index: 950 !important;
    
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.6) 0%, rgba(139, 92, 246, 0.6) 100%) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 12px 0 0 12px !important;
    border-right: none !important;
    
    padding: 12px 14px !important;
    cursor: pointer !important;
    
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    
    box-shadow: -4px 0 20px rgba(255, 0, 255, 0.4), 0 0 40px rgba(139, 92, 246, 0.3) !important;
    
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    
    color: #fff !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5) !important;
    
    user-select: none !important;
    -webkit-user-select: none !important;
}

.route-manager-btn:not(.hidden) {
    right: 0 !important;
}

.route-manager-btn:hover {
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.8) 0%, rgba(139, 92, 246, 0.8) 100%) !important;
    box-shadow: -6px 0 30px rgba(255, 0, 255, 0.6), 0 0 60px rgba(139, 92, 246, 0.5) !important;
    transform: translateY(-50%) translateX(-4px) !important;
}

.route-manager-icon {
    font-size: 18px !important;
    filter: drop-shadow(0 0 8px rgba(255, 0, 255, 0.8)) !important;
}

.route-manager-text {
    white-space: nowrap !important;
    font-size: 13px !important;
    letter-spacing: 0.5px !important;
}

/* Route Manager Panel - Compact glassmorphism */
.route-manager-panel {
    position: fixed !important;
    top: 520px !important;
    right: -380px !important;
    width: 340px !important;
    max-height: calc(100vh - 40px) !important;
    
    /* Multiple layer glassmorphism effect */
    background: 
        linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%),
        linear-gradient(180deg, rgba(139, 92, 246, 0.15) 0%, rgba(255, 0, 255, 0.05) 100%),
        rgba(20, 20, 40, 0.5) !important;
    backdrop-filter: blur(4px) saturate(180%) brightness(1.1) !important;
    -webkit-backdrop-filter: blur(40px) saturate(180%) brightness(1.1) !important;
    
    border-radius: 24px !important;
    
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.5), 
        0 0 100px rgba(139, 92, 246, 0.4),
        0 0 150px rgba(255, 0, 255, 0.2) !important;
    
    transition: right 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
    z-index: 9998 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

.route-manager-panel.visible {
    right: 20px !important;
}

/* Add Stop Form - Compact */
.add-stop-form {
    padding: 9px 12px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(255, 0, 255, 0.05) 100%) !important;
}

.add-stop-input-group {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
}

.add-stop-input {
    width: 100% !important;
    padding: 14px 18px !important;
    background: rgb(233 8 186 / 15%) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 0px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 16px !important;
    color: #fff !important;
    font-size: 15px !important;
    outline: none !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-sizing: border-box !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) inset !important;
}

.add-stop-input:focus {
    background: rgba(255, 255, 255, 0.18) !important;
    border-color: rgba(139, 92, 246, 0.8) !important;
    box-shadow: 
        0 0 0 4px rgba(139, 92, 246, 0.3),
        0 4px 15px rgba(0, 0, 0, 0.2) inset !important;
}

.add-stop-input::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

.add-stop-btn {
    width: 100% !important;
    padding: 6px 14px !important;
    background: linear-gradient(135deg, #ff00ff 0%, #8b5cf6 50%, #00d4ff 100%) !important;
    background-size: 200% 100% !important;
    border: none !important;
    border-radius: 16px !important;
    color: #fff !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 6px 25px rgba(139, 92, 246, 0.4) !important;
    letter-spacing: 0.8px !important;
    text-transform: uppercase !important;
}

.add-stop-btn:hover:not(:disabled) {
    background-position: 100% 0 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.6) !important;
}

.add-stop-btn:active:not(:disabled) {
    transform: translateY(0) !important;
}

.add-stop-btn:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* Stops List - Compact */
.stops-list {
    flex: 1 !important;
    overflow-y: auto !important;
    padding: 9px 12px 9px 12px !important;
}

.stops-list::-webkit-scrollbar {
    width: 6px !important;
}

.stops-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05) !important;
    border-radius: 3px !important;
}

.stops-list::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.4) !important;
    border-radius: 3px !important;
}

.stops-list::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.6) !important;
}

/* Stop Item - Compact */
.stop-item {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 3px 4px !important;
    margin-bottom: 10px !important;
    background: rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border-radius: 14px !important;
    cursor: move !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
}

.stop-item:hover {
    background: rgba(255, 255, 255, 0.18) !important;
    border-color: rgba(139, 92, 246, 0.6) !important;
    transform: translateX(-6px) !important;
    box-shadow: 
        0 4px 20px rgba(139, 92, 246, 0.4),
        0 0 30px rgba(255, 0, 255, 0.2) !important;
}

.stop-item.dragging {
    opacity: 0.6 !important;
    cursor: grabbing !important;
    transform: scale(1.05) !important;
}

.stop-item.drag-over {
    border-color: rgba(139, 92, 246, 0.7) !important;
    background: rgba(139, 92, 246, 0.2) !important;
    box-shadow: 0 0 25px rgba(139, 92, 246, 0.5) !important;
}

.stop-drag-handle {
    cursor: move !important;
    color: rgba(255, 255, 255, 0.5) !important;
    font-size: 18px !important;
    padding: 4px !important;
    transition: all 0.3s !important;
}

.stop-item:hover .stop-drag-handle {
    color: rgba(139, 92, 246, 0.9) !important;
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.7)) !important;
}

.stop-index {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 28px !important;
    height: 28px !important;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.4), rgba(255, 0, 255, 0.3)) !important;
    border: 1.5px solid rgba(139, 92, 246, 0.5) !important;
    border-radius: 10px !important;
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 10px rgba(139, 92, 246, 0.3) !important;
}

.stop-content {
    flex: 1 !important;
    min-width: 0 !important;
}

.stop-address {
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    margin-bottom: 4px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    letter-spacing: -0.2px !important;
}

.stop-coords {
    color: rgba(255, 255, 255, 0.5) !important;
    font-size: 11px !important;
    font-family: 'Courier New', monospace !important;
    font-weight: 500 !important;
}

.stop-remove {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    height: 28px !important;
    background: rgba(255, 59, 48, 0.25) !important;
    border: 1.5px solid rgba(255, 59, 48, 0.5) !important;
    border-radius: 10px !important;
    color: #ff3b30 !important;
    font-size: 16px !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    margin-left: auto !important;
}

.stop-remove:hover {
    background: rgba(255, 59, 48, 0.45) !important;
    transform: scale(1.15) rotate(90deg) !important;
    box-shadow: 0 0 20px rgba(255, 59, 48, 0.6) !important;
}

/* Empty State - Compact */
.stops-empty {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 60px 20px !important;
    text-align: center !important;
    color: rgba(255, 255, 255, 0.5) !important;
}

.stops-empty-icon {
    font-size: 48px !important;
    margin-bottom: 16px !important;
    opacity: 0.6 !important;
    filter: drop-shadow(0 0 15px rgba(139, 92, 246, 0.4)) !important;
}

.stops-empty-text {
    font-size: 14px !important;
    line-height: 1.6 !important;
    font-weight: 500 !important;
    letter-spacing: -0.2px !important;
}

/* Mobile Adaptations */
@media (max-width: 768px) {
    .route-manager-panel {
        width: 90vw !important;
        right: -90vw !important;
        top: 10px !important;
        max-height: calc(100vh - 20px) !important;
    }
    
    .route-manager-panel.visible {
        right: 5vw !important;
    }
}

@media (max-width: 480px) {
    .route-manager-btn {
        right: -140px !important;
        padding: 10px 12px !important;
    }
    
    .route-manager-panel {
        width: 100vw !important;
        right: -100vw !important;
        top: 0 !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
    }
    
    .route-manager-panel.visible {
        right: 0 !important;
    }
}
