/* Mada service guide: scoped, bilingual and independent of the enquiry form. */
#mada-assistant{--ma-ink:#123c43;--ma-accent:#16685f;font-family:inherit;color:var(--ma-ink);position:fixed;inset-inline-end:20px;bottom:88px;z-index:110}
#mada-assistant *{box-sizing:border-box}
#mada-assistant [hidden]{display:none!important}
#mada-assistant button,#mada-assistant input,#mada-assistant textarea{font:inherit}
#mada-assistant button,#mada-assistant a{-webkit-tap-highlight-color:transparent}
#mada-assistant button{cursor:pointer}
#mada-assistant :focus-visible{outline:3px solid #b27b28;outline-offset:3px}
#mada-assistant .ma-launch{display:flex;align-items:center;justify-content:center;width:64px;height:64px;padding:0;border:1px solid #bad4c9;border-radius:22px;background:#103e43;color:#fff;box-shadow:0 8px 28px #103e4330;transition:transform .18s}
#mada-assistant .ma-launch:hover{transform:translateY(-2px)}
#mada-assistant .ma-launch>span{position:absolute;inset-inline-end:76px;white-space:nowrap;background:#fff;color:#164840;border:1px solid #e1e9e5;border-radius:10px;padding:7px 13px;font-size:13px;box-shadow:0 3px 16px #123c4310}
#mada-assistant .ma-launch[aria-expanded=true]>span{display:none}
#mada-assistant #ma-panel{position:absolute;inset-inline-end:0;bottom:78px;width:420px;max-width:calc(100vw - 32px);height:min(680px,calc(100dvh - 185px));max-height:calc(100dvh - 185px);display:flex;flex-direction:column;background:#fff;border:1px solid #d9e5e1;border-radius:24px;box-shadow:0 24px 80px #153e4333;overflow:hidden;font-size:14px;line-height:1.7}
#mada-assistant:has(#ma-panel:not([hidden])){bottom:16px}
#mada-assistant:has(#ma-panel:not([hidden])) #ma-panel{position:fixed;inset-inline-end:20px;top:calc(var(--ma-view-top,0px) + max(16px,calc(var(--ma-view-height,100dvh) - 736px)));bottom:auto;height:min(720px,calc(var(--ma-view-height,100dvh) - 32px));max-height:calc(var(--ma-view-height,100dvh) - 32px)}
#mada-assistant:has(#ma-panel:not([hidden])) .ma-launch{visibility:hidden}
#mada-assistant .ma-head{display:flex;align-items:center;gap:10px;flex-shrink:0;background:#fff;border-bottom:1px solid #e1e9e4;padding:14px 16px}
#mada-assistant .ma-head>div{flex:1;min-width:0}
#mada-assistant .ma-head strong{display:block;font-size:18px;font-weight:700}
#mada-assistant .ma-head small{display:block;color:#526d65;font-size:11px}
#mada-assistant .ma-avatar{display:grid;place-items:center;width:42px;height:42px;flex-shrink:0;border-radius:15px;background:#e8f2eb;color:#16685f}
#mada-assistant .ma-close{display:grid;place-items:center;border:0;background:#f0f5f0;color:#365d54;border-radius:50%;width:44px;height:44px;flex-shrink:0;font-size:27px}
#mada-assistant .ma-back{border:1px solid #d4e3d9;border-radius:10px;background:#f8faf7;color:#235b50;padding:5px 9px;min-height:44px;font-size:12px}
#mada-assistant .ma-body{position:relative;overflow-y:auto;overscroll-behavior:contain;padding:18px 16px;flex:1;min-height:72px;background:#f2f6f2;scrollbar-width:thin;scrollbar-color:#b7c9be transparent}
#mada-assistant .ma-welcome{background:#fff;border:1px solid #dfe8df;border-radius:17px;padding:17px}
#mada-assistant .ma-greeting{color:#4d6d61;font-size:11px;font-weight:600}
#mada-assistant .ma-welcome h2{font-size:23px;line-height:1.5;margin:5px 0 10px;color:#123c43;font-weight:700;letter-spacing:0}
#mada-assistant .ma-intro{font-size:14px;line-height:1.8;margin:0 0 12px;color:#385d53}
#mada-assistant .ma-note{font-size:11px;line-height:1.8;margin:0 0 17px;color:#526b61}
#mada-assistant.ma-chatting .ma-welcome{display:none}
#mada-assistant .ma-log:empty{display:none}
#mada-assistant .ma-options{display:grid;gap:8px;margin-top:14px}
#mada-assistant .ma-option{width:100%;min-height:44px;text-align:start;white-space:normal;line-height:1.7;padding:10px 12px;border:1px solid #bed6c8;border-radius:12px;background:#f9fbf7;color:#164e49;font-size:13px;transition:background .18s,border-color .18s}
#mada-assistant .ma-option:hover{background:#e6f1e7;border-color:#91b5a2}
#mada-assistant .ma-option.ma-primary{background:#164f49;border-color:#164f49;color:#fff;font-weight:600}
#mada-assistant .ma-option.ma-primary:hover{background:#103f3b}
#mada-assistant .ma-message{margin:0 0 14px;margin-inline-end:18px;padding:15px;background:#fff;border:1px solid #dfe8df;border-radius:16px;overflow-wrap:anywhere;font-size:14px}
#mada-assistant .ma-message.ma-user{margin-inline-start:42px;margin-inline-end:0;background:#174d47;border-color:#174d47;color:#fff;padding:12px 14px}
#mada-assistant .ma-speaker{display:block;color:#527267;font-size:11px;margin-bottom:7px}
#mada-assistant .ma-user .ma-speaker{color:#cce8dd}
#mada-assistant .ma-message p{margin:0 0 12px}
#mada-assistant .ma-message p:last-child{margin-bottom:0}
#mada-assistant .ma-message h3{font-size:19px;line-height:1.6;margin:0 0 12px;color:#123c43}
#mada-assistant .ma-message .ma-hint{font-size:12px;color:#526b61}
#mada-assistant .ma-checklist{margin:8px 0 14px;padding-inline-start:20px}
#mada-assistant .ma-checklist li{padding-inline-start:2px;margin-bottom:7px}
#mada-assistant .ma-message a{display:block;padding:10px 12px;margin-top:9px;background:#f4f8f2;border:1px solid #cddfd1;border-radius:10px;color:#18594b;text-decoration:none;font-weight:600;font-size:13px;min-height:44px}
#mada-assistant .ma-message a:hover{background:#e1eee5}
#mada-assistant .ma-draft{margin:13px 0;border:1px solid #d5e3d8;border-radius:12px;padding:10px 12px;background:#f8faf6}
#mada-assistant .ma-draft summary{cursor:pointer;color:#235a4e;font-weight:600;padding:4px 0}
#mada-assistant .ma-draft label{display:block;font-size:12px;margin:11px 0 7px}
#mada-assistant .ma-draft textarea{width:100%;resize:vertical;min-height:140px;border:1px solid #b9d1c1;border-radius:9px;padding:10px;background:white;color:#123c43;line-height:1.8;font-size:14px}
#mada-assistant .ma-copy{min-height:44px;padding:6px 10px;border:1px solid #bed2c4;border-radius:8px;background:#fff;color:#235a4e;margin-top:7px}
#mada-assistant .ma-message .ma-copy-feedback{margin:9px 0 0;font-size:12px;line-height:1.8;color:#235a4e}
#mada-assistant .ma-form{flex-shrink:0;padding:12px 14px 8px;border-top:1px solid #dfe8df;background:#fff}
#mada-assistant .ma-form label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
#mada-assistant .ma-form>div{display:flex;gap:8px}
#mada-assistant .ma-form input{width:100%;min-width:0;min-height:46px;border:1px solid #bccfc0;border-radius:12px;padding:9px 11px;background:#f8faf6;color:#123c43;font-size:16px}
#mada-assistant .ma-form button{border:0;border-radius:12px;padding:9px 13px;background:#16685f;color:#fff;min-height:46px}
#mada-assistant .ma-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;flex-shrink:0;padding:5px 14px max(10px,env(safe-area-inset-bottom));background:white}
#mada-assistant .ma-foot button{border:0;background:transparent;color:#315e50;text-decoration:underline;text-underline-offset:3px;padding:5px 0;min-height:44px;font-size:11px}
#mada-assistant .ma-status{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
body.privacy-choice-open #mada-assistant{visibility:hidden}
body:has(#ma-panel:not([hidden])) #ht-ctc-chat{visibility:hidden!important;pointer-events:none!important}
@media(max-width:480px){
 #mada-assistant{inset-inline-end:12px;bottom:calc(82px + var(--ma-keyboard,0px))}
 #mada-assistant #ma-panel{position:fixed;inset-inline:12px;width:auto;max-width:none;bottom:76px;height:calc(var(--ma-view-height,100dvh) - 172px);max-height:calc(var(--ma-view-height,100dvh) - 172px)}
 #mada-assistant:has(#ma-panel:not([hidden])){bottom:calc(8px + var(--ma-keyboard,0px))}
 #mada-assistant:has(#ma-panel:not([hidden])) #ma-panel{top:calc(var(--ma-view-top,0px) + 8px);bottom:auto;inset-inline-end:12px;max-height:calc(var(--ma-view-height,100dvh) - 16px);height:calc(var(--ma-view-height,100dvh) - 16px)}
 #mada-assistant:has(#ma-panel:not([hidden])) .ma-launch{visibility:hidden}
 #mada-assistant .ma-body{padding:14px 12px}
 #mada-assistant .ma-message{margin-inline-end:8px}
 #mada-assistant .ma-message.ma-user{margin-inline-start:28px;margin-inline-end:0}
 #mada-assistant .ma-head{padding:12px}
 #mada-assistant .ma-head strong{font-size:16px}
 #mada-assistant .ma-avatar{width:36px;height:36px;border-radius:12px}
}
/* Give the transcript and composer room when a keyboard or landscape view leaves
   little height. Secondary footer controls return when the viewport expands. */
#mada-assistant.ma-compact .ma-foot{display:none}
#mada-assistant.ma-compact .ma-head{padding:6px 12px}
#mada-assistant.ma-compact .ma-head strong{font-size:16px;line-height:1.3}
#mada-assistant.ma-compact .ma-head small{font-size:10px;line-height:1.3}
#mada-assistant.ma-compact .ma-avatar{display:none}
#mada-assistant.ma-compact .ma-body{min-height:0;padding:10px 12px}
@media(prefers-reduced-motion:reduce){#mada-assistant .ma-launch,#mada-assistant .ma-option{transition:none}}
