/* Shared conversation presentation. Keep each chat's existing forms and live-update logic. */
:root{--dm-chat-ink:#133425;--dm-chat-green:#087b43;--dm-chat-me:#d9f8e5;--dm-chat-them:#fff;--dm-chat-wall:#eaf2e9;--dm-chat-line:#c8decf}
.chat-shell,.wifi-chat-page,.market-chat-main{max-width:920px!important}
.chat-card,.wifi-chat-page .commerce-section,.market-chat-item,.market-chat-panel,.market-chat-compose,.earn-chat-panel{border:1px solid var(--dm-chat-line)!important;border-radius:22px!important;box-shadow:0 12px 32px #153e2818!important;overflow:hidden}
.chat-header,.market-chat-item,.wifi-chat-page .commerce-section>h1,.earn-chat-header{background:linear-gradient(110deg,#06452b,#099554)!important;color:#fff!important}
.chat-header{padding:16px!important;border-bottom:0!important}
.chat-header h2,.chat-header .text-muted,.market-chat-item h1,.market-chat-item small,.market-chat-item p,.market-chat-item strong,.wifi-chat-page .commerce-section>h1,.earn-chat-header-title,.earn-chat-header-subtitle{color:#fff!important}
.chat-header .chat-avatar{width:54px;height:54px;border-radius:50%;object-fit:cover;border:3px solid #fff}
.chat-header .btn{min-height:44px;border-radius:12px;font-weight:800}
.chat-window,.chat-container,.booking-chat-thread,#messageConversations,.wifi-chat-messages,.market-chat-panel,.earn-chat-messages{background-color:var(--dm-chat-wall)!important;background-image:radial-gradient(#d0e2d1 1px,transparent 1px)!important;background-size:24px 24px!important;scroll-behavior:smooth}
.chat-window,.chat-container,.wifi-chat-messages,.market-chat-panel,.earn-chat-messages{min-height:250px;max-height:min(62dvh,720px)!important;overflow-y:auto!important;padding:16px!important}
.chat-row,.chat-message{margin:10px 0!important}
.chat-bubble,.booking-chat-bubble,.wifi-chat-bubble,.market-bubble,.earn-chat-bubble,#messageConversations .admin-message-body,#messageConversations .user-reply{width:max-content;max-width:min(82%,600px)!important;padding:11px 14px!important;border:1px solid #dce9df!important;border-radius:17px 17px 17px 4px!important;background:var(--dm-chat-them)!important;color:var(--dm-chat-ink)!important;box-shadow:0 3px 10px #0e37201a!important;overflow-wrap:anywhere}
.chat-row.me .chat-bubble,.chat-row.you .chat-bubble,.chat-message.user .chat-bubble,.booking-chat-bubble.customer,.wifi-chat-bubble.is-mine,.market-bubble.is-me,.earn-chat-bubble-agent,#messageConversations .admin-message-body{margin-left:auto!important;background:var(--dm-chat-me)!important;border-color:#bce6cb!important;border-radius:17px 17px 4px 17px!important}
.earn-chat-bubble-admin{justify-self:start}.earn-chat-bubble-agent{justify-self:end}
.chat-meta,.chat-time,.booking-chat-time,.market-bubble time,.wifi-chat-bubble small,.earn-chat-meta{display:block;font-size:.74rem!important;color:#587064!important;margin-top:5px}
.chat-bubble p,.wifi-chat-bubble p,.market-bubble p{margin:4px 0 0;line-height:1.45}
.chat-bubble audio,.chat-media audio,.booking-chat-bubble audio,.wifi-chat-bubble audio,.market-bubble audio,.earn-chat-bubble audio,#messageConversations audio,.chat-container audio{display:block;width:min(330px,100%);max-width:100%;margin:8px 0;border-radius:12px}
.chat-media img,.chat-bubble img,.wifi-chat-bubble img,.market-bubble img{max-width:100%;height:auto;border-radius:12px}
.chat-file-link,.wifi-chat-file,.market-file-link,.earn-chat-attachment-link{display:inline-flex;align-items:center;min-height:44px;max-width:100%;padding:9px 12px;border:1px solid #aed3bc;border-radius:12px;background:#fff;color:#075c38!important;font-weight:800;overflow-wrap:anywhere}
.composer,.market-chat-compose,#wifiChatForm,.earn-chat-form,.chat-shell form[method="POST"]{background:#fff!important;border:1px solid var(--dm-chat-line)!important;border-radius:18px!important;padding:14px!important;box-shadow:0 -6px 18px #123e2812!important}
.chat-card .composer,#wifiChatForm{position:sticky;bottom:0;z-index:5}
body:has(.easy-interior-bottom) .chat-card .composer,body:has(.easy-interior-bottom) #wifiChatForm,body:has(.easy-interior-bottom) .market-chat-compose{bottom:64px}
.composer textarea,.market-chat-compose textarea,#wifiChatForm textarea,.earn-chat-form textarea,.chat-shell textarea,.chat-shell input[type=text],.reply-form input[type=text]{width:100%;min-height:50px;border:2px solid #bfd9c8!important;border-radius:14px!important;padding:11px 13px;font:inherit}
.composer textarea:focus,.market-chat-compose textarea:focus,#wifiChatForm textarea:focus,.earn-chat-form textarea:focus,.chat-shell textarea:focus{outline:3px solid #ffcb42;outline-offset:1px;border-color:var(--dm-chat-green)!important}
.composer button,.market-chat-controls button,#wifiChatForm button,.earn-chat-form button,.reply-form button,.chat-shell button[type=submit]{min-height:48px;border-radius:13px!important;font-weight:850}
.composer button[type=submit],.market-chat-controls button[type=submit],#wifiChatForm button[type=submit],.earn-chat-form button[type=submit],.reply-form button[type=submit]{background:var(--dm-chat-green)!important;border-color:var(--dm-chat-green)!important;color:#fff!important}
.market-chat-item{padding:12px!important}.market-chat-thumb{width:75px!important;height:75px!important;flex-basis:75px!important}.market-chat-panel{margin-top:10px!important}.market-chat-panel>h2,.market-chat-help{background:#e1f3e6;padding:8px 12px;margin:0 -16px 10px!important;color:#17472f!important}.market-chat-compose{position:sticky;bottom:0;z-index:5}
.wifi-chat-page .commerce-section>h1{margin:-18px -18px 12px;padding:16px!important;font-size:1.35rem}.wifi-chat-page .commerce-section>p{font-weight:700;color:#587064}.wifi-chat-message-actions{opacity:.85}
.earn-chat-thread-link{border-color:var(--dm-chat-line)!important;background:#fff!important}.earn-chat-thread-link.is-active{border-color:var(--dm-chat-green)!important;background:#e5f8ea!important}.earn-chat-panel{padding:14px!important}.earn-chat-messages{display:grid;gap:10px}
#messageConversations .admin-message{background:transparent!important;border:0!important;box-shadow:none!important}#messageConversations .user-reply{margin-left:0!important}
.reply-form,.replyForm{display:flex;flex-wrap:wrap;gap:8px;padding:10px;border:1px solid var(--dm-chat-line);border-radius:14px;background:#fff}.reply-form input[type=text],.replyForm input[type=text]{flex:1 1 180px}.reply-form button,.replyForm button{min-height:46px;border-radius:12px}
@media(max-width:650px){.chat-shell,.wifi-chat-page,.market-chat-main{padding-left:8px!important;padding-right:8px!important}.chat-card,.wifi-chat-page .commerce-section,.market-chat-panel,.market-chat-compose{border-radius:14px!important}.chat-window,.chat-container,.wifi-chat-messages,.market-chat-panel,.earn-chat-messages{max-height:calc(100dvh - 285px)!important;min-height:240px;padding:10px!important}.chat-bubble,.booking-chat-bubble,.wifi-chat-bubble,.market-bubble,.earn-chat-bubble,#messageConversations .admin-message-body,#messageConversations .user-reply{max-width:90%!important}.market-chat-compose{margin:0 -8px!important;border-radius:16px 16px 0 0!important}.market-chat-controls{grid-template-columns:repeat(2,minmax(0,1fr))}.market-chat-controls button[type=submit]{grid-column:1/-1}.wifi-chat-controls{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.wifi-chat-controls input[type=file]{grid-column:1/-1;width:100%}.wifi-chat-controls button[type=submit]{grid-column:1/-1}.earn-chat-layout{grid-template-columns:1fr!important}.earn-chat-sidebar{max-height:140px;overflow:auto}.chat-header{display:block}.chat-toolbar{display:flex;flex-wrap:wrap;gap:7px;margin-top:10px}}
@media(prefers-reduced-motion:reduce){.chat-window,.chat-container,.wifi-chat-messages,.market-chat-panel,.earn-chat-messages{scroll-behavior:auto}}
