/* GlowBay Smart Search - Frontend Enhancements */

/* Voice Search Button */
.gb-voice-search-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.2s ease;
    height: 100%;
}
.gb-voice-search-btn:hover {
    color: #ff2b85;
}
.gb-voice-search-btn svg, .gb-voice-search-btn i {
    width: 18px;
    height: 18px;
    font-size: 16px;
    fill: currentColor;
}
.gb-voice-search-btn.listening, .gbd-voice-search-btn.listening, .gbm-fs-voice-btn.listening, .gbm-capsule-mic-btn.listening {
    color: #ef4444 !important;
    animation: gb-voice-pulse 1.2s infinite ease-in-out;
}

@keyframes gb-voice-pulse {
    0% { transform: scale(1); filter: drop-shadow(0 0 2px rgba(239, 68, 68, 0.4)); }
    50% { transform: scale(1.2); filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.8)); }
    100% { transform: scale(1); filter: drop-shadow(0 0 2px rgba(239, 68, 68, 0.4)); }
}

/* Quick Add-to-Cart on Search Cards */
.gb-search-quick-atc {
    background: #FF7A00;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
    padding: 5px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(255, 122, 0, 0.25);
}
.gb-search-quick-atc:hover {
    background: #EA580C;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(255, 122, 0, 0.35);
}
.gb-search-quick-atc.loading {
    opacity: 0.7;
    pointer-events: none;
}
.gb-search-quick-atc.added {
    background: #10B981 !important;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

/* Trust & Stock Badges */
.gb-badge-stock {
    font-size: 9.5px;
    font-weight: 850;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    letter-spacing: 0.2px;
}
.gb-badge-stock.in {
    background: #DCFCE7;
    color: #15803D;
    border: 1px solid #BBF7D0;
}
.gb-badge-stock.pre {
    background: #FEF3C7;
    color: #B45309;
    border: 1px solid #FDE68A;
}
.gb-badge-origin {
    font-size: 9.5px;
    font-weight: 850;
    color: #0284C7;
    background: #E0F2FE;
    border: 1px solid #BAE6FD;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
}

/* Keyboard Navigation Highlight */
.gb-srch-item-link.keyboard-active,
.gbm-fs-prod-card.keyboard-active {
    background: #FFF5EE !important;
    border-color: #FED7AA !important;
    outline: 2px solid #FF7A00 !important;
}

/* Voice Active Toast */
.gb-voice-toast {
    position: fixed;
    bottom: 85px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.94);
    color: #fff;
    padding: 12px 24px;
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 700;
    z-index: 9999999;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    white-space: nowrap;
}
.gb-voice-toast .wave-dot {
    width: 10px;
    height: 10px;
    background: #EF4444;
    border-radius: 50%;
    animation: gb-wave 1s infinite alternate;
}
@keyframes gb-wave {
    from { opacity: 0.3; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1.4); }
}
