/* V22 mobile chat preview. No desktop changes. */
.mobile-chat-menu,.mobile-chat-footer{display:none}
@media(max-width:780px) {
html:has(body[data-page="/cliente/mensajes"]){overflow:hidden;height:100%}
body[data-page="/cliente/mensajes"]{height:var(--chat-vh,100dvh);min-height:0!important;overflow:hidden!important;display:flex;flex-direction:column;background:#f7f2e9!important}
body[data-page="/cliente/mensajes"] header{position:relative!important;top:auto!important;flex:none;min-height:0!important;z-index:20;border-bottom:1px solid #c9973b!important;box-shadow:none}
body[data-page="/cliente/mensajes"] header:before{inset:0 0 0 auto!important;width:54vw!important;opacity:.85!important;mask-image:linear-gradient(90deg,transparent,#000 65%);background-size:cover!important}
body[data-page="/cliente/mensajes"] header .ancho{width:100%;padding:8px 12px 4px!important;min-height:0!important;display:grid!important;grid-template-columns:1fr auto!important;gap:3px 8px!important}
body[data-page="/cliente/mensajes"] header .marca{display:flex;align-items:center;gap:7px;min-width:0}
body[data-page="/cliente/mensajes"] header .marca img{width:39px;height:39px}
body[data-page="/cliente/mensajes"] header .marca b{font:700 clamp(17px,5.1vw,22px)/1.1 Georgia,serif!important;letter-spacing:0!important;white-space:nowrap}
body[data-page="/cliente/mensajes"] header .marca small{display:block!important;font:italic 10px/1.3 Georgia,serif!important;letter-spacing:.7px!important;text-transform:none!important}
body[data-page="/cliente/mensajes"] header .cli-empresa{display:none}
body[data-page="/cliente/mensajes"] header details.idiomas>summary{padding:7px!important;font-size:13px!important}
body[data-page="/cliente/mensajes"] header details.idiomas>summary:before{display:none!important}
body[data-page="/cliente/mensajes"] .mobile-chat-menu{display:flex;align-items:center;justify-content:center;grid-column:1;grid-row:2;justify-self:start;width:40px;height:30px;border:0;background:transparent;color:#fff;padding:3px;box-shadow:none}
body[data-page="/cliente/mensajes"] .mobile-chat-menu svg{width:23px;height:23px}
body[data-page="/cliente/mensajes"] main{flex:1;min-height:0!important;overflow:hidden!important;padding:0!important;display:flex;flex-direction:column;background:#f7f2e9!important}
body[data-page="/cliente/mensajes"] main:before{display:none!important}
body[data-page="/cliente/mensajes"] .barra-cli{display:none;position:absolute!important;top:0;left:0;right:0;z-index:15;max-height:100%;overflow:auto}
body[data-page="/cliente/mensajes"].mobile-menu-open .barra-cli{display:block}
body[data-page="/cliente/mensajes"] .barra-cli nav{display:grid!important;grid-template-columns:1fr 1fr;gap:3px!important;padding:8px!important}
body[data-page="/cliente/mensajes"] .barra-cli nav>.premium-nav-icon{display:none}
body[data-page="/cliente/mensajes"] .barra-cli nav a{white-space:normal!important;height:auto;min-height:39px;font-size:13px!important}
body[data-page="/cliente/mensajes"] .ch-pagina{flex:1;min-height:0;width:100%!important;max-width:none!important;margin:0!important;padding:6px 10px 7px!important;display:flex!important;flex-direction:column;gap:7px!important}
body[data-page="/cliente/mensajes"] .premium-heading{flex:none;padding:2px 3px}
body[data-page="/cliente/mensajes"] .premium-heading h2{display:flex;align-items:center;gap:9px;font:700 25px/1.1 Georgia,serif!important;margin:0!important;padding:0!important}
body[data-page="/cliente/mensajes"] .premium-heading h2:before{width:26px;height:26px;margin:0!important;flex:none}
body[data-page="/cliente/mensajes"] .premium-heading h2:after{content:"";position:static!important;height:1px!important;width:auto!important;flex:1;background:#bc8c30!important;margin:0!important}
body[data-page="/cliente/mensajes"] .premium-heading>.sub{display:none}
body[data-page="/cliente/mensajes"] .premium-chat{flex:1;min-height:0;overflow:hidden;gap:3px;padding:5px!important;border-radius:13px!important;background:#fffdf9!important}
body[data-page="/cliente/mensajes"] .premium-chat .of-cita{flex:none;max-height:25%;overflow:auto}
body[data-page="/cliente/mensajes"] .premium-chat .ch-hilo{flex:1;min-height:0!important;max-height:none!important;overflow-y:auto!important;overscroll-behavior:contain;gap:12px!important;padding:8px 6px!important}
body[data-page="/cliente/mensajes"] .ch-pagina .ch-msg{flex:none;font:15px/1.35 Georgia,serif;padding:9px 10px!important;max-width:calc(100% - 44px)!important;box-shadow:0 2px 5px #13263a14;overflow-wrap:anywhere}
body[data-page="/cliente/mensajes"] .ch-msg.suyo{margin-inline-start:37px!important}
body[data-page="/cliente/mensajes"] .ch-msg.suyo:before{inset-inline-start:-39px!important;width:32px!important;height:32px!important;background-image:url('/static/equipo/alberto-casan.jpg')!important}
body[data-page="/cliente/mensajes"] .ch-msg.con-foto-cliente.mio{margin-inline-end:37px!important}
body[data-page="/cliente/mensajes"] .ch-msg.con-foto-cliente.mio>.foto-cliente{inset-inline-end:-39px!important;width:32px!important;height:32px!important}
body[data-page="/cliente/mensajes"] .ch-msg .ch-pie{font:10px/1.3 system-ui,sans-serif;margin-top:5px;text-align:end}
body[data-page="/cliente/mensajes"] .premium-chat .ch-envio{flex:none;display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:5px!important;align-items:center;padding:4px!important;border:1px solid #c9973b!important;border-radius:12px!important;background:#fffaf2!important}
body[data-page="/cliente/mensajes"] .premium-chat .ch-envio textarea{box-sizing:border-box;min-height:44px!important;height:44px;max-height:90px;resize:none;padding:9px 8px!important;font-size:16px!important;border:0!important;background:transparent!important}
body[data-page="/cliente/mensajes"] .premium-chat .ch-envio button{align-self:center;border:1px solid #b17e25!important;background:linear-gradient(#d5a74a,#99670f)!important;color:white!important;font:700 14px Georgia,serif!important;min-height:38px;padding:7px 12px!important;border-radius:18px!important}
body[data-page="/cliente/mensajes"] .ch-avatar{flex:none;order:0!important;align-self:stretch!important;display:grid!important;grid-template-columns:61px minmax(0,1fr);grid-template-rows:auto auto auto;gap:2px 9px!important;align-items:center;border:1px solid #dfcfb4!important;border-radius:12px!important;padding:7px 9px!important;background:#fffaf1!important}
body[data-page="/cliente/mensajes"] .ch-avatar:after{display:none!important}
body[data-page="/cliente/mensajes"] .ch-avatar-foto{grid-row:1/4;grid-column:1;width:60px!important;height:60px!important;aspect-ratio:1!important;border-radius:50%!important;border:1px solid #c9973b;background:url('/static/equipo/alberto-casan.jpg') center/cover!important}
body[data-page="/cliente/mensajes"] .ch-avatar-foto img{visibility:hidden}
body[data-page="/cliente/mensajes"] .ch-avatar-nombre{grid-column:2;font:700 16px/1.15 Georgia,serif!important;margin:0!important}
body[data-page="/cliente/mensajes"] .ch-avatar>.sub{grid-column:2;font:11px/1.15 Georgia,serif!important;padding:0!important;letter-spacing:0!important;margin:0!important}
body[data-page="/cliente/mensajes"] .ch-avatar .premium-personal{grid-column:2;font:600 11px/1.2 Georgia,serif!important;background:linear-gradient(#e1b354,#a8751d)!important;color:white!important;margin:2px 0 0!important;padding:4px 7px!important;border-radius:12px!important;justify-self:start}
body[data-page="/cliente/mensajes"] .ch-avatar .premium-notice{display:none}
body[data-page="/cliente/mensajes"] footer{flex:none;padding:0!important;border-top:1px solid #c9973b!important;background:#102438!important}
body[data-page="/cliente/mensajes"] footer>.ancho{display:none!important}
body[data-page="/cliente/mensajes"] footer .mobile-chat-footer{display:flex;justify-content:center;align-items:center;gap:7px;color:#f5e6bf;font:11px/1.2 Georgia,serif;padding:8px 4px max(8px,env(safe-area-inset-bottom))}
body[data-page="/cliente/mensajes"] footer .mobile-chat-footer img{height:17px;width:17px;filter:brightness(0) saturate(100%) invert(76%) sepia(65%) saturate(950%) hue-rotate(354deg)}
body[data-page="/cliente/mensajes"].mobile-keyboard .ch-avatar,body[data-page="/cliente/mensajes"].mobile-keyboard footer{display:none!important}
}
@media(max-width:780px){body[data-page="/cliente/mensajes"] .ch-avatar-foto,body[data-page="/cliente/mensajes"] .ch-msg.suyo:before{background-image:url("/static/equipo/premium-retrato-movil.jpg")!important;background-size:cover!important;background-position:center!important}}

/* Compact full name on mobile; keep desktop unchanged. */
@media(max-width:780px){body[data-page="/cliente/mensajes"] .ch-avatar-nombre{font-size:clamp(10px,3.8vw,14px)!important;line-height:1.15!important;white-space:nowrap;letter-spacing:-.15px}}
@media(max-width:340px){body[data-page="/cliente/mensajes"] .ch-avatar-nombre{font-size:clamp(9px,3.45vw,12px)!important}}

/* Approved mobile header: original wheat artwork, navy and gold curve. */
@media(max-width:780px){
body[data-page="/cliente/mensajes"] header{background:#102438!important;border-bottom:0!important;min-height:85px!important}
body[data-page="/cliente/mensajes"] header:before{inset:auto 0 0 auto!important;width:100%!important;height:57px!important;background:url('/static/equipo/premium-espigas-original.png') no-repeat right bottom!important;background-size:auto 100%!important;opacity:1!important;mask-image:linear-gradient(90deg,transparent 15%,#000 65%)!important;-webkit-mask-image:linear-gradient(90deg,transparent 15%,#000 65%)!important}
body[data-page="/cliente/mensajes"] header:after{content:"";position:absolute;inset:auto 0 0;height:32px;pointer-events:none;z-index:0;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 360 32' preserveAspectRatio='none'%3E%3Cpath d='M0 1 Q140 9 250 26 Q320 36 360 26 V32 H0 Z' fill='%23f7f2e9'/%3E%3Cpath d='M0 1 Q140 9 250 26 Q320 36 360 26' fill='none' stroke='%23c9973b' stroke-width='1.3'/%3E%3C/svg%3E") center/100% 100% no-repeat}
body[data-page="/cliente/mensajes"] header .ancho{z-index:1;min-height:85px!important;padding-bottom:7px!important}
body[data-page="/cliente/mensajes"] .mobile-chat-menu{background:#102438!important;box-shadow:none!important;border-radius:4px;position:relative;z-index:2}
body[data-page="/cliente/mensajes"] header details.idiomas>summary{background:#102438!important;border:1px solid #c9973b!important}
}

/* V24: rebuild the approved mobile masthead, not just its lower border. */
@media(max-width:780px){
body[data-page="/cliente/mensajes"] header{min-height:110px!important;background:linear-gradient(112deg,#0b2035,#18384d)!important;isolation:isolate;overflow:visible!important}
body[data-page="/cliente/mensajes"] header .ancho{height:110px!important;min-height:110px!important;padding:10px 12px 0!important;grid-template-rows:49px 38px!important;align-content:start!important;gap:3px 8px!important}
body[data-page="/cliente/mensajes"] header .marca{gap:9px!important;align-self:start!important}
body[data-page="/cliente/mensajes"] header .marca img{width:44px!important;height:44px!important}
body[data-page="/cliente/mensajes"] header .marca span{border-inline-start:1px solid #c9973b;padding-inline-start:9px}
body[data-page="/cliente/mensajes"] header .marca b{font:400 clamp(15px,5.3vw,23px)/1.15 Georgia,serif!important;letter-spacing:.65px!important;color:#eac16e!important}
body[data-page="/cliente/mensajes"] header .marca small{font:italic 10px/1.3 Georgia,serif!important;letter-spacing:.5px!important;text-align:center;color:#fff4dd!important}
body[data-page="/cliente/mensajes"] header:before{inset:auto 0 0 auto!important;width:76%!important;height:64px!important;background:url('/static/equipo/premium-espigas-original.png') no-repeat 55% bottom!important;background-size:auto 100%!important;mask-image:linear-gradient(90deg,transparent 0%,#000 29%)!important;-webkit-mask-image:linear-gradient(90deg,transparent 0%,#000 29%)!important;opacity:1!important}
body[data-page="/cliente/mensajes"] header:after{height:56px!important;z-index:0!important;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 360 56' preserveAspectRatio='none'%3E%3Cpath d='M0 0 L0 40 L95 40 C174 40 242 54 310 55 Q337 55 360 49 L360 56 H0Z' fill='%23f7f2e9'/%3E%3Cpath d='M0 4 C111 19 218 49 310 55 Q338 55 360 49' fill='none' stroke='%23d2a13f' stroke-width='1.5'/%3E%3C/svg%3E") center/100% 100% no-repeat!important}
body[data-page="/cliente/mensajes"] .mobile-chat-menu{align-self:start!important;margin-top:3px!important;background:transparent!important;height:30px!important;width:32px!important;padding:2px!important;border:0!important}
body[data-page="/cliente/mensajes"] header details.idiomas>summary{padding:7px 8px!important;border-radius:8px!important;font:400 13px Georgia,serif!important;color:#fff4dd!important}
}

@media(max-width:780px){
body[data-page="/cliente/mensajes"] .premium-heading{order:0}
body[data-page="/cliente/mensajes"] .premium-chat{order:1}
body[data-page="/cliente/mensajes"] .ch-avatar{order:2!important}
body[data-page="/cliente/mensajes"] .ch-nota-movil{display:none!important}
body[data-page="/cliente/mensajes"] .premium-chat .ch-trad{font-size:11px;line-height:1.2}
body[data-page="/cliente/mensajes"] .premium-chat .ch-trad .sub{display:none}
}
