/* Only the new chat and coupon elements; existing layout and themes unchanged. */
#page-home > #salsan-daily-coupon {grid-column:1/-1;min-width:0;box-sizing:border-box;margin:0 0 12px;padding:14px;border-radius:14px;border:1px solid #94752d;background:#211b10;color:#f8e4a2;overflow-wrap:anywhere}
#salsan-daily-coupon h2{margin:0 0 8px;font-size:16px;color:inherit}
#salsan-daily-coupon .daily-coupon-body{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;font-size:14px}
.daily-coupon-details{display:grid;gap:5px;min-width:0;max-width:100%}
.daily-coupon-details small{color:inherit;opacity:.85}
.daily-coupon-details code{font-size:16px;font-weight:bold;overflow-wrap:anywhere;white-space:normal}
.daily-coupon-actions button{min-height:44px;max-width:100%;white-space:normal}
#salsan-guided-chat{min-width:0;display:grid;gap:12px}
#salsan-guided-chat h2{margin:0}
#salsan-guided-chat .guided-context{border:1px solid #94752d;border-radius:10px;padding:10px;overflow-wrap:anywhere;font-size:13px}
#salsan-guided-chat .guided-context summary{cursor:pointer;font-weight:600}
#salsan-guided-chat .guided-context p{margin:8px 0 0;line-height:1.5}
#salsan-guided-chat .guided-thread{display:flex;flex-direction:column;gap:8px;max-height:36vh;max-height:36dvh;overflow:auto;min-width:0;padding:8px}
#salsan-guided-chat .bubble{max-width:94%;width:fit-content;overflow-wrap:anywhere;box-sizing:border-box;white-space:pre-wrap}
#salsan-guided-chat .bubble p{margin:0}
#salsan-guided-chat .bubble.admin{align-self:flex-start}
#salsan-guided-chat .bubble.client{align-self:flex-end}
#salsan-guided-chat .guided-choices{display:grid;gap:8px;min-width:0}
#salsan-guided-chat .guided-choices button,#salsan-guided-chat .modal-form button{min-height:44px;white-space:normal;overflow-wrap:anywhere;text-align:center}
#salsan-guided-chat .modal-form{min-width:0;margin:0}
#salsan-guided-chat :is(input,textarea){box-sizing:border-box;max-width:100%;min-width:0;width:100%}
html[data-salsan-theme="light"] #page-home > #salsan-daily-coupon{background:#fff8e3;color:#102f79;border-color:#d4af37}
html[data-salsan-theme="light"] #salsan-guided-chat .guided-context{background:#f3f6fb;color:#102f79;border-color:#c9d7ec}
#salsan-daily-coupon .daily-coupon-body{display:grid;gap:10px;grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr))}
.daily-coupon-item{min-width:0;border:1px solid currentColor;border-radius:10px;padding:10px;display:grid;gap:8px}
.daily-coupon-open{display:flex;justify-content:space-between;align-items:center;gap:8px;text-align:left;background:transparent;color:inherit;border:0;padding:4px;width:100%;min-height:44px;cursor:pointer}
.daily-coupon-open span:first-child{display:grid;gap:5px;min-width:0}.daily-coupon-open small{color:inherit;opacity:.85}
.daily-coupon-actions{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}.daily-coupon-actions code{overflow-wrap:anywhere;min-width:0;font-weight:bold}
.daily-coupon-modal{display:grid;gap:12px;min-width:0;overflow-wrap:anywhere}.daily-coupon-image-wrap{max-height:60vh;overflow:auto}.daily-coupon-image{display:block;max-width:100%;height:auto;margin:auto}.daily-coupon-modal a{color:inherit;text-decoration:underline}

/* SALSAN_TRANSACTION_CONTEXT_V4 */
.salsan-tx-context{margin:9px 0;min-width:0;max-width:100%;padding:10px;border:1px solid currentColor;border-radius:10px;font-size:13px;line-height:1.4;white-space:normal;overflow-wrap:anywhere;box-sizing:border-box}
.salsan-tx-context dl{display:grid;gap:5px;margin:0;padding:0}
.salsan-tx-context dl>div{display:grid;grid-template-columns:minmax(84px,42%) minmax(0,1fr);gap:8px;align-items:start}
.salsan-tx-context dt{font-weight:600;opacity:.85}.salsan-tx-context dd{margin:0;text-align:left;min-width:0;overflow-wrap:anywhere}
#salsan-guided-chat .bubble:has(.salsan-tx-context){width:94%;max-width:94%}
#salsan-guided-chat .guided-thread:has(.salsan-tx-context){max-height:50vh;max-height:50dvh}
.salsan-tx-context details{margin:0}

