/* Enhanced hover and focus states */
#suggestionPopup .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.15);
}

#suggestionPopup .form-control:hover {
    border-color: #667eea;
}

#closeSuggestion:hover {
    opacity: 1 !important;
    transform: scale(1.1);
}

/* Smooth show animation */
#suggestionPopup.show {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

#suggestionOverlay.show {
    opacity: 1;
}

/* Button hover effects */
#suggestionForm button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4) !important;
    transition: all 0.2s;
}

#cancelSuggestion:hover {
    background-color: #e9ecef;
}
.buy-now .btn-buy-now{
    border-radius: 100%;
}
/* Floating Button Animation (icon expand effect) */

.btn-buy-now { 
    position: relative; 
    display: flex; 
    text-align: center;
    align-items: center; 
    justify-content: center; 
    gap: .5rem; 
    overflow: hidden; 
    width: 3.2rem; 
    height: 3.2rem; 
    border-radius: 50%; 
    transition: all 0.3s ease; 
    white-space: nowrap; 
    border: none; 
}

/* Hide text initially */
.btn-buy-now .btn-text {
    text-align: center;
    align-items: center;
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    color: white;
}

/* Hover: expand the button and show text */
.btn-buy-now:hover:not(.is-open) {
    width: 10rem; /* expand width */
    border-radius: 50px;
    padding-left: 0.75rem; /* reveal space for text without shifting icon */
}

/* Reveal text smoothly */
.btn-buy-now:hover:not(.is-open) .btn-text {
    opacity: 1;
    max-width: 100px;
}

/* When popup is open, keep it circular close icon */
.btn-buy-now.is-open {
    width: 3.2rem !important;
    height: 3.2rem !important;
    border-radius: 50% !important;
    justify-content: center !important; /* ensure icon stays centered */
}
.btn-buy-now.is-open .btn-text { display: none !important; }

/* Icon adjustment */
.btn-buy-now i {
    margin-left: 5px;
    font-size: 1.3rem;
    color: white;
    transition: transform 0.3s ease;
}

/* Slight icon hover motion */
.btn-buy-now:hover i {
    transform: scale(1.1);
}

/* Position the floating button */
.buy-now {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 2147483600;
}

/* --- Attention animations --- */

/* Subtle horizontal shake */
@keyframes shakeButton {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

/* Gentle expand / pulse effect */
@keyframes pulseExpand {
    0%, 100% {
        width: 3.2rem;
        border-radius: 50%;
        box-shadow: none;
    }
    50% {
        width: 9.5rem;
        border-radius: 50px;
        box-shadow: 0 0 15px rgba(102, 126, 234, 0.4);
    }
}

/* Utility classes (triggered dynamically) */
.btn-buy-now.shake {
    animation: shakeButton 0.6s ease-in-out;
}

.btn-buy-now.expand-notify {
    animation: pulseExpand 1.5s ease-in-out;
}
