/* MG Professional Experience Assistant — spacious responsive layout */
#mg-ai-toggle{position:fixed;right:24px;bottom:24px;z-index:99990;background:#b99342;color:#071b34;border:1px solid #e5c778;border-radius:999px;padding:14px 20px;font:600 14px 'Segoe UI',Arial,sans-serif;box-shadow:0 8px 28px #071b3440;cursor:pointer}
#mg-ai-panel{box-sizing:border-box;position:fixed;right:24px;bottom:88px;width:min(620px,calc(100vw - 48px));height:min(740px,calc(100dvh - 116px));background:#fff;color:#142033;z-index:99991;border-radius:18px;box-shadow:0 12px 48px #071b3450;display:none;flex-direction:column;overflow:hidden;border:1px solid #dce5ef;font:15px 'Segoe UI',Arial,sans-serif}
#mg-ai-panel *,#mg-ai-panel *::before,#mg-ai-panel *::after{box-sizing:border-box}
#mg-ai-panel.mg-open{display:flex}
#mg-ai-head{background:#071b34;color:#fff;padding:19px 22px;display:flex;justify-content:space-between;align-items:center;gap:12px;flex-shrink:0}
#mg-ai-head strong{font-size:17px;line-height:1.3}#mg-ai-head small{display:block;color:#d4b56d;margin-top:5px;font-size:12px}
#mg-ai-close{background:transparent;border:0;color:#fff;font-size:27px;cursor:pointer;flex-shrink:0}
#mg-ai-log{flex:1;min-height:0;min-width:0;overflow-x:hidden;overflow-y:auto;padding:20px 22px;display:flex;flex-direction:column;gap:14px;background:#f5f7fb}
.mg-ai-msg{max-width:92%;min-width:0;padding:15px 17px;border-radius:14px;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal;font-size:15px}
.mg-ai-bot{align-self:flex-start;background:#fff;border:1px solid #e1e7ef}.mg-ai-user{align-self:flex-end;background:#102e50;color:#fff}
.mg-ai-sources{margin-top:14px;padding-top:12px;border-top:1px solid #e5e9f0;display:grid;gap:9px;min-width:0}
.mg-ai-sources a{display:block;color:#12599a;text-decoration:underline;text-underline-offset:3px;font-size:13px;line-height:1.5;overflow-wrap:anywhere}
#mg-ai-quick{flex-shrink:0;padding:12px 18px;display:flex;flex-wrap:wrap;gap:8px;overflow-x:hidden;overflow-y:auto;max-height:115px;border-top:1px solid #e7ebf0;background:#fff}
#mg-ai-quick button{border:1px solid #d6bd7a;background:#fffaf0;color:#473812;padding:9px 12px;border-radius:20px;white-space:normal;text-align:left;cursor:pointer;font:500 12px 'Segoe UI',Arial,sans-serif;line-height:1.35;max-width:100%}
#mg-ai-form{flex-shrink:0;display:flex;padding:13px 18px 9px;gap:10px;border-top:1px solid #e1e7ef;background:#fff}
#mg-ai-input{flex:1;min-width:0;width:0;padding:13px;border:1px solid #cbd5e1;border-radius:10px;font:inherit;font-size:14px}
#mg-ai-send{flex-shrink:0;border:0;border-radius:10px;background:#b99342;color:#071b34;font-weight:700;padding:0 18px;cursor:pointer}
#mg-ai-note{flex-shrink:0;font-size:11px;color:#6b7280;padding:0 18px 13px;background:#fff}
@media(max-width:640px){#mg-ai-toggle{right:12px;bottom:12px;padding:12px 16px}#mg-ai-panel{right:8px;bottom:70px;width:calc(100vw - 16px);height:min(740px,calc(100dvh - 86px));border-radius:15px}#mg-ai-head{padding:15px 16px}#mg-ai-head strong{font-size:15px}#mg-ai-log{padding:13px;gap:11px}.mg-ai-msg{max-width:97%;padding:12px 13px;font-size:14px;line-height:1.6}#mg-ai-quick{padding:10px 12px;gap:6px}#mg-ai-form{padding:10px 12px 8px;gap:7px}#mg-ai-input{padding:11px;font-size:13px}#mg-ai-send{padding:0 13px}#mg-ai-note{padding:0 12px 10px}}
@media(max-height:540px){#mg-ai-panel{bottom:8px;height:calc(100dvh - 16px)}}

/* Generated AI emblem: continuous, gentle zoom without moving the label. */
#mg-ai-toggle{display:flex;align-items:center;gap:8px;padding:6px 18px 6px 8px;min-height:56px}
#mg-ai-toggle .mg-ai-launcher-icon{display:block;width:56px;height:56px;flex:0 0 56px;object-fit:contain;animation:mg-ai-breathe 3s ease-in-out infinite;transform-origin:center;pointer-events:none}
@keyframes mg-ai-breathe{0%,100%{transform:scale(.9)}50%{transform:scale(1.1)}}
@media(max-width:640px){#mg-ai-toggle{padding:5px 14px 5px 6px;gap:5px;min-height:50px}#mg-ai-toggle .mg-ai-launcher-icon{width:48px;height:48px;flex-basis:48px}}
@media(prefers-reduced-motion:reduce){#mg-ai-toggle .mg-ai-launcher-icon{animation:none}}

#mg-ai-log .mg-ai-bot a{color:#12599a;text-decoration:underline;text-underline-offset:3px;cursor:pointer;overflow-wrap:anywhere}
#mg-ai-log .mg-ai-bot a:hover{color:#071b34}
#mg-ai-log .mg-ai-bot a:focus-visible{outline:2px solid #b99342;outline-offset:3px;border-radius:2px}

/* Waiting state: localized status text and an accessible, subtle animation. */
#mg-ai-log .mg-ai-waiting{display:flex;align-items:center;gap:10px;white-space:normal}
.mg-ai-wait-label{font-size:14px;color:#53657a;line-height:1.5}
.mg-ai-wait-dots{display:inline-flex;align-items:center;gap:4px;flex:0 0 auto;height:16px}
.mg-ai-wait-dots span{width:5px;height:5px;border-radius:50%;background:#b99342;animation:mg-ai-dot-pulse 1.3s ease-in-out infinite}
.mg-ai-wait-dots span:nth-child(2){animation-delay:.16s}
.mg-ai-wait-dots span:nth-child(3){animation-delay:.32s}
@keyframes mg-ai-dot-pulse{0%,70%,100%{opacity:.35;transform:translateY(0)}35%{opacity:1;transform:translateY(-3px)}}
@media(prefers-reduced-motion:reduce){.mg-ai-wait-dots span{animation:none;opacity:.65}}

#mg-ai-voice-controls{flex-shrink:0;display:flex;align-items:center;flex-wrap:wrap;gap:6px;padding:9px 18px;background:#fff;border-top:1px solid #e7ebf0}
#mg-ai-voice-controls button,#mg-ai-voice-controls select{border:1px solid #cbd5e1;border-radius:8px;background:#f8fafc;color:#102e50;font:500 12px 'Segoe UI',Arial,sans-serif;line-height:1.3;padding:8px 10px;cursor:pointer;max-width:100%}
#mg-ai-voice-controls button[aria-pressed="true"]{background:#fff7e5;border-color:#b99342;color:#473812}
#mg-ai-voice-controls button:disabled,#mg-ai-voice-controls select:disabled{opacity:.5;cursor:default}
#mg-ai-voice-controls [hidden]{display:none}
#mg-ai-voice-controls .mg-listening{box-shadow:0 0 0 2px rgba(185,147,66,.2);animation:mg-ai-listening 1.7s ease-in-out infinite}
#mg-ai-voice-status{flex-shrink:0;padding:0 18px 7px;background:#fff;color:#607086;font-size:11px;line-height:1.45;overflow-wrap:anywhere}
#mg-ai-voice-status:empty{display:none}
#mg-ai-voice-controls button:focus-visible,#mg-ai-voice-controls select:focus-visible{outline:2px solid #b99342;outline-offset:2px}
@keyframes mg-ai-listening{50%{box-shadow:0 0 0 4px rgba(185,147,66,.1)}}
@media(max-width:640px){#mg-ai-voice-controls{padding:8px 12px;gap:5px}#mg-ai-voice-controls button,#mg-ai-voice-controls select{padding:8px;font-size:11px}#mg-ai-voice-status{padding:0 12px 6px}}
@media(prefers-reduced-motion:reduce){#mg-ai-voice-controls .mg-listening{animation:none}}
