/* Messages (MAKERS-44): one inbox for private messages, requests and shop chats. A calm sheet from the right on
   wide screens and from the bottom on phones, in the station's dark glass. */
.ix { position: fixed; inset: 0; z-index: 2147483000; }
.ix[hidden] { display: none; }
.ix-scrim { position: absolute; inset: 0; background: rgb(0 0 0 / .5); opacity: 0; transition: opacity .3s ease; }
.ix.is-open .ix-scrim { opacity: 1; }
.ix-sheet { position: absolute; top: 12px; right: 12px; bottom: 12px; width: min(440px, calc(100% - 24px)); display: flex; flex-direction: column; border-radius: 28px; background: rgb(10 17 14 / .9); -webkit-backdrop-filter: blur(28px) saturate(1.5); backdrop-filter: blur(28px) saturate(1.5); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .1), 0 30px 80px rgb(0 0 0 / .55); color: #eef8f2; transform: translateX(24px); opacity: 0; transition: transform .38s cubic-bezier(.32, .72, 0, 1), opacity .3s ease; overflow: hidden; }
.ix.is-open .ix-sheet { transform: none; opacity: 1; }
.ix-head { display: flex; align-items: center; gap: 8px; padding: 14px 14px 10px 18px; }
.ix-head h2 { flex: 1; margin: 0; font-size: 20px; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ix-head-actions { display: flex; gap: 6px; }
.ix-icon { width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgb(255 255 255 / .08); color: inherit; font-size: 18px; cursor: pointer; display: grid; place-items: center; }
.ix-icon:hover { background: rgb(255 255 255 / .14); }
.ix-body { flex: 1; overflow: auto; padding: 4px 12px 12px; display: flex; flex-direction: column; min-height: 0; }
.ix-status { margin: 0; padding: 0 18px 12px; font-size: 13px; color: #9fb6aa; min-height: 0; }
.ix-status:empty { display: none; }
.ix-status.is-error { color: #ffb199; }
.ix-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ix-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 8px; border: 0; border-radius: 16px; background: none; color: inherit; text-align: left; font: inherit; text-decoration: none; cursor: pointer; }
.ix-row:hover, .ix-row:focus-visible { background: rgb(255 255 255 / .06); }
.ix-avatar { width: 44px; height: 44px; flex: 0 0 auto; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: #1b2a22; color: #8ff5c0; font-weight: 700; font-size: 15px; }
.ix-avatar.is-shop { border-radius: 14px; }
.ix-row-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ix-row-text b { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ix-row-text span { color: #9fb6aa; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ix-row-meta { display: grid; justify-items: end; gap: 4px; font-size: 12px; color: #9fb6aa; }
.ix-dot { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #64edaa; color: #04140c; font-size: 12px; font-weight: 800; display: inline-grid; place-items: center; }
.ix-requests { margin: 4px 0 10px; padding: 8px; border-radius: 18px; background: rgb(100 237 170 / .07); }
.ix-requests summary { cursor: pointer; font-weight: 650; display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 6px; }
.ix-section { margin: 16px 8px 6px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: #9fb6aa; }
.ix-note { color: #9fb6aa; font-size: 13px; margin: 6px 8px; }
.ix-center { text-align: center; }
.ix-empty { margin: auto; text-align: center; padding: 30px 16px; color: #9fb6aa; display: grid; gap: 10px; justify-items: center; }
.ix-empty-title { color: #eef8f2; font-size: 18px; font-weight: 650; margin: 0; }
.ix-loading { width: 14px; height: 14px; border-radius: 50%; background: #64edaa; box-shadow: 0 0 16px #64edaa; animation: ix-pulse 1.2s ease-in-out infinite; }
@keyframes ix-pulse { 50% { opacity: .35; transform: scale(.8); } }
.ix-settings { margin: 18px 8px 4px; color: #9fb6aa; font-size: 14px; }
.ix-settings summary { cursor: pointer; min-height: 40px; display: flex; align-items: center; }
.ix-switch { display: flex; gap: 10px; align-items: center; margin: 8px 0; color: #eef8f2; }
.ix-switch input { width: 20px; height: 20px; accent-color: #64edaa; }
.ix-search input { width: 100%; min-height: 46px; padding: 0 16px; border: 0; border-radius: 23px; background: rgb(255 255 255 / .08); color: inherit; font: inherit; margin: 6px 0 10px; }
.ix-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ix-thread-head { display: flex; align-items: center; gap: 10px; padding: 4px 6px 10px; border-bottom: 1px solid rgb(255 255 255 / .08); }
.ix-thread-head b { flex: 1; }
.ix-menu { position: relative; }
.ix-menu summary { list-style: none; cursor: pointer; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: rgb(255 255 255 / .08); letter-spacing: 1px; }
.ix-menu summary::-webkit-details-marker { display: none; }
.ix-menu > div { position: absolute; right: 0; top: 46px; z-index: 2; display: grid; min-width: 200px; padding: 6px; border-radius: 16px; background: #15211b; box-shadow: 0 16px 40px rgb(0 0 0 / .5), inset 0 0 0 1px rgb(255 255 255 / .1); }
.ix-menu button { text-align: left; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: none; color: inherit; font: inherit; cursor: pointer; }
.ix-menu button:hover { background: rgb(255 255 255 / .07); }
.ix-messages { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 6px; padding: 12px 4px; min-height: 120px; }
.ix-bubble { max-width: 78%; align-self: flex-start; padding: 8px 12px 6px; border-radius: 18px 18px 18px 6px; background: rgb(255 255 255 / .09); }
/* Sent bubbles: white on #1a7038 is 6.1:1 and the time at .85 is 4.9:1 (WCAG AA 4.5:1; #2e9a52 was 3.6:1). */
.ix-bubble.is-mine { align-self: flex-end; border-radius: 18px 18px 6px 18px; background: #1a7038; color: #fff; }
.ix-bubble p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.4; }
.ix-bubble img { display: block; max-width: 100%; border-radius: 12px; margin-bottom: 4px; }
.ix-bubble time { display: block; margin-top: 2px; font-size: 11px; opacity: .7; text-align: right; }
.ix-bubble.is-mine time { opacity: .85; }
.ix-compose { display: flex; align-items: flex-end; gap: 8px; padding-top: 8px; flex-wrap: wrap; }
.ix-compose .ix-note { flex-basis: 100%; }
.ix-compose textarea { flex: 1; min-height: 44px; max-height: 140px; padding: 11px 14px; border: 0; border-radius: 22px; background: rgb(255 255 255 / .08); color: inherit; font: inherit; resize: none; }
.ix-photo, .ix-send { width: 44px; height: 44px; flex: 0 0 auto; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer; font-size: 20px; }
.ix-photo { background: rgb(255 255 255 / .08); }
.ix-send { background: #64edaa; color: #04140c; font-weight: 800; }
.ix-request-bar { padding: 12px; border-radius: 18px; background: rgb(100 237 170 / .08); display: grid; gap: 10px; }
.ix-request-bar p { margin: 0; }
.ix-request-bar div { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.profile-inbox-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #64edaa; color: #04140c; font-size: 11px; font-weight: 800; display: inline-grid; place-items: center; margin-left: 6px; }
.profile-inbox-badge[hidden] { display: none; }
.comment-message { color: #8ff5c0; }
/* A shop chat opened in Messages (review T1-03): the same chat as on the shop and order pages (makers.js mountThread),
   filling the sheet under its header. */
.ix-shop-chat { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ix-shop-chat .mk-chat { flex: 1; min-height: 0; max-height: none; padding: 0; border-radius: 0; background: none; box-shadow: none; }
html.ix-open { overflow: hidden; }
@media (max-width: 640px) {
	.ix-sheet { top: auto; left: 0; right: 0; bottom: 0; width: auto; height: min(92svh, 100%); border-radius: 28px 28px 0 0; transform: translateY(40px); padding-bottom: env(safe-area-inset-bottom); }
}
@media (prefers-reduced-motion: reduce) { .ix-sheet, .ix-scrim { transition: none; } .ix-loading { animation: none; } }
.ix button:focus-visible, .ix a:focus-visible, .ix textarea:focus-visible, .ix input:focus-visible { outline: 2px solid #8ff5c0; outline-offset: 2px; }
