.alc-widget, .alc-widget * { box-sizing: border-box; }
.alc-widget { position: fixed; z-index: 999999; right: 22px; bottom: 22px; color: #16324d; font-family: Inter, "Segoe UI", Arial, sans-serif; font-size: 14px; line-height: 1.4; }
.alc-widget--left { right: auto; left: 22px; }
.alc-launcher { position: relative; display: flex; align-items: center; gap: 11px; min-width: 178px; min-height: 58px; padding: 7px 17px 7px 9px; border: 0; border-radius: 18px; color: #fff; background: linear-gradient(135deg, #0c355b, var(--alc-accent)); box-shadow: 0 16px 46px rgba(8,39,67,.27); cursor: pointer; transition: transform .18s ease, box-shadow .18s ease; }
.alc-launcher:hover { transform: translateY(-2px); box-shadow: 0 20px 55px rgba(8,39,67,.34); }
.alc-launcher:focus-visible, .alc-panel button:focus-visible, .alc-panel input:focus-visible, .alc-panel textarea:focus-visible, .alc-panel a:focus-visible { outline: 3px solid rgba(88,192,236,.5); outline-offset: 2px; }
.alc-launcher__icon { display: flex; align-items: center; justify-content: center; gap: 2px; width: 42px; height: 42px; border-radius: 14px 14px 14px 5px; color: #0c355b; background: #d9ff86; }
.alc-launcher__icon span { width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.alc-launcher__copy { display: grid; text-align: left; }
.alc-launcher__copy strong { font-size: 13px; }
.alc-launcher__copy small { color: #d4e6f3; font-size: 10px; }
.alc-launcher__unread { position: absolute; top: -7px; right: -5px; display: grid; min-width: 23px; height: 23px; padding: 0 5px; place-items: center; border: 2px solid #fff; border-radius: 999px; color: #fff; background: #ff6846; font-size: 10px; font-weight: 900; }
.alc-panel { position: absolute; right: 0; bottom: 72px; display: grid; grid-template-rows: auto minmax(0,1fr); width: min(382px, calc(100vw - 28px)); height: min(650px, calc(100vh - 115px)); overflow: hidden; border: 1px solid rgba(13,48,78,.12); border-radius: 22px; background: #fff; box-shadow: 0 28px 80px rgba(8,37,64,.28); transform-origin: right bottom; animation: alc-arrive .2s ease-out; }
.alc-widget--left .alc-panel { right: auto; left: 0; transform-origin: left bottom; }
@keyframes alc-arrive { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.alc-panel__header { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 76px; padding: 14px 16px; color: #fff; background: linear-gradient(120deg, #0a2949, var(--alc-accent)); }
.alc-panel__brand { display: flex; align-items: center; gap: 10px; }
.alc-panel__mark { display: grid; width: 43px; height: 43px; place-items: center; border-radius: 13px; color: #0b3153; background: #d9ff86; font-size: 19px; font-weight: 950; }
.alc-panel__brand > span:last-child { display: grid; }
.alc-panel__brand strong { color: #fff; font-size: 14px; }
.alc-panel__brand small { color: #d5e8f5; font-size: 10px; }
.alc-panel__header > button { width: 34px; height: 34px; border: 0; border-radius: 50%; color: #fff; background: rgba(255,255,255,.12); font-size: 22px; cursor: pointer; }
.alc-prechat { overflow-y: auto; padding: 20px; }
.alc-prechat__welcome { margin: 0 0 17px; padding: 13px 14px; border-radius: 13px 13px 13px 4px; color: #34526b; background: #edf5f9; font-size: 12px; line-height: 1.55; }
.alc-prechat form { display: grid; gap: 11px; }
.alc-prechat label { display: grid; gap: 5px; }
.alc-prechat label > span { color: #60778a; font-size: 9px; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.alc-prechat input, .alc-prechat textarea { width: 100%; min-height: 43px; padding: 9px 11px; border: 1px solid #d2dfe8; border-radius: 9px; color: #17334f; background: #fff; font: inherit; }
.alc-prechat textarea { min-height: 92px; resize: vertical; }
.alc-prechat form > button { min-height: 45px; border: 0; border-radius: 9px; color: #fff; background: var(--alc-accent); font-weight: 850; cursor: pointer; }
.alc-prechat form > button:disabled { opacity: .6; cursor: wait; }
.alc-prechat form > small { color: #8191a0; font-size: 9px; line-height: 1.4; text-align: center; }
.alc-prechat form > small a { color: #496a84; }
.alc-form-status { min-height: 0; color: #a33939; font-size: 10px; }
.alc-trap { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.alc-conversation { display: grid; grid-template-rows: minmax(0,1fr) auto auto; min-height: 0; background: #f3f7fa; }
.alc-messages { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; padding: 18px 15px; overscroll-behavior: contain; }
.alc-message { position: relative; display: grid; max-width: 82%; padding: 10px 12px 7px; border-radius: 14px; }
.alc-message--staff { align-self: flex-start; border-bottom-left-radius: 4px; color: #294960; background: #fff; box-shadow: 0 4px 15px rgba(13,48,78,.07); }
.alc-message--visitor { align-self: flex-end; border-bottom-right-radius: 4px; color: #fff; background: var(--alc-accent); }
.alc-message__meta { margin-bottom: 3px; font-size: 9px; font-weight: 850; opacity: .72; }
.alc-message p { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; font-size: 12px; line-height: 1.5; }
.alc-message time { justify-self: end; margin-top: 4px; font-size: 8px; opacity: .62; }
.alc-typing { padding: 5px 15px 8px; color: #708496; font-size: 9px; font-style: italic; }
.alc-composer { display: grid; grid-template-columns: minmax(0,1fr) 42px; gap: 7px; padding: 11px; border-top: 1px solid #dfe8ee; background: #fff; }
.alc-composer textarea { width: 100%; max-height: 110px; min-height: 42px; padding: 10px 11px; border: 1px solid #d1dee7; border-radius: 10px; color: #17334f; background: #fff; font: inherit; resize: none; }
.alc-composer button { width: 42px; height: 42px; border: 0; border-radius: 11px; color: #fff; background: var(--alc-accent); cursor: pointer; }
.alc-new-chat { margin: 12px; min-height: 43px; border: 0; border-radius: 9px; color: #fff; background: var(--alc-accent); font-weight: 800; cursor: pointer; }
.alc-widget .screen-reader-text { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.alc-widget [hidden] { display: none !important; }

@media (max-width: 520px) {
	.alc-widget, .alc-widget--left { right: 12px; bottom: 12px; left: auto; }
	.alc-launcher { min-width: 58px; width: 58px; height: 58px; padding: 8px; border-radius: 18px; }
	.alc-launcher__copy { display: none; }
	.alc-panel, .alc-widget--left .alc-panel { position: fixed; inset: 8px 8px 78px; width: auto; height: auto; border-radius: 18px; transform-origin: bottom right; }
}

@media (prefers-reduced-motion: reduce) {
	.alc-panel { animation: none; }
	.alc-launcher { transition: none; }
}
