/* VitePos Voice AI v4 — Real-time Voice Ordering with Product Catalog */

/* ---------- MIC BUTTON ---------- */
#vva-mic-container {
    position: fixed;
    bottom: 100px;
    right: 20px;
    z-index: 99999;
}
.vva-mic-btn {
    width: 60px; height: 60px;
    border-radius: 50%;
    border: none;
    background: #00ACC1;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,172,193,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
.vva-mic-btn:hover { transform: scale(1.1); box-shadow: 0 6px 20px rgba(0,172,193,0.6); }
.vva-mic-btn.vva-recording {
    background: #f44336;
    animation: vva-pulse-ring 1.5s infinite;
}
@keyframes vva-pulse-ring {
    0% { box-shadow: 0 0 0 0 rgba(244,67,54,0.5); }
    70% { box-shadow: 0 0 0 15px rgba(244,67,54,0); }
    100% { box-shadow: 0 0 0 0 rgba(244,67,54,0); }
}

/* ---------- MODAL ---------- */
.vva-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.vva-modal-content {
    background: #fff;
    border-radius: 16px;
    width: 92%;
    max-width: 500px;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

/* ---------- HEADER ---------- */
.vva-modal-header {
    padding: 14px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    background: #fff;
}
.vva-status-text { font-size: 14px; font-weight: 600; color: #333; }
.vva-close-btn {
    background: none; border: none;
    font-size: 26px; color: #999;
    cursor: pointer; line-height: 1;
}
.vva-close-btn:hover { color: #333; }

/* ---------- BODY (scrollable) ---------- */
.vva-modal-body {
    padding: 16px 20px;
    min-height: 120px;
    overflow-y: auto;
    flex: 1;
}

/* Pulse */
.vva-pulse {
    width: 32px; height: 32px;
    margin: 0 auto 12px;
    background: #f44336;
    border-radius: 50%;
    animation: vva-pulse-wave 1.2s ease-in-out infinite;
}
@keyframes vva-pulse-wave {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.3); opacity: 0.4; }
}

/* Transcript */
.vva-transcript {
    font-size: 15px;
    color: #555;
    margin-bottom: 10px;
    font-style: italic;
    min-height: 22px;
    line-height: 1.5;
    text-align: center;
    background: #f9fafb;
    border-radius: 8px;
    padding: 8px 12px;
}
.vva-transcript em { color: #999; }

/* Section titles */
.vva-section-title {
    font-size: 13px;
    font-weight: 700;
    color: #333;
    padding: 8px 0 4px;
    border-bottom: 2px solid #00ACC1;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ---------- SUGGESTIONS ---------- */
.vva-suggestion-list { margin-bottom: 6px; }
.vva-suggestion-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    margin-bottom: 4px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    font-size: 13px;
    gap: 8px;
}
.vva-sugg-img {
    width: 32px; height: 32px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}
.vva-sugg-info { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; flex: 1; }
.vva-sugg-name { font-weight: 700; color: #166534; }
.vva-sugg-qty { color: #555; font-weight: 600; }
.vva-sugg-price { color: #00ACC1; font-weight: 700; }
.vva-sugg-actions { display: flex; gap: 4px; flex-shrink: 0; }

.vva-btn-sm {
    padding: 4px 10px;
    border-radius: 6px;
    border: none;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.vva-btn-add { background: #16a34a; color: #fff; }
.vva-btn-add:hover { background: #15803d; }
.vva-btn-reject { background: #e5e7eb; color: #666; }
.vva-btn-reject:hover { background: #d1d5db; }

.vva-voice-hint {
    font-size: 11px;
    color: #888;
    text-align: center;
    padding: 2px 0 6px;
    font-style: italic;
}

/* Badge */
.vva-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
}
.vva-badge-warn { background: #fef3c7; color: #92400e; }
.vva-badge-ok { background: #dcfce7; color: #166534; }

/* ---------- CART ---------- */
.vva-cart { margin-top: 2px; }
.vva-cart-list { max-height: 160px; overflow-y: auto; }
.vva-cart-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 13px;
}
.vva-cart-row:last-child { border-bottom: none; }
.vva-cart-name { flex: 1; font-weight: 600; color: #333; }
.vva-cart-qty { color: #666; min-width: 28px; text-align: center; }
.vva-cart-price { color: #00ACC1; font-weight: 700; min-width: 55px; text-align: right; }
.vva-cart-del {
    background: none; border: none;
    color: #f87171; font-size: 18px;
    cursor: pointer; line-height: 1; padding: 0 2px;
}
.vva-cart-del:hover { color: #dc2626; }
.vva-cart-sum {
    font-size: 14px;
    font-weight: 700;
    text-align: right;
    padding: 6px 8px 0;
    border-top: 2px solid #00ACC1;
    margin-top: 4px;
    color: #00ACC1;
}
.vva-cart-empty-state {
    text-align: center;
    color: #aaa;
    font-size: 13px;
    padding: 20px 0;
    font-style: italic;
}

/* ---------- FOOTER ---------- */
.vva-modal-footer {
    padding: 10px 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    flex-shrink: 0;
    background: #fff;
}
.vva-btn {
    padding: 8px 18px;
    border-radius: 8px;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.vva-btn-primary { background: #00ACC1; color: #fff; }
.vva-btn-primary:hover { background: #008ba3; }
.vva-btn-secondary { background: #f3f4f6; color: #666; }
.vva-btn-secondary:hover { background: #e5e7eb; }
