/* --- Voice Search Modal --- */
#wmvs-modal {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: #111;
    color: #fff;
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 999999;
}

#wmvs-modal.active {
    display: flex;
}

#wmvs-mic {
    width: 130px;
    height: 130px;
    border-radius: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #E8F5E9;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(76, 175, 80, .6); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 30px rgba(76, 175, 80, 0); }
    100% { transform: scale(1); }
}

#wmvs-text {
    margin-top: 20px;
    font-size: 24px;
    font-weight: 600;
    color: #ccc !important;
}

#wmvs-stop {
    margin-top: 30px;
    padding: 15px 40px;
    border: none;
    border-radius: 100px;
    background: #00C853;
    color: #fff;
    font-size: 17px;
    cursor: pointer;
}

.wmvs-box {
    text-align: center;
    animation: popup .35s ease;
}

@keyframes popup {
    0% { opacity: 0; transform: scale(.8); }
    100% { opacity: 1; transform: scale(1); }
}

.wmvs-waves {
    position: relative;
    width: 180px;
    height: 180px;
    margin: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.wave {
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 3px solid #4CAF50;
    animation: wave 2s infinite;
    opacity: .4;
}

.wave2 { animation-delay: .5s; }
.wave3 { animation-delay: 1s; }

@keyframes wave {
    0% { transform: scale(.5); opacity: .8; }
    100% { transform: scale(1.8); opacity: 0; }
}

#wmvs-close {
    position: absolute;
    right: 30px;
    top: 25px;
    font-size: 30px;
    cursor: pointer;
}

/* --- Search Form Icons --- */
.wmvs-btn {
    position: absolute !important;
    top: 50%;
    transform: translateY(-50%);
    background: transparent !important;
    border: none;
    cursor: pointer;
    padding: 0 !important;
    color: #333; /* Default icon color */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.wmvs-btn:hover {
    color: #007cba; /* Hover color */
}

/* --- Tooltip Styling --- */
.wmvs-btn[data-tooltip] {
    position: absolute;
}

.wmvs-btn[data-tooltip]:hover::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -32px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    pointer-events: none; /* So it doesn't interfere with clicking */
}

.wmvs-btn[data-tooltip]:hover::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-bottom-color: #333;
    z-index: 9999;
    pointer-events: none;
}

/* Mini Spinner for Image Search */
.wmvs-mini-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #ccc;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}