/* Smart Bottom Controls - Independent Floating Buttons */

/* Base button styles */
.smart-control-btn {
    position: fixed;
    bottom: -100px; /* Initially hidden below screen */
    z-index: 950;
    
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 2px solid;
    
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.4);
    user-select: none;
    -webkit-user-select: none;
    
    backdrop-filter: blur(10px);
}

/* Show button (slide up from bottom) */
.smart-control-btn:not(.hidden) {
    bottom: 20px;
}

.smart-control-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

.smart-control-btn:active {
    transform: translateY(-2px);
}

.smart-control-icon {
    font-size: 22px;
}

.smart-control-text {
    white-space: nowrap;
    font-size: 14px;
    letter-spacing: 0.3px;
}

/* Apply Location Button - Left position */
#apply-location-btn {
    left: 50%;
    transform: translateX(-50%);
    margin-left: -180px; /* Offset to left */
}

#apply-location-btn:not(.hidden) {
    bottom: 20px;
}

#apply-location-btn.btn-primary {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.95) 0%, rgba(21, 101, 192, 0.95) 100%);
    border-color: rgba(33, 150, 243, 0.8);
    color: #fff;
}

#apply-location-btn.btn-primary:hover {
    background: linear-gradient(135deg, rgba(33, 150, 243, 1) 0%, rgba(21, 101, 192, 1) 100%);
    border-color: rgba(33, 150, 243, 1);
    box-shadow: 0 -4px 24px rgba(33, 150, 243, 0.6);
}

/* Start Route Button - Center position */
#start-route-btn {
    left: 50%;
    transform: translateX(-50%);
}

#start-route-btn:not(.hidden) {
    bottom: 20px;
}

#start-route-btn.btn-success {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.95) 0%, rgba(56, 142, 60, 0.95) 100%);
    border-color: rgba(76, 175, 80, 0.8);
    color: #fff;
}

#start-route-btn.btn-success:hover {
    background: linear-gradient(135deg, rgba(76, 175, 80, 1) 0%, rgba(56, 142, 60, 1) 100%);
    border-color: rgba(76, 175, 80, 1);
    box-shadow: 0 -4px 24px rgba(76, 175, 80, 0.6);
}





/* Mobile adaptations */
@media (max-width: 768px) {
    .smart-control-btn {
        padding: 12px 18px;
        font-size: 13px;
        border-radius: 10px;
    }
    
    .smart-control-icon {
        font-size: 18px;
    }
    
    .smart-control-text {
        font-size: 12px;
    }
    
    /* Stack buttons vertically on mobile */
    #apply-location-btn {
        margin-left: 0;
        bottom: -100px;
    }
    
    #apply-location-btn:not(.hidden) {
        bottom: 130px; /* Top button */
    }
    
    #start-route-btn {
        bottom: -100px;
    }
    
    #start-route-btn:not(.hidden) {
        bottom: 90px; /* Second button */
    }
}

@media (max-width: 480px) {
    .smart-control-btn {
        padding: 10px 16px;
        font-size: 12px;
        min-width: 140px;
    }
    
    .smart-control-icon {
        font-size: 16px;
    }
    
    .smart-control-text {
        font-size: 11px;
    }
    
    #apply-location-btn:not(.hidden) {
        bottom: 115px;
    }
    
    #start-route-btn:not(.hidden) {
        bottom: 80px;
    }
}

/* Tablet landscape - adjust spacing */
@media (min-width: 769px) and (max-width: 1024px) {
    #apply-location-btn {
        margin-left: -160px;
    }
}

/* Large screens - more spacing */
@media (min-width: 1400px) {
    #apply-location-btn {
        margin-left: -220px;
    }
}

/* Animation for button appearance */
@keyframes slideUpIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