/* SALSAN_GUIDED_INLINE_V5 */
/* One scrollbar only: the dialog, not the conversation inside it. */
#modal:has(#salsan-guided-chat){overflow-y:auto;overscroll-behavior:contain}
#modal:has(#salsan-guided-chat) .modal-card,#modal:has(#salsan-guided-chat) #modal-content{max-height:none;overflow:visible;min-width:0}
#salsan-guided-chat .guided-thread,#salsan-guided-chat .guided-thread:has(.salsan-tx-context){max-height:none!important;height:auto!important;overflow:visible!important;min-width:0;max-width:100%;padding:4px 0;gap:12px;box-sizing:border-box}
#salsan-guided-chat .guided-thread>.bubble{flex:0 0 auto;min-width:0}
#salsan-guided-chat .guided-thread>.bubble.admin.guided-current{width:94%;max-width:94%}
#salsan-guided-chat .guided-inline-controls{display:grid;gap:8px;margin-top:12px;min-width:0;white-space:normal}
#salsan-guided-chat .guided-inline-controls .guided-choices,#salsan-guided-chat .guided-inline-controls .modal-form{width:100%;min-width:0;margin:0;box-sizing:border-box}
#salsan-guided-chat .guided-inline-controls button{width:100%;min-width:0;max-width:100%;min-height:44px;box-sizing:border-box;white-space:normal;overflow-wrap:anywhere}
#salsan-guided-chat .guided-inline-controls input,#salsan-guided-chat .guided-inline-controls textarea{min-width:0;max-width:100%;box-sizing:border-box}
@media(max-width:480px){#salsan-guided-chat .guided-thread>.bubble.admin.guided-current,#salsan-guided-chat .bubble:has(.salsan-tx-context){width:100%;max-width:100%}}
/* SALSAN_UNIFIED_CHAT_V6 */
#salsan-unified-chat{display:flex;flex-direction:column;gap:8px;min-width:0;max-height:76vh;max-height:76dvh}
#salsan-unified-chat h2{margin:0}#salsan-unified-chat .unified-thread{flex:1 1 auto;min-height:100px;max-height:none!important;overflow:auto;overscroll-behavior:contain;display:flex;flex-direction:column;gap:8px;min-width:0}
#salsan-unified-chat .bubble{flex:0 0 auto;max-width:95%;overflow-wrap:anywhere;white-space:pre-wrap}#salsan-unified-chat .bubble p{margin:0}#salsan-unified-chat .bubble.client{align-self:flex-end}#salsan-unified-chat .bubble.admin{align-self:flex-start}
#salsan-unified-chat .chat-compose{flex:0 0 auto;display:grid;gap:6px;min-width:0}#salsan-unified-chat [hidden]{display:none!important}
.chat-compose-row{display:flex;gap:6px;align-items:center;min-width:0}.chat-compose-row textarea{flex:1 1 0;min-width:0;max-height:100px;resize:vertical;border-radius:18px;padding:10px;box-sizing:border-box}
#salsan-unified-chat .chat-icon,#salsan-guided-chat .chat-icon{display:inline-flex;align-items:center;justify-content:center;flex:0 0 44px;width:44px!important;height:44px;min-height:44px;padding:0!important;border:1px solid currentColor;border-radius:50%;background:transparent;color:inherit;cursor:pointer}
#salsan-unified-chat .chat-send{background:#102f79;color:white;border-color:#102f79}#salsan-unified-chat .recording,#salsan-guided-chat .recording{background:#a52121;color:white}
.chat-pending{display:flex;align-items:center;flex-wrap:wrap;gap:8px;font-size:12px;overflow-wrap:anywhere}.chat-pending audio,.chat-media audio{max-width:100%;width:245px}.chat-pending button{margin-left:auto}.chat-error{color:#b33c36}.chat-guided-label{font-size:11px;opacity:.8;text-align:center}.chat-media{display:grid;gap:3px;max-width:100%}.chat-pdf{display:block;padding:8px;overflow-wrap:anywhere}
#salsan-guided-chat .guided-inline-controls .chat-clip-label{display:flex;align-items:center;gap:8px;cursor:pointer;padding:10px;border:1px solid currentColor;border-radius:10px;white-space:normal}#salsan-guided-chat .guided-inline-controls .chat-clip-label input{max-width:100%;width:100%}
@media(max-width:400px){.chat-compose-row{gap:3px}#salsan-unified-chat .chat-icon{flex-basis:38px;width:38px!important;height:38px;min-height:38px}}

#salsan-guided-chat .chat-clip-label{position:relative}#salsan-guided-chat .chat-clip-label input[type=file]{position:absolute;width:1px!important;height:1px!important;opacity:0;overflow:hidden;padding:0!important}#salsan-guided-chat .chat-clip-label:focus-within{outline:2px solid currentColor}

/* SALSAN_CHAT_DIALOGUE_V7 */
.chat-v7-role{display:block;font-size:11px;font-weight:700;opacity:.75;margin-bottom:4px}.chat-v7-preview{display:inline-flex;align-items:center;gap:8px}.chat-v7-preview audio{display:none}.chat-v7-preview button{margin:0!important}

/* SALSAN_CHAT_PAGE_V8 */
#page-discussion{min-width:0;max-width:1080px}#page-discussion .discussion-heading{margin-bottom:10px}
#discussion-content{min-width:0;width:100%;box-sizing:border-box}
#discussion-content #salsan-unified-chat,#discussion-content #salsan-guided-chat{display:flex;flex-direction:column;gap:8px;box-sizing:border-box;height:calc(100vh - var(--bar-height,60px) - var(--nav-height,64px) - var(--top-safe,0px) - var(--bottom-safe,0px) - 125px);height:calc(100dvh - var(--bar-height,60px) - var(--nav-height,64px) - var(--top-safe,0px) - var(--bottom-safe,0px) - 125px);min-height:240px;max-height:none;padding:12px;border:1px solid #8090ab55;border-radius:14px;overflow:hidden;min-width:0}
#discussion-content #salsan-unified-chat h2,#discussion-content #salsan-guided-chat h2{font-size:18px;margin:0;flex:0 0 auto}#discussion-content #chat-status,#discussion-content #salsan-guided-chat>small{flex:0 0 auto;overflow-wrap:anywhere}
#discussion-content #salsan-guided-chat .guided-thread,#discussion-content #salsan-unified-chat .unified-thread{flex:1 1 0;min-height:0!important;max-height:none!important;height:auto!important;overflow:auto!important;overscroll-behavior:contain;padding:6px;box-sizing:border-box;scrollbar-gutter:stable;min-width:0;display:flex;flex-direction:column;gap:10px}
#discussion-content .bubble{flex:0 0 auto;min-width:0;overflow-wrap:anywhere}#discussion-content .bubble img{max-width:100%;height:auto;object-fit:contain}#discussion-content .chat-compose{flex:0 0 auto;min-width:0}
#discussion-content .chat-compose-row textarea{font-size:16px}#discussion-content .guided-inline-controls{display:grid;gap:8px}#discussion-content .guided-inline-controls .guided-choices{display:grid;gap:8px}#discussion-content .guided-inline-controls .modal-form{width:100%}#discussion-content .chat-pending{max-height:120px;overflow:auto}
@media(min-width:900px){#discussion-content #salsan-unified-chat,#discussion-content #salsan-guided-chat{height:calc(100dvh - var(--bar-height,60px) - var(--top-safe,0px) - 155px);padding:16px}}
.salsan-keyboard #discussion-content #salsan-unified-chat,.salsan-keyboard #discussion-content #salsan-guided-chat{height:calc(var(--keyboard-viewport,100dvh) - var(--bar-height,60px) - var(--top-safe,0px) - 105px);min-height:180px}
@media(max-width:480px){#discussion-content #salsan-unified-chat,#discussion-content #salsan-guided-chat{padding:8px}#discussion-content .bubble:has(.salsan-tx-context){width:100%;max-width:100%}}
