﻿
/* ?? Voice Command Bar ???????????????????????????????????????????????????? */
.vc-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: rgba(30, 30, 40, 0.92);
    backdrop-filter: blur(6px);
    border-top: 1px solid rgba(255,255,255,0.1);
    min-height: 52px;
}

.vc-mic-btn {
    font-size: 1.4rem;
    line-height: 1;
    padding: 0.25rem 0.5rem;
    border-radius: 50%;
    transition: transform 0.15s;
}

    .vc-mic-btn:hover {
        transform: scale(1.15);
    }

/* Pulsing ring while listening */
@keyframes vc-pulse-ring {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }

    70% {
        box-shadow: 0 0 0 12px rgba(220, 53, 69, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

.vc-pulse {
    animation: vc-pulse-ring 1s ease-out infinite;
}

.vc-transcript {
    max-width: 50%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 0.9rem;
}

/* ?? Action Button Styles ????????????????????????????????????????????????? */
.vc-hint {
    font-size: 0.75rem;
    color: #6c757d;
    text-align: center;
    margin-top: 0.3rem;
}

/* Flash animation when a button is matched by voice */
@keyframes vc-matched-flash {
    0% {
        outline: 4px solid #ffc107;
        transform: scale(1);
    }

    50% {
        outline: 4px solid #ffc107;
        transform: scale(1.08);
    }

    100% {
        outline: none;
        transform: scale(1);
    }
}

.vc-matched {
    animation: vc-matched-flash 0.6s ease-in-out;
}

/* Extra bottom padding so page content isn't hidden behind the bar */
body {
    padding-bottom: 70px;
}

/* ?? Voice Command Table ??????????????????????????????????????????????????? */
.vc-command-table {
    position: fixed;
    bottom: 60px;
    right: 1rem;
    z-index: 1049;
    background: rgba(30, 30, 40, 0.95);
    border: 1px solid rgba(255, 193, 7, 0.4);
    border-radius: 8px;
    min-width: 260px;
    max-height: 60vh;
    overflow-y: auto;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.25s, transform 0.25s;
}

body.vc-active .vc-command-table {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.vc-command-table-header {
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #ffc107;
    border-bottom: 1px solid rgba(255, 193, 7, 0.3);
    letter-spacing: 0.04em;
}

.vc-command-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.vc-command-table th {
    padding: 0.3rem 0.75rem;
    color: rgba(255,255,255,0.4);
    font-weight: 500;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.vc-command-table td {
    padding: 0.3rem 0.75rem;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

    .vc-command-table td:last-child {
        color: #ffc107;
        font-style: italic;
    }

.vc-command-table tr:last-child td {
    border-bottom: none;
}

/* Voice label tooltip injected before each button on first mic press */
.vc-label {
    display: inline-block;
    position: absolute;
    transform: translateY(-110%);
    background: rgba(30, 30, 40, 0.92);
    color: #ffc107;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    border: 1px solid rgba(255, 193, 7, 0.4);
    opacity: 0;
    transition: opacity 0.2s;
}

/* Show labels while mic is active */
body.vc-active .vc-label {
    opacity: 1;
}

/* Make parent position:relative so the label positions above the button */
.vc-label + button,
.vc-label + a,
.vc-label + input {
    position: relative;
}


