/* OdontoUdeC · Adjuntos de fotografía para los chats existentes */
.chat-compose-row{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center!important;gap:8px!important;min-width:0}
.chat-compose-row>input{flex:1 1 auto!important;min-width:0!important;width:0}
.chat-compose-row>button[type="submit"]{flex:0 0 auto!important;width:auto!important;min-width:76px}
.chat-attach-wrap{position:relative;display:flex;flex:0 0 40px!important;width:40px;min-width:40px;align-items:center;justify-content:center}
.chat-attach-trigger{display:inline-flex!important;align-items:center;justify-content:center;width:40px!important;min-width:40px!important;height:42px;min-height:42px;padding:0!important;border:1px solid #e5d9ef!important;border-radius:12px!important;background:#f7f1fc!important;color:#32105f!important;box-shadow:none!important}
.chat-attach-trigger:hover{background:#eee4f7!important}
.chat-attach-trigger svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.chat-attach-trigger:disabled{opacity:.45}
.chat-attach-menu{position:absolute;left:0;bottom:calc(100% + 8px);z-index:10000;display:grid;gap:5px;min-width:185px;padding:7px;border:1px solid #e7ddef;border-radius:13px;background:#fff;box-shadow:0 12px 30px rgba(35,12,60,.17)}
.chat-attach-menu[hidden]{display:none!important}
.chat-attach-menu button{display:flex!important;justify-content:flex-start!important;min-height:39px;padding:8px 11px!important;border-radius:9px!important;background:#faf7fd!important;color:#32105f!important;box-shadow:none!important;font-size:13px!important;font-weight:700!important;white-space:nowrap}
.chat-attach-menu button:hover{background:#f0e7f8!important}
.chat-file-input{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;overflow:hidden!important;pointer-events:none!important}
.chat-attachment-preview{display:flex;align-items:center;gap:10px;width:100%;min-width:0;margin:8px 0;padding:8px 10px;border:1px solid #e7ddef;border-radius:13px;background:#faf7fd}
.chat-attachment-preview[hidden]{display:none!important}
.chat-preview-thumb{display:block;flex:0 0 58px;width:58px;height:58px;object-fit:cover;border-radius:9px;background:#eee}
.chat-preview-details{display:grid;gap:2px;flex:1;min-width:0}
.chat-preview-details strong{color:#32105f;font-size:13px}
.chat-preview-details span{color:#766d82;font-size:11px}
.chat-preview-remove{flex:0 0 auto!important;padding:7px 9px!important;border-radius:9px!important;background:#f2eafa!important;color:#54218b!important;box-shadow:none!important;font-size:12px!important}
.chat-upload-status{min-height:0;margin:5px 0 0;color:#765d8d;font-size:12px;line-height:1.4}
.chat-upload-status:empty{display:none}
.chat-attachment-link{display:block;width:fit-content;max-width:min(100%,380px);margin:8px 0 4px;line-height:0;border:1px solid #e9e1f1;border-radius:13px;overflow:hidden;background:#faf8fc}
.chat-attachment{display:block;width:auto;max-width:100%;max-height:280px;object-fit:contain;cursor:zoom-in}
.chat-attachment-unavailable{display:inline-block;padding:9px 11px;border-radius:9px;background:#f8f4fb;color:#766d82;font-size:12px;line-height:1.4}
.chat-attachment-caption{white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:560px){
 .chat-compose-row{gap:6px!important}
 .chat-attach-wrap{flex-basis:38px!important;width:38px;min-width:38px}
 .chat-attach-trigger{width:38px!important;min-width:38px!important;height:42px}
 .chat-compose-row>button[type="submit"]{min-width:70px}
 .chat-attachment{max-height:230px}
}

.message-body{white-space:pre-wrap;overflow-wrap:anywhere}

.chat-compose-form{display:block!important;width:100%}
.chat-compose-form>.chat-attachment-preview{width:100%;box-sizing:border-box}

/* Logo institucional: conservarlo como firma, nunca como bloque protagonista del chat. */
.ou-thread-brand{display:flex;align-items:center;gap:7px;flex:0 0 auto;color:#32105f;font-size:12px;font-weight:850;white-space:nowrap}
.ou-thread-brand img{display:block!important;width:36px!important;height:36px!important;max-width:36px!important;max-height:36px!important;object-fit:contain!important;background:#fff;border-radius:9px;padding:2px;flex:0 0 36px}
.ou-group-heading{display:flex;align-items:center;gap:12px;min-width:0}
.ou-group-heading img{display:block!important;width:50px!important;height:50px!important;max-width:50px!important;max-height:50px!important;object-fit:contain!important;background:#fff;border-radius:12px;padding:2px;flex:0 0 50px}
.ou-group-mark{display:flex;align-items:center;flex:0 0 auto}
.ou-group-mark img{display:block!important;width:34px!important;height:34px!important;max-width:34px!important;max-height:34px!important;object-fit:contain!important;background:#fff;border-radius:9px;padding:2px;flex:0 0 34px}
.thread-head{display:flex;align-items:center;gap:10px;min-height:46px;flex:0 0 auto}
.thread-head #threadTitle{min-width:0;overflow-wrap:anywhere}
.thread-head #threadStatus{margin-left:auto;text-align:right;font-size:12px}
.thread{height:min(74vh,780px);min-height:520px}
#messages{flex:1 1 auto;min-height:0;max-height:none;height:auto;overflow-y:auto;overscroll-behavior:contain}
#backInbox{display:none}
@media(max-width:720px){
 body.ou-private-open{overflow:hidden}
 body.ou-private-open main{display:flex;flex-direction:column;height:calc(100dvh - 62px);min-height:0;margin:0 auto;padding:9px 12px}
 body.ou-private-open .intro{display:none}
 body.ou-private-open #app.layout:not(.hidden){display:block;flex:1;min-height:0;height:100%;overflow:hidden}
 body.ou-private-open #app>aside{display:none!important}
 body.ou-private-open #app>.thread{display:flex;width:100%;height:100%;min-height:0;padding:12px}
 body.ou-private-open #backInbox{display:inline-flex;flex:0 0 auto;padding:7px 10px}
 body.ou-private-open #messages{height:0;min-height:0;max-height:none;flex:1}
 body.ou-private-open .compose{flex-direction:row;flex-wrap:nowrap}
 body.ou-private-open .compose button{width:auto;min-width:76px}
}
.ou-group-heading img,.ou-group-mark img{vertical-align:middle}
#chatPanel:not(.hidden){display:flex;flex-direction:column;min-height:0}
#chatPanel .chat-head{display:flex;align-items:center;gap:10px;flex:0 0 auto;min-width:0}
#chatPanel .chat-head>div{min-width:0;flex:1}
#chatPanel .chat-head h2{font-size:1.05rem;line-height:1.25}
#chatPanel .chat-head p{margin:3px 0 0;font-size:.82rem}
#chatLog{height:min(62vh,620px);max-height:none;min-height:300px;overflow-y:auto}
#messageForm{flex:0 0 auto}
#messageForm .row{display:flex;flex-wrap:nowrap;align-items:center}
#messageForm .row input{flex:1 1 auto;min-width:0}
html:not(.ou-embedded) body.ou-group-chat-open{overflow:hidden}
html:not(.ou-embedded) body.ou-group-chat-open>header{display:none!important}
html:not(.ou-embedded) body.ou-group-chat-open>main{display:flex;flex-direction:column;width:100%;max-width:1200px;height:100dvh;min-height:100dvh;margin:0 auto;padding:12px 18px;overflow:hidden}
html:not(.ou-embedded) body.ou-group-chat-open>main>.hero,
html:not(.ou-embedded) body.ou-group-chat-open>main>#auth{display:none!important}
html:not(.ou-embedded) body.ou-group-chat-open #app{display:flex!important;flex:1;min-height:0;flex-direction:column;overflow:hidden}
html:not(.ou-embedded) body.ou-group-chat-open #app>.grid{display:none!important}
html:not(.ou-embedded) body.ou-group-chat-open #app>#chatPanel:not(.hidden){display:flex!important;flex:1;min-height:0;height:auto;max-height:none;margin:0!important;padding:16px;overflow:hidden}
html:not(.ou-embedded) body.ou-group-chat-open #chatPanel .chat-log{height:0;min-height:0;max-height:none;flex:1 1 0;overflow-y:auto}
html:not(.ou-embedded) body.ou-group-chat-open #app>.fine{display:none!important}
@media(max-width:600px){
 html:not(.ou-embedded) body.ou-group-chat-open>main{padding:7px}
 html:not(.ou-embedded) body.ou-group-chat-open #app>#chatPanel:not(.hidden){padding:10px}
}

/* Reacciones compactas: selector desplegable, iconos SVG originales */
.ou-reactions{display:flex;align-items:center;gap:6px;min-width:0;margin-top:5px}
.ou-reactions-shell{position:relative;display:inline-flex;align-items:center;gap:5px;max-width:100%}
.ou-reactions-summary{display:inline-flex;align-items:center;gap:4px;flex-wrap:wrap;min-width:0}
.ou-reaction-count{display:inline-flex;align-items:center;gap:3px;min-height:25px;padding:2px 6px;border:1px solid #e9e1f1;border-radius:999px;background:#fff;color:#63566f;font-size:11px;font-weight:700;line-height:1}
.ou-reaction-count img{display:block;width:17px;height:17px;object-fit:contain}
.ou-reactions-toggle{display:inline-grid;place-items:center;width:28px;height:28px;flex:0 0 28px;padding:0;border:1px solid #e7ddef;border-radius:50%;background:#fff;color:#6b4787;cursor:pointer;transition:background .15s,border-color .15s,transform .15s}
.ou-reactions-toggle:hover,.ou-reactions-toggle.is-open{background:#f3edf9;border-color:#cdb9df}
.ou-reactions-toggle svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.ou-reactions-menu{position:absolute;z-index:40;left:0;bottom:calc(100% + 7px);display:flex;align-items:center;gap:3px;padding:6px;border:1px solid #e7ddef;border-radius:14px;background:#fff;box-shadow:0 9px 28px rgba(35,12,60,.16)}
.ou-reactions-menu[hidden]{display:none!important}
.ou-reaction-option{display:grid;place-items:center;gap:1px;width:39px;height:43px;padding:3px;border:1px solid transparent;border-radius:9px;background:transparent;color:#6b6075;cursor:pointer}
.ou-reaction-option:hover,.ou-reaction-option.is-active{background:#f3edf9;border-color:#ddcde9}
.ou-reaction-option:disabled{opacity:.55;cursor:not-allowed}
.ou-reaction-option img{display:block;width:27px;height:27px;object-fit:contain}
.ou-reaction-option-count{min-height:10px;font-size:9px;line-height:1;font-weight:800}
@media(max-width:480px){.ou-reactions-menu{gap:1px;padding:4px}.ou-reaction-option{width:35px;height:40px}.ou-reaction-option img{width:25px;height:25px}}


/* Mensajería 2026-11: un único flujo móvil, lista O conversación, nunca ambas. */
@media(max-width:720px){
 body:not(.ou-private-open) #app.layout:not(.hidden)>.thread{display:none!important}
 body:not(.ou-private-open) #app.layout:not(.hidden){display:block}
 body.ou-private-open>header{display:none!important}
 body.ou-private-open main{height:100dvh!important;min-height:0!important;margin:0 auto!important;padding:max(8px,env(safe-area-inset-top)) 8px max(18px,env(safe-area-inset-bottom))!important;overflow:hidden!important}
 html.ou-embedded body.ou-private-open main{height:100%!important;padding:6px!important}
 body.ou-private-open #app.layout:not(.hidden){flex:1 1 auto;height:100%;min-height:0!important;overflow:hidden}
 body.ou-private-open #app.layout:not(.hidden)>.thread{display:flex!important;flex-direction:column;width:100%;height:100%;min-height:0;overflow:hidden}
 body.ou-private-open .thread-head{display:flex;align-items:center;gap:9px;flex-wrap:nowrap;padding-bottom:9px}
 body.ou-private-open .thread-head #backInbox{display:inline-flex!important;flex:0 0 auto}
 body.ou-private-open .thread-head .ou-thread-brand{flex:0 0 auto}
 body.ou-private-open .thread-head .ou-thread-brand>span{display:none!important}
 body.ou-private-open .thread-head .ou-thread-brand img{width:31px!important;height:31px!important;max-width:31px!important;max-height:31px!important;flex-basis:31px!important}
 body.ou-private-open .thread-head #threadTitle{flex:1 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:1rem}
 body.ou-private-open .thread-head #threadStatus{display:none!important}
 body.ou-private-open #messages{flex:1 1 0;height:0;min-height:0;max-height:none;overflow-y:auto}
 body.ou-private-open #sendForm{flex:0 0 auto;width:100%;margin:0;padding-top:8px}
}


/* GIPHY · acceso compacto integrado en el compositor existente */
.chat-gif-wrap{position:relative;display:flex;align-items:center;justify-content:center;flex:0 0 40px!important;width:40px;min-width:40px}
.chat-gif-trigger{display:inline-flex!important;align-items:center;justify-content:center;width:40px!important;min-width:40px!important;height:42px;min-height:42px;padding:0!important;border:1px solid #e5d39b!important;border-radius:12px!important;background:#fbf7e9!important;color:#32105f!important;box-shadow:none!important;font-size:11px!important;font-weight:950!important;letter-spacing:.35px;cursor:pointer}
.chat-gif-trigger:hover,.chat-gif-trigger:focus-visible{background:#f4e8c2!important;border-color:#c59b28!important;outline:2px solid transparent}
.chat-gif-trigger:disabled{opacity:.42;cursor:not-allowed}
.chat-gif-picker{position:fixed;z-index:100000;display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;gap:8px;box-sizing:border-box;padding:10px;border:1px solid #e3d7ec;border-radius:16px;background:#fff;color:#28123f;box-shadow:0 16px 46px rgba(34,13,55,.24);overflow:hidden;font-family:inherit}
.chat-gif-picker[hidden]{display:none!important}
.chat-gif-picker-head{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}
.chat-gif-picker-head strong{font-size:13px;font-weight:850;color:#32105f}
.chat-gif-close{display:inline-flex!important;align-items:center;justify-content:center;width:27px!important;min-width:27px!important;height:27px;min-height:27px;padding:0!important;border:1px solid #e9e1ef!important;border-radius:8px!important;background:#faf7fc!important;color:#57466a!important;box-shadow:none!important;font-size:18px!important;line-height:1;cursor:pointer}
.chat-gif-search{display:flex;align-items:center;gap:6px;min-width:0;margin:0}
.chat-gif-search input{flex:1 1 auto;min-width:0;width:0;height:36px;min-height:36px;padding:7px 10px;border:1px solid #e5dced;border-radius:9px;background:#fbf9fd;color:#2c2037;font:inherit;font-size:12px;outline:none}
.chat-gif-search input:focus{border-color:#d7a928;box-shadow:0 0 0 2px rgba(215,169,40,.18)}
.chat-gif-search button{flex:0 0 auto!important;width:auto!important;min-width:55px!important;height:36px;min-height:36px;padding:6px 10px!important;border:0!important;border-radius:9px!important;background:#32105f!important;color:#fff!important;box-shadow:none!important;font-size:11px!important;font-weight:800!important}
.chat-gif-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-content:start;gap:6px;min-height:90px;overflow:auto;overscroll-behavior:contain;padding:1px}
.chat-gif-option{display:block!important;width:100%!important;min-width:0!important;min-height:0!important;aspect-ratio:1.25;padding:0!important;overflow:hidden;border:1px solid #eee7f2!important;border-radius:9px!important;background:#f7f3fa!important;box-shadow:none!important;cursor:pointer}
.chat-gif-option:hover,.chat-gif-option:focus-visible{border-color:#d7a928!important;outline:2px solid #f3e8c5}
.chat-gif-option img,.chat-gif-option video{display:block;width:100%;height:100%;object-fit:cover}
.chat-gif-empty{grid-column:1/-1;margin:0;padding:24px 10px;color:#776b82;text-align:center;font-size:12px;line-height:1.45}
.chat-gif-empty.is-error{color:#9c3d54}
.chat-gif-footer{display:flex;align-items:center;justify-content:space-between;gap:8px;padding-top:6px;border-top:1px solid #eee3c4;color:#81768b;font-size:9px;line-height:1.2}
.chat-gif-powered{display:inline-flex;align-items:center;line-height:0;flex:0 0 auto}
.chat-gif-powered img{display:block;width:96px;height:auto;max-height:16px;object-fit:contain}
.chat-gif-safety{color:#7c6b39;font-weight:700}
.chat-gif-footer span{font-weight:700}
.chat-gif-message{display:flex;flex-direction:column;align-items:flex-start;gap:4px;white-space:normal;overflow-wrap:anywhere}
.chat-gif-caption{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.4}
.chat-gif-frame{display:block;width:min(260px,100%);height:180px;max-width:100%;border:0;border-radius:11px;background:#f6f2f8;overflow:hidden}
.chat-gif-source{display:block;color:inherit;opacity:.78;font-size:10px;line-height:1.25;font-weight:650;text-decoration:none}
.chat-gif-source:hover{text-decoration:underline}
.chat-gif-credit{display:inline-block;color:inherit;opacity:.72;font-size:9px;line-height:1.15;font-weight:900;letter-spacing:.2px;text-decoration:none}
.chat-gif-option-fallback{display:flex;align-items:center;justify-content:center;width:100%;height:100%;padding:6px;color:#5e4a70;font-size:10px;line-height:1.2;text-align:center;overflow-wrap:anywhere}
.chat-gif-preview-frame{display:block;flex:0 0 58px;width:58px!important;height:58px!important;border:0;border-radius:9px;overflow:hidden}
.chat-gif-credit:hover{text-decoration:underline}
.chat-gif-preview-thumb{object-fit:cover}
@media(max-width:560px){
 .chat-compose-row{gap:6px!important}
 .chat-gif-wrap{flex-basis:36px!important;width:36px;min-width:36px}
 .chat-gif-trigger{width:36px!important;min-width:36px!important;height:42px}
 .chat-gif-grid{gap:5px}
 .chat-gif-picker{padding:9px;border-radius:14px}
 .chat-gif-frame{width:min(230px,100%);height:160px}
}
