/* ===== SofIA Quick Canvas — modal compacto para wake word ===== */

.sofia-quick-container {
    min-width: 460px;
    max-width: 560px;
    background: rgba(255, 255, 255, 0.55);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    backdrop-filter: blur(14px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.sofia-quick-overlay {
    background: rgba(0, 0, 0, 0.18);
}

.sofia-quick-header h5 {
    gap: 12px;
}

.sofia-quick-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(0, 120, 212, 0.3);
    box-shadow: 0 2px 6px rgba(0, 120, 212, 0.18);
}

.sofia-mic-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 0.85rem;
    margin-left: 4px;
    transition: all 0.2s ease;
}

.sofia-mic-badge.is-on {
    background: #2A70B0;
    color: white;
    box-shadow: 0 0 0 0 rgba(42, 112, 176, 0.6);
    animation: sofiaMicPulse 1.4s ease-out infinite;
}

.sofia-mic-badge.is-off {
    background: rgba(96, 94, 92, 0.12);
    color: #605e5c;
}

@keyframes sofiaMicPulse {
    0%   { box-shadow: 0 0 0 0 rgba(42, 112, 176, 0.55); }
    70%  { box-shadow: 0 0 0 10px rgba(42, 112, 176, 0); }
    100% { box-shadow: 0 0 0 0 rgba(42, 112, 176, 0); }
}

/* Body */
.sofia-quick-body {
    padding: 20px 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sofia-exchange {
    min-height: 120px;
    max-height: 280px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 4px 4px 0;
}

.exchange-row {
    display: flex;
}

.exchange-user {
    justify-content: flex-end;
}

.exchange-bot {
    justify-content: flex-start;
}

.exchange-bubble {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.45;
    max-width: 85%;
    word-wrap: break-word;
}

.exchange-user .exchange-bubble {
    background: #0078d4;
    color: white;
    border-bottom-right-radius: 4px;
}

.exchange-bot .exchange-bubble {
    background: rgba(243, 242, 241, 0.85);
    color: #323130;
    border-bottom-left-radius: 4px;
}

.exchange-bot .exchange-bubble p:first-child { margin-top: 0; }
.exchange-bot .exchange-bubble p:last-child  { margin-bottom: 0; }
.exchange-bot .exchange-bubble ul { padding-left: 18px; margin: 6px 0; }

.exchange-thinking {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 12px 14px;
}

.exchange-thinking .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #605e5c;
    opacity: 0.4;
    animation: sofiaThinkingDot 1.2s ease-in-out infinite;
}

.exchange-thinking .dot:nth-child(2) { animation-delay: 0.15s; }
.exchange-thinking .dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes sofiaThinkingDot {
    0%, 60%, 100% { opacity: 0.4; transform: translateY(0); }
    30%           { opacity: 1;   transform: translateY(-3px); }
}

.sofia-quick-placeholder {
    color: #605e5c;
    font-style: italic;
    font-size: 0.9rem;
    text-align: center;
    padding: 18px 8px;
}

/* Input row */
.sofia-quick-input {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 4px;
}

.sofia-quick-input .sofia-input {
    flex: 1;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 0.92rem;
}

.btn-sofia-icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid #d2d0ce;
    background: white;
    color: #323130;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-sofia-icon:hover:not(:disabled) {
    border-color: #0078d4;
    color: #0078d4;
}

.btn-sofia-icon:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-sofia-icon.is-on {
    background: #2A70B0;
    border-color: #2A70B0;
    color: white;
}

.btn-sofia-icon.is-on:hover {
    background: #225d92;
    border-color: #225d92;
    color: white;
}

.btn-sofia-send {
    background: #0078d4;
    border-color: #0078d4;
    color: white;
}

.btn-sofia-send:hover:not(:disabled) {
    background: #106ebe;
    border-color: #106ebe;
    color: white;
}

.sofia-quick-footer {
    padding: 14px 24px;
}

@media (max-width: 768px) {
    .sofia-quick-container {
        min-width: unset;
        max-width: calc(100vw - 32px);
    }
}
