/* El Mawardy assistant panel */
.ma-launch{position:fixed;right:20px;bottom:122px;z-index:11;width:60px;height:60px;border-radius:50%;border:0;background:#18443F;color:#F9F8F6;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 2px 8px rgba(0,0,0,.18);transition:background-color .2s ease,transform .1s ease}
.ma-launch:hover{background:#0F302C}
.ma-launch:active{transform:translateY(1px)}
.ma-launch:focus-visible{outline:2px solid #18443F;outline-offset:3px}
.ma-launch-tip{position:absolute;right:72px;top:50%;transform:translateY(-50%);white-space:nowrap;background:#18443F;color:#F9F8F6;font:500 13px/1 "Red Hat Display",Arial,sans-serif;letter-spacing:.04em;padding:10px 14px;opacity:0;pointer-events:none;transition:opacity .2s ease}
.ma-launch:hover .ma-launch-tip,.ma-launch:focus-visible .ma-launch-tip{opacity:1}

.ma-panel{position:fixed;inset:auto 20px 20px auto;margin:0;padding:0;border:0;width:400px;max-width:calc(100vw - 40px);height:min(660px,calc(100vh - 40px));max-height:none;background:#F9F8F6;color:#2D2D2D;box-shadow:0 18px 50px rgba(0,0,0,.22);font:15px/1.6 "Red Hat Display",Arial,sans-serif;overflow:hidden}
.ma-panel[open]{display:flex;flex-direction:column}
.ma-panel::backdrop{background:rgba(24,40,38,.28)}
.ma-panel *{box-sizing:border-box}

.ma-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 12px 16px 22px;background:#18443F;color:#F9F8F6}
.ma-head h2{margin:0;font:400 24px/1.1 "Timeless","Trirong",serif;outline:none}
.ma-sub{margin:4px 0 0;font-size:11px;font-weight:600;letter-spacing:.16em;text-transform:uppercase;opacity:.8}
.ma-close{width:44px;height:44px;display:flex;align-items:center;justify-content:center;background:transparent;border:0;color:inherit;cursor:pointer}
.ma-close:focus-visible{outline:2px solid #F9F8F6;outline-offset:-4px}

.ma-body{flex:1;overflow-y:auto;padding:20px 18px 12px;display:flex;flex-direction:column;gap:14px}
.ma-log{display:flex;flex-direction:column;gap:14px}
.ma-msg{display:flex;flex-direction:column;gap:10px;max-width:92%}
.ma-msg p{margin:0;padding:12px 15px;white-space:pre-wrap;overflow-wrap:anywhere}
.ma-msg.is-assistant{align-self:flex-start}
.ma-msg.is-assistant p{background:#FFFFFF;border:1px solid #E6E3DE}
.ma-msg.is-user{align-self:flex-end}
.ma-msg.is-user p{background:#18443F;color:#F9F8F6}
.ma-cards{display:flex;flex-direction:column;gap:8px}
.ma-card{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;background:#FFFFFF;border:1px solid #DEDCD8;color:#2D2D2D;text-decoration:none;transition:border-color .2s ease,transform .25s ease}
.ma-card:hover{border-color:#18443F;transform:translateY(-2px)}
.ma-card:focus-visible{outline:2px solid #18443F;outline-offset:2px}
.ma-card-text{display:flex;flex-direction:column;gap:2px;min-width:0}
.ma-card b{font:400 18px/1.25 "Timeless","Trirong",serif}
.ma-card small{font-size:13px;line-height:1.45;color:#5F5F5F}
.ma-card-arrow{color:#18443F;font-size:16px;flex:none}

.ma-choices{display:flex;flex-wrap:wrap;gap:8px}
.ma-choices[hidden]{display:none}
.ma-choices button{min-height:40px;padding:8px 14px;background:transparent;border:1px solid #18443F;color:#18443F;font:600 13px/1.3 "Red Hat Display",Arial,sans-serif;cursor:pointer;text-align:start;transition:background-color .2s ease,color .2s ease}
.ma-choices button:hover{background:#18443F;color:#F9F8F6}
.ma-choices button:focus-visible{outline:2px solid #18443F;outline-offset:2px}

.ma-status{margin:0;font-size:14px;color:#5F5F5F}
.ma-thinking{display:flex;align-items:center;gap:5px;font-size:13px;color:#5F5F5F}
.ma-thinking[hidden]{display:none}
.ma-thinking i{width:6px;height:6px;border-radius:50%;background:#18443F;animation:ma-dot 1.2s infinite ease-in-out}
.ma-thinking i:nth-child(2){animation-delay:.15s}.ma-thinking i:nth-child(3){animation-delay:.3s}
.ma-thinking span{margin-inline-start:6px}
@keyframes ma-dot{0%,80%,100%{opacity:.25;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}

.ma-brief{display:flex;flex-direction:column;gap:8px;padding:16px;background:#FFFFFF;border:1px solid #DEDCD8}
.ma-brief[hidden]{display:none}
.ma-brief h3{margin:0;font:400 20px/1.25 "Timeless","Trirong",serif}
.ma-brief label{font-size:13px;color:#5F5F5F}
.ma-brief textarea{width:100%;padding:10px 12px;border:1px solid #DEDCD8;background:#F9F8F6;font:inherit;font-size:14px;color:inherit;resize:vertical}
.ma-brief textarea:focus{outline:2px solid #18443F;outline-offset:-1px;border-color:#18443F}
.ma-send{display:flex;align-items:center;justify-content:center;min-height:46px;background:#18443F;color:#F9F8F6;text-decoration:none;font-size:13px;font-weight:600;letter-spacing:.14em;text-transform:uppercase;transition:background-color .2s ease}
.ma-send:hover{background:#0F302C;color:#F9F8F6}
.ma-note{margin:0;font-size:12px;color:#5F5F5F}

.ma-foot{padding:12px 18px 14px;border-top:1px solid #E6E3DE;background:#F9F8F6;display:flex;flex-direction:column;gap:10px}
.ma-compose{display:flex;align-items:flex-end;gap:8px}
.ma-compose[hidden]{display:none}
.ma-compose textarea{flex:1;height:46px;min-height:46px;max-height:120px;overflow-y:hidden;padding:12px 14px;border:1px solid #DEDCD8;background:#FFFFFF;font:inherit;color:inherit;resize:none}
.ma-compose textarea:focus{outline:2px solid #18443F;outline-offset:-1px;border-color:#18443F}
.ma-compose button{width:46px;height:46px;flex:none;display:flex;align-items:center;justify-content:center;border:0;background:#18443F;color:#F9F8F6;cursor:pointer}
.ma-compose button:disabled{opacity:.35;cursor:default}
.ma-actions{display:flex;gap:8px}
.ma-prep{flex:1;min-height:42px;padding:8px 14px;background:transparent;border:1px solid #18443F;color:#18443F;font:600 12px/1.3 "Red Hat Display",Arial,sans-serif;letter-spacing:.12em;text-transform:uppercase;cursor:pointer;transition:background-color .2s ease,color .2s ease}
.ma-prep:hover{background:#18443F;color:#F9F8F6}
.ma-restart{width:42px;height:42px;display:flex;align-items:center;justify-content:center;background:transparent;border:1px solid #DEDCD8;color:#2D2D2D;cursor:pointer}
.ma-restart:hover{border-color:#18443F;color:#18443F}
.ma-prep:disabled,.ma-restart:disabled{opacity:.4;cursor:default}
.ma-disclose{margin:0;font-size:11.5px;line-height:1.45;color:#5F5F5F}
.ma-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

@media (max-width:820px){
  .ma-launch{right:16px;bottom:108px;width:56px;height:56px}
  .ma-launch-tip{display:none}
  .ma-panel{inset:0;width:100%;max-width:100%;height:100%;max-height:100%}
  .ma-body{padding:16px 16px 10px}
  .ma-foot{padding:10px 16px calc(12px + env(safe-area-inset-bottom))}
}
@media (prefers-reduced-motion:reduce){.ma-thinking i{animation:none}.ma-card,.ma-launch{transition:none}}
