/* seek-voice.css - nút tìm kiếm bằng giọng nói cho form #fsea_seek */
#fsea_seek .form-group { position: relative; }
#fsea_seek #key_seek { padding-right: 48px; }

#fsea_seek .voice-btn {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #08a91a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    -webkit-appearance: none;
    appearance: none;
    transition: background .2s, color .2s;
}
#fsea_seek .voice-btn:hover { background: #f0f0f0; color: #333; }
#fsea_seek .voice-btn:focus { outline: 2px solid #9ec5fe; outline-offset: 1px; }

#fsea_seek .voice-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    display: block;
    pointer-events: none;
}

/* Đang nghe */
#fsea_seek .voice-btn.listening {
    background: #e74c3c;
    color: #fff;
    animation: voicePulse 1.2s infinite;
}
@-webkit-keyframes voicePulse {
    0%   { box-shadow: 0 0 0 0 rgba(231,76,60,.5); }
    70%  { box-shadow: 0 0 0 12px rgba(231,76,60,0); }
    100% { box-shadow: 0 0 0 0 rgba(231,76,60,0); }
}
@keyframes voicePulse {
    0%   { box-shadow: 0 0 0 0 rgba(231,76,60,.5); }
    70%  { box-shadow: 0 0 0 12px rgba(231,76,60,0); }
    100% { box-shadow: 0 0 0 0 rgba(231,76,60,0); }
}

/* Đang xử lý (chờ server nhận dạng) */
#fsea_seek .voice-btn.busy { cursor: wait; background: transparent; }
#fsea_seek .voice-btn.busy svg { display: none; }
#fsea_seek .voice-btn.busy::after {
    content: "";
    width: 18px;
    height: 18px;
    border: 2px solid #ccc;
    border-top-color: #333;
    border-radius: 50%;
    animation: voiceSpin .8s linear infinite;
}
@-webkit-keyframes voiceSpin { to { -webkit-transform: rotate(360deg); } }
@keyframes voiceSpin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
    #fsea_seek .voice-btn.listening { animation: none; }
}
