/* Medora Support: the chat button and window. */
.mch { --mch-c: #0ea5b7; position: fixed; bottom: 20px; z-index: 99990; font-family: inherit; color: #0f172a; }
.mch--left { left: 20px; }
.mch--right { right: 20px; }
.mch *, .mch *::before, .mch *::after { box-sizing: border-box; }
.mch-fab { position: relative; display: grid; place-items: center; width: 60px; height: 60px; padding: 0; border: 0; border-radius: 50%; background: var(--mch-c); color: #fff; cursor: pointer; box-shadow: 0 12px 28px -8px color-mix(in srgb, var(--mch-c) 70%, transparent), 0 4px 10px rgba(15, 23, 42, .15); transition: transform .2s; }
.mch-fab:hover { transform: scale(1.06); }
.mch-fab svg { width: 28px; height: 28px; }
.mch.is-open .mch-fab { transform: scale(.9); }
.mch-badge { position: absolute; top: -2px; inset-inline-end: -2px; min-width: 22px; height: 22px; padding: 0 6px; border: 2px solid #fff; border-radius: 999px; background: #ef4444; color: #fff; font-size: 12px; font-weight: 700; line-height: 18px; text-align: center; }
.mch-badge[hidden] { display: none; }

.mch-win { position: absolute; bottom: 76px; display: flex; flex-direction: column; width: 380px; height: min(620px, calc(100vh - 110px)); border-radius: 22px; background: #fff; box-shadow: 0 30px 70px -20px rgba(15, 23, 42, .45), 0 0 0 1px rgba(15, 23, 42, .06); overflow: hidden; animation: mchIn .22s ease; }
.mch--left .mch-win { left: 0; }
.mch--right .mch-win { right: 0; }
.mch-win[hidden] { display: none; }
.mch-win.is-drop { outline: 3px dashed var(--mch-c); outline-offset: -6px; }
@keyframes mchIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }

.mch-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 14px; background: linear-gradient(135deg, var(--mch-c), color-mix(in srgb, var(--mch-c) 60%, #0f172a)); color: #fff; }
.mch-ava { position: relative; display: grid; place-items: center; flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%; background: rgba(255, 255, 255, .2); }
.mch-ava svg { width: 22px; height: 22px; }
.mch-ava::after { content: ""; position: absolute; bottom: 1px; inset-inline-end: 1px; width: 11px; height: 11px; border: 2px solid #fff; border-radius: 50%; background: #94a3b8; }
.mch.is-online .mch-ava::after { background: #22c55e; }
.mch-head__t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.4; }
.mch-head__t strong { font-size: 16px; }
.mch-head__t small { opacity: .85; font-size: 12.5px; }
.mch-x { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .16); color: #fff; cursor: pointer; }
.mch-x svg { width: 18px; height: 18px; }

.mch-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 16px 14px; background: #f8fafc; scroll-behavior: smooth; }
.mch-msg { display: flex; flex-direction: column; gap: 6px; max-width: 88%; align-self: flex-start; }
.mch-msg--customer { align-self: flex-end; align-items: flex-end; }
.mch-msg--system { align-self: center; max-width: 94%; align-items: center; }
.mch-name { font-size: 11.5px; color: #64748b; font-weight: 600; padding-inline-start: 4px; }
.mch-bub { padding: 10px 13px; border-radius: 16px; border-start-start-radius: 6px; background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, .06); font-size: 14px; line-height: 1.75; word-break: break-word; }
.mch-msg--customer .mch-bub { border-radius: 16px; border-start-end-radius: 6px; background: var(--mch-c); color: #fff; }
.mch-msg--customer .mch-bub a { color: #fff; }
.mch-msg--system .mch-bub { background: #eef2ff; color: #3730a3; font-size: 13px; text-align: center; border-radius: 12px; }
.mch-msg.is-tmp { opacity: .7; }
.mch-img { display: block; max-width: 200px; max-height: 200px; border-radius: 14px; border: 1px solid #e2e8f0; object-fit: cover; }

.mch-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: 100%; min-width: 280px; }
.mch-card { display: flex; flex-direction: column; gap: 4px; padding: 8px; border: 1px solid #e2e8f0; border-radius: 14px; background: #fff; }
.mch-card a { display: flex; flex-direction: column; gap: 6px; color: #0f172a; text-decoration: none; }
.mch-card img { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 10px; background: #f8fafc; }
.mch-pn { font-size: 12.5px; font-weight: 600; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mch-pr { font-size: 13px; font-weight: 700; color: var(--mch-c); }
.mch-pr del { color: #94a3b8; font-weight: 400; font-size: 11.5px; }
.mch-out { font-size: 12px; color: #b91c1c; font-weight: 600; }
.mch-buy { margin-top: 2px; padding: 7px 8px; border: 0; border-radius: 10px; background: color-mix(in srgb, var(--mch-c) 12%, #fff); color: color-mix(in srgb, var(--mch-c) 80%, #0f172a); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.mch-buy:hover { background: var(--mch-c); color: #fff; }

.mch-order { display: flex; flex-direction: column; gap: 4px; min-width: 260px; padding: 12px 14px; border: 1px solid #e2e8f0; border-radius: 14px; background: #fff; font-size: 13px; line-height: 1.7; }
.mch-order strong { font-size: 16px; }
.mch-order ul { margin: 2px 0; padding-inline-start: 18px; color: #475569; }
.mch-order code { padding: 1px 6px; border-radius: 6px; background: #f1f5f9; }
.mch-btn { display: inline-flex; align-items: center; justify-content: center; margin-top: 6px; padding: 9px 14px; border: 0; border-radius: 12px; background: var(--mch-c); color: #fff !important; font: inherit; font-size: 13.5px; font-weight: 700; text-decoration: none; cursor: pointer; }
.mch-btn:hover { filter: brightness(.95); }
.mch-btn:disabled { opacity: .6; }
.mch-btn--big { width: 100%; padding: 12px; font-size: 15px; }

.mch-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mch-chip { padding: 7px 12px; border: 1px solid color-mix(in srgb, var(--mch-c) 40%, #fff); border-radius: 999px; background: #fff; color: color-mix(in srgb, var(--mch-c) 85%, #0f172a); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .15s, color .15s; }
.mch-chip:hover { background: var(--mch-c); color: #fff; }

.mch-f { display: grid; gap: 7px; min-width: 270px; padding: 12px; border: 1px solid #e2e8f0; border-radius: 14px; background: #fff; }
.mch-f input, .mch-f select, .mch-f textarea { width: 100%; min-height: 40px; padding: 8px 11px; border: 1px solid #cbd5e1; border-radius: 10px; background: #f8fafc; font: inherit; font-size: 14px; }
.mch-f input:focus, .mch-f select:focus, .mch-f textarea:focus { border-color: var(--mch-c); background: #fff; outline: 0; box-shadow: 0 0 0 3px color-mix(in srgb, var(--mch-c) 18%, transparent); }

.mch-f__t { font-size: 14px; }
.mch-qi { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; background: color-mix(in srgb, var(--mch-c) 8%, #fff); font-size: 13px; font-weight: 600; }
.mch-qi span { flex: 1; }
.mch-qi input { width: 74px; min-height: 34px; text-align: center; }
.mch-tx { display: inline-flex; gap: 4px; align-self: flex-start; padding: 2px 10px; border-radius: 999px; background: #f1f5f9; color: #475569; font-size: 11.5px; }
.mch-rate { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 13px; color: #475569; }
.mch-rate div { display: flex; flex-direction: row-reverse; }
.mch-rate button { padding: 0 2px; border: 0; background: none; color: #cbd5e1; font-size: 28px; line-height: 1; cursor: pointer; }
.mch-rate button:hover, .mch-rate button:hover ~ button { color: #f59e0b; }

.mch-typing { display: flex; gap: 4px; padding: 0 22px 8px; background: #f8fafc; }
.mch-typing[hidden] { display: none; }
.mch-typing span { width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; animation: mchDot 1.2s infinite; }
.mch-typing span:nth-child(2) { animation-delay: .15s; }
.mch-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes mchDot { 30% { transform: translateY(-5px); background: var(--mch-c); } }

.mch-form { display: flex; align-items: flex-end; gap: 4px; padding: 10px; border-top: 1px solid #e2e8f0; background: #fff; }
.mch-input { flex: 1; min-height: 42px; max-height: 110px; padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 14px; background: #f8fafc; font: inherit; font-size: 14px; line-height: 1.5; resize: none; }
.mch-input:focus { border-color: var(--mch-c); background: #fff; outline: 0; }
.mch-tool, .mch-send { display: grid; place-items: center; flex: 0 0 auto; width: 40px; height: 42px; padding: 0; border: 0; border-radius: 12px; background: transparent; color: #64748b; cursor: pointer; }
.mch-tool:hover { background: #f1f5f9; color: var(--mch-c); }
.mch-tool svg, .mch-send svg { width: 20px; height: 20px; }
.mch-send { background: var(--mch-c); color: #fff; }
.mch-mic.is-on { background: #fee2e2; color: #dc2626; animation: mchPulse 1.2s infinite; }
@keyframes mchPulse { 50% { box-shadow: 0 0 0 6px rgba(220, 38, 38, .15); } }
.mch-foot { margin: 0; padding: 0 12px 8px; background: #fff; color: #94a3b8; font-size: 11px; text-align: center; }

@media (max-width: 480px) {
	.mch { bottom: 14px; }
	.mch--left { left: 14px; }
	.mch--right { right: 14px; }
	.mch.is-open { inset: 0; }
	.mch.is-open .mch-fab { display: none; }
	.mch-win { position: fixed; inset: 0; width: 100%; height: 100%; border-radius: 0; }
	.mch-cards { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) { .mch-win, .mch-typing span, .mch-mic.is-on { animation: none; } }
