.almas-chat-panel[hidden] { display: none !important; }
.almas-chat-panel { position: fixed; z-index: 1000000; right: 16px; bottom: 108px; display: flex; width: min(340px, calc(100vw - 32px)); height: min(500px, calc(100vh - 132px)); min-height: 300px; flex-direction: column; overflow: hidden; border: 1px solid #dce5eb; border-radius: 20px; background: radial-gradient(circle 190px at -12% 100%, transparent 0 87%, rgba(255,255,255,.28) 87.6%, rgba(255,255,255,.1) 88.4%, transparent 89.2%), radial-gradient(circle 180px at 115% 72%, transparent 0 88%, rgba(255,255,255,.24) 88.5%, rgba(255,255,255,.08) 89.2%, transparent 90%), linear-gradient(145deg, color-mix(in srgb, var(--almas-color, #0056b3) 5%, #f5f8ff) 0%, color-mix(in srgb, var(--almas-color, #0056b3) 10%, #eaf1ff) 100%); box-shadow: 0 18px 54px rgba(16, 40, 58, .24); color: #23384a; direction: rtl; font-family: Vazirmatn, Tahoma, sans-serif; pointer-events: auto; }
.almas-chat-panel.is-opening { animation: almas-chat-panel-open 180ms cubic-bezier(.2, .8, .2, 1) both; }
.almas-chat-panel.is-closing { animation: almas-chat-panel-close 160ms ease-in both; pointer-events: none; }
@keyframes almas-chat-panel-open { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes almas-chat-panel-close { from { opacity: 1; transform: translateY(0) scale(1); } to { opacity: 0; transform: translateY(8px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { .almas-chat-panel.is-opening, .almas-chat-panel.is-closing { animation-duration: 1ms; } }
.almas-container.almas-side-left .almas-chat-panel { right: auto; left: 16px; }
.almas-chat-header { position: relative; isolation: isolate; display: block; min-height: 80px; box-sizing: border-box; padding: 8px 18px; overflow: hidden; background: linear-gradient(120deg, color-mix(in srgb, var(--almas-color, #0056b3) 88%, #47baff), color-mix(in srgb, var(--almas-color, #0056b3) 76%, #173cce)); box-shadow: 0 8px 18px color-mix(in srgb, var(--almas-color, #0056b3) 26%, transparent); color: #fff; }
.almas-chat-header::before, .almas-chat-header::after { position: absolute; z-index: 0; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; background: transparent; content: ''; pointer-events: none; }
.almas-chat-header::before { top: -90px; left: -180px; width: 360px; height: 180px; box-shadow: 0 0 0 18px rgba(255,255,255,.045), 0 0 0 36px rgba(255,255,255,.028); transform: rotate(-24deg); }
.almas-chat-header::after { top: -65px; left: 135px; width: 330px; height: 170px; border-color: rgba(255,255,255,.16); transform: rotate(-24deg); }
.almas-chat-heading { position: absolute; z-index: 1; top: 50%; right: 44px; left: 58px; display: flex; flex-direction: column; gap: 3px; text-align: right; transform: translateY(-50%); }
.almas-chat-header.is-status-hidden .almas-chat-heading { right: 18px; }
.almas-chat-header strong { font-size: 17px; line-height: 1.4; }
.almas-chat-subtitle { color: rgba(235, 244, 255, .86); font-size: 11px; line-height: 1.4; }
.almas-chat-support-meta { display: flex; min-height: 42px; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 12px; border-bottom: 1px solid rgba(22, 72, 101, .08); background: rgba(255, 255, 255, .48); direction: rtl; }
.almas-chat-visitor-details[hidden] { display: none !important; }
.almas-chat-visitor-details { display: block; width: min(200px, calc(100% - 32px)); flex: 0 0 auto; margin: auto auto 0; padding: 0; box-sizing: border-box; border: 0; border-radius: 0; background: transparent; box-shadow: none; direction: rtl; }
.almas-chat-name-label { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
#almasChatPanel .almas-chat-visitor-details input { display: block; width: 100%; min-width: 0; height: 42px; margin: 0 auto; box-sizing: border-box; padding: 8px 12px; border: 1px solid color-mix(in srgb, var(--almas-color, #0056b3) 24%, #cbd5e1); border-radius: 8px; background: #fff; box-shadow: inset 0 1px 2px rgba(15, 23, 42, .04); color: #263b53; font: inherit; font-size: 13px; font-weight: 400; text-align: center; transition: border-color .16s ease, box-shadow .16s ease; }
#almasChatPanel .almas-chat-visitor-details input::placeholder { color: #78889a; opacity: 1; text-align: center; }
#almasChatPanel .almas-chat-visitor-details input:hover:not(:focus) { border-color: #9aaec4; }
#almasChatPanel .almas-chat-visitor-details input:focus { border-color: var(--almas-color, #0056b3); outline: 2px solid color-mix(in srgb, var(--almas-color, #0056b3) 16%, transparent); background: #fff; box-shadow: 0 0 0 1px color-mix(in srgb, var(--almas-color, #0056b3) 12%, transparent); }
#almasChatPanel .almas-chat-visitor-details input[aria-invalid="true"] { border-color: #d64b55; background: #fff5f5; box-shadow: 0 0 0 2px rgba(214, 75, 85, .13); }
#almasChatPanel .almas-chat-visitor-details input[aria-invalid="true"]:focus { border-color: #c83d48; outline: 2px solid rgba(200, 61, 72, .18); background: #fff5f5; }
#almasChatPanel .almas-chat-start-button { display: block; width: 100%; min-height: 36px; margin: 8px auto 0; padding: 6px 12px; border: 0; border-radius: 6px; background: var(--almas-color, #0056b3); box-shadow: none; color: #fff; cursor: pointer; font: inherit; font-size: 13px; font-weight: 600; transition: background .16s ease; }
#almasChatPanel .almas-chat-start-button:hover { background: color-mix(in srgb, var(--almas-color, #0056b3) 84%, #000); }
#almasChatPanel .almas-chat-start-button:focus-visible { outline: 2px solid color-mix(in srgb, var(--almas-color, #0056b3) 30%, transparent); outline-offset: 2px; }
.almas-chat-support-meta[hidden], .almas-chat-online[hidden] { display: none !important; }
.almas-chat-support-info { display: flex; min-width: 0; flex-direction: column; justify-content: center; gap: 1px; }
.almas-chat-support-count { display: flex; min-height: 22px; align-items: center; gap: 5px; color: #647d8e; font-size: 10px; line-height: 1; }
.almas-chat-support-count[hidden] { display: none !important; }
.almas-chat-support-icon { display: grid; width: 18px; height: 18px; flex: 0 0 18px; place-items: center; border: 1px solid rgba(57, 167, 106, .42); border-radius: 50%; background: rgba(57, 167, 106, .08); color: #39a76a; box-sizing: border-box; }
.almas-chat-support-icon::before { width: 11px; height: 11px; background: currentColor; content: ''; -webkit-mask: url('../icons/user.svg') center / contain no-repeat; mask: url('../icons/user.svg') center / contain no-repeat; }
.almas-chat-support-count.is-offline .almas-chat-support-icon { border-color: rgba(170, 180, 195, .5); background: rgba(170, 180, 195, .1); color: #aab4c3; }
.almas-chat-support-name { display: flex; min-width: 0; align-items: center; gap: 5px; overflow: hidden; color: #31596c; font-size: 10px; line-height: 1.5; }
.almas-chat-support-name[hidden] { display: none !important; }
.almas-chat-support-name-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.almas-chat-support-icon.is-offline { border-color: rgba(170, 180, 195, .5); background: rgba(170, 180, 195, .1); color: #aab4c3; }
.almas-chat-support-presence { flex: 0 0 auto; color: #25834d; font-size: 9px; }
.almas-chat-support-presence.is-offline { color: #8795a1; }
.almas-chat-support-meta .almas-chat-end-wrap { padding: 0; }
.almas-chat-support-meta .almas-chat-end-button { width: auto; min-width: 0; min-height: 34px; padding: 4px 12px; border-right-width: 2px; border-radius: 6px; font-size: 10px; }
.almas-chat-support-meta .almas-chat-end-button:hover { transform: none; }
#almasChatPanel .almas-chat-end-wrap,
#almasChatPanel .almas-chat-end-button,
#almasChatPanel .almas-chat-rating,
#almasChatPanel .almas-chat-rating-stars,
#almasChatPanel .almas-chat-rating-star,
#almasChatPanel .almas-chat-rating-comment-input,
#almasChatPanel .almas-chat-rating-submit,
#almasChatPanel .almas-chat-rating-submit-row,
#almasChatPanel .almas-chat-rating-status,
#almasChatPanel .almas-chat-rating-label,
#almasChatPanel .almas-chat-rating-comment {
    box-sizing: border-box !important;
    font-family: Vazirmatn, Tahoma, sans-serif !important;
}
#almasChatPanel .almas-chat-end-wrap[hidden] { display: none !important; }
#almasChatPanel .almas-chat-end-wrap { display: flex !important; flex: 0 0 auto !important; justify-content: stretch !important; }
#almasChatPanel .almas-chat-end-button { display: inline-flex !important; width: 100% !important; min-height: 40px !important; align-items: center !important; justify-content: center !important; padding: 7px 12px !important; border: 1px solid color-mix(in srgb, var(--almas-color, #087d89) 28%, rgba(255,255,255,.72)) !important; border-right: 3px solid color-mix(in srgb, var(--almas-color, #087d89) 70%, #fff) !important; border-radius: 7px !important; background: color-mix(in srgb, var(--almas-color, #087d89) 12%, rgba(255,255,255,.72)) !important; color: color-mix(in srgb, var(--almas-color, #087d89) 78%, #173653) !important; backdrop-filter: blur(8px) !important; -webkit-backdrop-filter: blur(8px) !important; box-shadow: 0 3px 10px rgba(23, 54, 83, .08) !important; cursor: pointer !important; font: inherit !important; font-size: 11px !important; font-weight: 600 !important; text-align: center !important; transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease !important; }
#almasChatPanel .almas-chat-end-button:hover,
#almasChatPanel .almas-chat-end-button:focus-visible,
#almasChatPanel .almas-chat-end-button:active { border-color: color-mix(in srgb, var(--almas-color, #087d89) 42%, rgba(255,255,255,.72)) !important; background: color-mix(in srgb, var(--almas-color, #087d89) 20%, rgba(255,255,255,.76)) !important; box-shadow: 0 4px 12px color-mix(in srgb, var(--almas-color, #087d89) 14%, transparent) !important; outline: none !important; }
#almasChatPanel .almas-chat-end-button:focus-visible { outline: 3px solid color-mix(in srgb, var(--almas-color, #087d89) 25%, transparent) !important; outline-offset: 2px !important; }
#almasChatPanel .almas-chat-end-button:disabled { cursor: wait !important; opacity: .6 !important; transform: none !important; }
.almas-chat-online { position: absolute; z-index: 1; top: 50%; right: 18px; display: block; width: 10px; height: 10px; border-radius: 50%; background: #39d448; box-shadow: 0 0 0 3px rgba(57,212,72,.2), 0 0 8px rgba(57,212,72,.3); transform: translateY(-50%); }
.almas-chat-online::after { position: absolute; inset: -4px; border: 2px solid rgba(57,212,72,.82); border-radius: 50%; content: ''; animation: almas-chat-status-pulse 1.4s ease-in-out infinite; }
.almas-chat-online.is-offline { background: #aab4c3; box-shadow: 0 0 0 3px rgba(170,180,195,.22), 0 0 8px rgba(170,180,195,.3); }
.almas-chat-online.is-offline::after { border-color: rgba(170,180,195,.82); }
@keyframes almas-chat-status-pulse { 0%, 100% { opacity: .8; transform: scale(.75); } 50% { opacity: .22; transform: scale(2.1); } }
@media (prefers-reduced-motion: reduce) { .almas-chat-online::after { animation: none; } }
#almasChatPanel .almas-chat-close { position: absolute !important; z-index: 2 !important; top: 50% !important; right: auto !important; left: 18px !important; display: grid !important; width: 32px !important; min-width: 32px !important; height: 32px !important; min-height: 32px !important; margin: 0 !important; padding: 0 !important; box-sizing: border-box !important; place-items: center !important; border: 1px solid rgba(255,255,255,.13) !important; border-radius: 10px !important; background: rgba(255,255,255,.1) !important; color: #fff !important; cursor: pointer; font-size: 22px; line-height: 1; transform: translateY(-50%) !important; }
.almas-chat-close .almas-inline-svg { display: inline-flex; width: 16px; height: 16px; color: #eaf7ff; }
.almas-chat-close .almas-inline-svg svg, .almas-chat-close .almas-inline-svg svg * { fill: currentColor !important; stroke: none !important; }
.almas-chat-close:hover { background: rgba(255,255,255,.12); }
.almas-chat-messages { display: flex; flex: 1; flex-direction: column; gap: 12px; overflow-x: hidden; overflow-y: auto; padding: 16px; background: transparent; }
.almas-chat-messages, .almas-chat-admin-messages, .almas-chat-threads { scrollbar-width: thin; scrollbar-color: var(--almas-color, #0056b3) #edf2f5; }
.almas-chat-messages::-webkit-scrollbar, .almas-chat-admin-messages::-webkit-scrollbar, .almas-chat-threads::-webkit-scrollbar { width: 8px; height: 8px; }
.almas-chat-messages::-webkit-scrollbar-track, .almas-chat-admin-messages::-webkit-scrollbar-track, .almas-chat-threads::-webkit-scrollbar-track { border-radius: 8px; background: #edf2f5; }
.almas-chat-messages::-webkit-scrollbar-thumb, .almas-chat-admin-messages::-webkit-scrollbar-thumb, .almas-chat-threads::-webkit-scrollbar-thumb { border: 2px solid #edf2f5; border-radius: 8px; background: var(--almas-color, #0056b3); }
.almas-chat-messages::-webkit-scrollbar-thumb:hover, .almas-chat-admin-messages::-webkit-scrollbar-thumb:hover, .almas-chat-threads::-webkit-scrollbar-thumb:hover { background: var(--almas-color, #0056b3); }
.almas-chat-message { width: fit-content; max-width: min(86%, 680px); padding: 12px 16px; border: 1px solid #e1e8f3; border-radius: 6px; background: #fff; color: #18325b; box-shadow: 0 5px 14px rgba(36, 67, 122, .07); white-space: pre-wrap; overflow-wrap: anywhere; }
.almas-chat-message.is-admin { align-self: flex-end; border-color: transparent; border-radius: 18px 18px 6px 18px; background: color-mix(in srgb, var(--almas-color, #0056b3) 22%, #fff); color: #26384d; box-shadow: 0 5px 14px color-mix(in srgb, var(--almas-color, #0056b3) 10%, transparent); }
.almas-chat-welcome-message { max-width: min(90%, 680px); }
.almas-chat-message.is-visitor { align-self: flex-start; border-radius: 18px 18px 18px 6px; background: #fff; }
.almas-chat-message strong { display: block; margin-bottom: 4px; color: #476074; font-size: 10px; font-weight: 700; }
.almas-chat-message.is-admin strong { color: color-mix(in srgb, var(--almas-color, #0056b3) 68%, #102a43); }
.almas-chat-message p { margin: 0; font-size: 13px; line-height: 1.8; text-align: justify; }
.almas-chat-welcome-message p { text-align: center; }
.almas-chat-message time { display: inline-block; margin-top: 5px; color: #718394; font-size: 10px; vertical-align: middle; }
.almas-chat-message.is-admin time { color: #64748b; }
.almas-chat-status { position: relative; display: inline-block; width: 18px; height: 13px; margin: 5px 0 0 4px; color: #8291a6; vertical-align: middle; }
.almas-chat-status:not(.is-sent) { display: none; }
.almas-chat-status.is-sent::before, .almas-chat-status.is-read::after { position: absolute; top: -1px; width: 4px; height: 7px; border-right: 1.7px solid currentColor; border-bottom: 1.7px solid currentColor; content: ''; transform: rotate(45deg); }
.almas-chat-status.is-sent::before { right: 9px; }
.almas-chat-status.is-read { color: #159274; }
.almas-chat-status.is-read::after { right: 0; }
.almas-chat-notice { min-height: 0; margin: 0; padding: 0 14px; color: #a33b32; font-size: 12px; line-height: 1.6; text-align: center; }
.almas-chat-notice:not(:empty) { position: relative; display: block; margin: 8px 12px; padding: 8px 38px 8px 12px; border: 1px solid rgba(163,59,50,.16); border-right: 3px solid #c84d43; border-radius: 8px; background: linear-gradient(115deg, #fffdfd, #fff1ed); box-shadow: 0 5px 14px rgba(123,44,37,.08); color: #88342f; font-weight: 600; text-align: right; }
.almas-chat-notice:not(:empty)::before { position: absolute; top: 50%; right: 10px; display: grid; width: 18px; height: 18px; place-items: center; border-radius: 50%; background: rgba(200,77,67,.12); color: #b13e35; content: '!'; font-size: 12px; font-weight: 800; line-height: 1; transform: translateY(-50%); }
.almas-chat-form { display: flex !important; position: relative; flex-direction: column; padding: 7px 10px 9px; border-top: 0; border-radius: 12px 12px 0 0; background: transparent; }
.almas-chat-form[hidden] { display: none !important; }
.almas-chat-footer-brand { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; padding: 9px 12px 11px; border-top: 1px solid color-mix(in srgb, var(--almas-color, #0056b3) 20%, #fff); background: color-mix(in srgb, var(--almas-color, #0056b3) 4%, #fff); color: color-mix(in srgb, var(--almas-color, #0056b3) 84%, #102a43); font-size: 9px; font-weight: 700; line-height: 1.5; text-align: center; white-space: nowrap; }
.almas-chat-footer-brand::before, .almas-chat-footer-brand::after { min-width: 12px; height: 1px; flex: 1 1 auto; background: color-mix(in srgb, var(--almas-color, #0056b3) 50%, #fff); content: ''; }
.almas-chat-composer { position: relative; display: flex !important; min-height: 42px; align-items: center; gap: 3px; padding: 2px 3px; border: 1px solid #e1e7f2; border-radius: 999px; background: #fff; box-shadow: 0 4px 12px rgba(39, 77, 145, .07); transition: border-color .16s ease, box-shadow .16s ease, background .16s ease; }
.almas-chat-composer:focus-within { border-color: #e1e7f2; background: #fff; box-shadow: 0 4px 12px rgba(39, 77, 145, .07); }
.almas-chat-form textarea { display: block !important; min-width: 0; height: 38px; min-height: 38px; max-height: 38px; flex: 1; resize: none; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--almas-color, #0056b3) 55%, #fff) transparent; padding: 4px 8px; border: 0; border-left: 1px solid #e2e8f2; border-radius: 0; outline: none; background: transparent; color: #23384a; font: inherit; font-size: 12px; line-height: 1.6; box-shadow: none; box-sizing: border-box; }
.almas-chat-form textarea::-webkit-scrollbar { width: 5px; }
.almas-chat-form textarea::-webkit-scrollbar-thumb { border-radius: 5px; background: color-mix(in srgb, var(--almas-color, #0056b3) 55%, #fff); }
.almas-chat-form textarea:focus { display: block !important; border: 0; border-left: 1px solid #e2e8f2; outline: none; background: transparent; box-shadow: none; }
.almas-chat-emoji-picker { position: relative; width: 38px; min-width: 38px; flex: 0 0 38px; }
#almasChatPanel .almas-chat-emoji-toggle { appearance: none; display: grid !important; width: 38px !important; height: 38px !important; min-width: 38px !important; min-height: 38px !important; flex: 0 0 38px; aspect-ratio: 1; place-items: center; margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 50% !important; box-sizing: border-box; background: color-mix(in srgb, var(--almas-color, #0056b3) 10%, #fff) !important; box-shadow: inset 0 0 0 1px transparent !important; cursor: pointer; font-family: "Apple Color Emoji", "Segoe UI Emoji", sans-serif; font-size: 19px; line-height: 1; }
#almasChatPanel .almas-chat-emoji-toggle:hover, #almasChatPanel .almas-chat-emoji-toggle:focus-visible { background: color-mix(in srgb, var(--almas-color, #0056b3) 10%, #fff) !important; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--almas-color, #0056b3) 58%, #fff) !important; outline: none !important; }
#almasChatPanel .almas-chat-emoji-toggle:disabled { cursor: not-allowed; opacity: .45; }
#almasChatPanel .almas-chat-emoji-panel { position: absolute !important; z-index: 5 !important; bottom: calc(100% + 10px) !important; left: 0 !important; display: grid !important; width: min(234px, calc(100vw - 32px)) !important; max-width: calc(100vw - 32px) !important; max-height: 208px !important; grid-template-columns: repeat(6, minmax(0, 1fr)) !important; grid-auto-rows: 32px !important; gap: 3px !important; overflow-x: hidden !important; overflow-y: auto !important; padding: 8px !important; box-sizing: border-box !important; border: 1px solid color-mix(in srgb, var(--almas-color, #0056b3) 20%, #dce5eb) !important; border-radius: 8px !important; background: #fff !important; box-shadow: 0 8px 26px rgba(16, 40, 58, .2) !important; }
#almasChatPanel .almas-chat-emoji-panel[hidden] { display: none !important; }
#almasChatPanel .almas-chat-emoji-option { appearance: none; display: grid !important; width: 100% !important; min-width: 0 !important; height: 32px !important; min-height: 32px !important; place-items: center; margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 50% !important; background: transparent !important; box-shadow: none !important; cursor: pointer; font-family: "Apple Color Emoji", "Segoe UI Emoji", sans-serif; font-size: 20px; line-height: 1; }
#almasChatPanel .almas-chat-emoji-option:hover, #almasChatPanel .almas-chat-emoji-option:focus-visible { background: color-mix(in srgb, var(--almas-color, #0056b3) 12%, #fff) !important; outline: none !important; }
.almas-chat-send-btn.almas-chat-send { display: flex !important; width: 38px !important; height: 38px !important; min-width: 38px !important; min-height: 38px !important; max-width: 38px !important; max-height: 38px !important; flex: 0 0 38px !important; aspect-ratio: 1 !important; align-items: center !important; justify-content: center !important; padding: 0 !important; border: 0 !important; border-radius: 50% !important; box-sizing: border-box !important; background: var(--almas-color, #0056b3) !important; cursor: pointer !important; transition: background .16s ease, color .16s ease; margin: 0 !important; line-height: 0 !important; color: #fff !important; }
.almas-chat-send-btn.almas-chat-send:hover { background: color-mix(in srgb, var(--almas-color, #0056b3) 84%, #003fb8) !important; color: #fff !important; }
.almas-chat-send-btn.almas-chat-send .almas-inline-svg { display: inline-flex !important; align-items: center !important; justify-content: center !important; width: 22px !important; height: 22px !important; margin: 0 !important; padding: 0 !important; }
.almas-chat-send-btn.almas-chat-send .almas-inline-svg svg, .almas-chat-send-btn.almas-chat-send .almas-inline-svg svg * { display: block !important; width: 100% !important; height: 100% !important; fill: currentColor !important; stroke: currentColor !important; }
.almas-chat-send-btn.almas-chat-send .almas-inline-svg svg path, .almas-chat-send-btn.almas-chat-send .almas-inline-svg svg line, .almas-chat-send-btn.almas-chat-send .almas-inline-svg svg rect, .almas-chat-send-btn.almas-chat-send .almas-inline-svg svg circle, .almas-chat-send-btn.almas-chat-send .almas-inline-svg svg polygon, .almas-chat-send-btn.almas-chat-send .almas-inline-svg svg polyline, .almas-chat-send-btn.almas-chat-send .almas-inline-svg svg ellipse { fill: currentColor !important; stroke: currentColor !important; }
.almas-chat-send:disabled { cursor: wait; opacity: .45; }

.almas-chat-inbox-page { max-width: 1120px; margin: 24px auto 40px; padding: 0 22px 20px; box-sizing: border-box; font-family: Vazirmatn, Tahoma, sans-serif; }
.almas-chat-inbox-page > h1 { margin: 0 0 18px; color: #173653; font-size: 24px; }
.almas-chat-inbox { display: flex; height: 580px; min-height: 580px; gap: 12px; align-items: stretch; margin: 0; direction: rtl; }
.almas-chat-threads, .almas-chat-conversation { box-sizing: border-box; overflow: hidden; border: 1px solid #e1e8ee; border-radius: 16px; background: #fff; box-shadow: 0 8px 24px rgba(15, 23, 42, .06); }
.almas-chat-threads { flex: 0 0 310px; height: 100%; }
.almas-chat-conversation { flex: 1 1 auto; min-width: 0; height: 100%; overflow: hidden !important; }
.almas-chat-threads { display: flex !important; min-height: 460px; max-height: min(620px, 72vh); flex-direction: column !important; justify-content: flex-start; gap: 3px !important; row-gap: 3px !important; column-gap: 0 !important; overflow-y: auto; padding: 10px; background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%); }
.almas-chat-thread { display: flex !important; width: 100% !important; min-width: 0; flex-direction: column !important; gap: 4px !important; row-gap: 4px !important; padding: 11px 11px !important; margin: 0 0 3px !important; border: 1px solid transparent; border-radius: 12px; color: #263b4e; text-decoration: none; transition: all .2s ease; box-sizing: border-box; align-self: stretch; }
.almas-chat-thread:hover, .almas-chat-thread.is-selected { border-color: #dfeff4; background: linear-gradient(135deg, #f1fbfd 0%, #eff7ff 100%); color: #0d3f52; box-shadow: inset 0 0 0 1px rgba(15, 115, 142, .04); }
.almas-chat-thread-heading { display: flex; width: 100%; min-width: 0; align-items: center; gap: 8px; }
.almas-chat-user-type { display: inline-flex; width: 88px; flex: 0 0 88px; box-sizing: border-box; align-items: center; justify-content: center; margin-inline-start: auto; padding: 2px 7px; border: 1px solid #dce5eb; border-radius: 4px; background: #f3f6f8; color: #647d8e; font-size: 10px; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.almas-chat-user-type.is-guest { border-color: #efdfb9; background: #fff8e9; color: #856321; }
.almas-chat-user-type.is-site-user { border-color: #cce5db; background: #eef8f3; color: #277451; }
.almas-chat-identity { display: flex; width: 100%; min-width: 0; align-items: center; gap: 9px; }
.almas-chat-conversation-heading > div:first-child { flex: 1 1 auto; min-width: 0; }
.almas-chat-thread strong { min-width: 0; overflow: hidden; font-family: Vazirmatn, Tahoma, sans-serif; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.almas-chat-unread-dot { width: 9px; height: 9px; flex: 0 0 9px; border-radius: 50%; background: #e2554d; box-shadow: 0 0 0 4px rgba(226, 85, 77, .12); }
.almas-chat-thread > span:not(.almas-chat-thread-heading) { overflow: hidden; color: #667b8b; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.almas-chat-thread small { color: #8594a1; font-size: 10px; }
.almas-chat-thread-assignee { color: #28716d !important; font-weight: 600; }
.almas-chat-conversation { display: flex !important; min-width: 0; flex: 1 1 auto; flex-direction: column; padding: 18px 18px 20px; overflow: hidden !important; background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%); min-height: 100%; box-sizing: border-box; }
.almas-chat-conversation-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #e7edf1; min-height: 52px; }
.almas-chat-conversation h2 { margin: 0; color: #173653; font-size: 18px; }
.almas-chat-message.is-visitor strong, .almas-chat-conversation h2 { font-family: Vazirmatn, Tahoma, sans-serif; }
.almas-chat-block-status { display: inline-block; margin-top: 5px; color: #b43e35; font-size: 11px; }
.almas-chat-closed-status { display: inline-block; margin-top: 5px; padding: 3px 8px; border: 1px solid #d5e5e3; border-radius: 6px; background: #edf6f5; color: #176f70; font-size: 11px; }
.almas-chat-thread-closed { color: #176f70 !important; font-weight: 700; }
.almas-chat-thread.is-closed { background: #f5f8f8; }
.almas-chat-closed-notice { display: flex; min-height: 48px; align-items: center; margin-top: auto; padding: 12px 16px; border: 1px solid #d5e5e3; border-right: 3px solid #168a83; border-radius: 9px; background: #f0f7f6; color: #315b5b; font-size: 12px; line-height: 1.8; }
.almas-chat-block-toggle { border-color: #f0d1ca !important; background: #fff5f3 !important; color: #a63e35 !important; }
.almas-chat-block-toggle:hover { border-color: #d86d60 !important; background: #d86d60 !important; color: #fff !important; }
.almas-chat-block-toggle.is-blocked { border-color: #bde1d8 !important; background: #eefaf4 !important; color: #26745c !important; }
.almas-chat-block-toggle.is-blocked:hover { border-color: #26745c !important; background: #26745c !important; color: #fff !important; }
.almas-chat-admin-messages { display: flex; min-height: 360px; max-height: 58vh; flex: 1 1 auto; min-width: 0; flex-direction: column; gap: 11px; overflow-y: auto; padding: 16px; border: 1px solid #e7edf1; border-radius: 14px; background: linear-gradient(180deg, #f7fafc 0%, #eef5f8 100%); }
.almas-chat-admin-messages .almas-chat-message { width: fit-content; min-width: min(220px, 100%); max-width: min(90%, 700px); height: auto !important; min-height: 0 !important; flex: 0 0 auto; padding: 11px 13px; border: 1px solid #e4ebf1; border-radius: 6px; box-shadow: 0 3px 10px rgba(24, 48, 72, .05); aspect-ratio: auto !important; white-space: normal; }
.almas-chat-admin-messages .almas-chat-message strong { display: block; margin-bottom: 4px; color: #35516a; font-size: 11px; }
.almas-chat-admin-messages .almas-chat-message p { font-size: 13px; line-height: 1.7; }
.almas-chat-admin-messages .almas-chat-message time { margin-top: 5px; font-size: 10px; }
.almas-chat-admin-messages .almas-chat-message .almas-chat-status { margin-left: 6px; }
.almas-chat-message-edit { display: inline-block; margin: 4px 0; vertical-align: middle; }
.almas-chat-message-edit summary { color: #176f70; cursor: pointer; font-size: 10px; }
.almas-chat-message-edit form { display: grid; width: min(320px, 100%); gap: 6px; margin-top: 6px; }
.almas-chat-message-edit textarea { width: 100%; min-height: 64px; padding: 7px 9px; border: 1px solid #cbd7e0; border-radius: 7px; color: #23384a; font: inherit; font-size: 12px; box-sizing: border-box; }
.almas-chat-message-edit .button.button-primary { display: inline-flex; min-height: 38px; align-items: center; justify-self: start; padding: 0 12px; border: 0; border-radius: 10px; background: linear-gradient(135deg, #0f7b8d 0%, #0d5f6d 100%); box-shadow: none; color: #fff; cursor: pointer; font: inherit; font-size: 12px; font-weight: 700; line-height: 1.5; text-shadow: none; }
.almas-chat-message-edit .button.button-primary:hover { background: linear-gradient(135deg, #0d6f80 0%, #0a4f5d 100%); color: #fff; box-shadow: none; }
.almas-chat-reply { display: grid !important; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; width: 100%; min-width: 0; margin-top: auto; margin-bottom: 8px; padding: 10px 10px 8px; border-top: 1px solid #e7edf1; background: transparent; box-sizing: border-box; flex-shrink: 0; overflow: visible !important; }
.almas-chat-reply-tools { display: flex; align-items: center; gap: 8px; overflow: visible; }
.almas-chat-reply textarea { min-width: 0; width: 100%; height: 68px; min-height: 68px; max-height: 220px; resize: vertical; padding: 10px 12px; border: 1px solid #cbd7e0; border-radius: 10px; color: #23384a; font: inherit; font-size: 12px; box-shadow: inset 0 1px 2px rgba(15, 23, 42, .03); background: #fff; box-sizing: border-box; }
.almas-chat-reply textarea:focus { border-color: #168a9b; outline: 2px solid rgba(22, 138, 155, .14); }
.almas-chat-reply .button.button-primary { display: flex !important; align-items: center; justify-content: center; height: 68px; min-height: 68px; width: auto; min-width: 74px; padding: 0 14px; margin: 0 !important; border: 0; border-radius: 10px; background: linear-gradient(135deg, #0f7b8d 0%, #0d5f6d 100%); box-shadow: none; color: #fff; cursor: pointer; font: inherit; font-size: 12px; font-weight: 700; line-height: 1.5; text-shadow: none; box-sizing: border-box; }
.almas-chat-reply .button.button-primary:hover { background: linear-gradient(135deg, #0d6f80 0%, #0a4f5d 100%); color: #fff; box-shadow: none; }
.almas-chat-empty { margin: auto; padding: 24px; color: #718394; text-align: center; }

@media (max-width: 1024px) {
    .almas-chat-inbox-page { padding: 0 22px 16px; }
    .almas-chat-inbox { display: flex; flex-direction: column; height: auto; min-height: 0; }
    .almas-chat-threads { flex: 0 0 auto; width: 100%; max-height: 240px; }
    .almas-chat-conversation { min-height: 440px; }
}

@media (max-width: 782px) {
    .almas-chat-panel { right: 10px; bottom: 88px; width: calc(100% - 20px); max-width: 380px; height: min(600px, calc(100vh - 100px)); }
    .almas-container.almas-side-left .almas-chat-panel { right: auto; left: 10px; }
    .almas-chat-inbox-page { margin: 18px 10px 30px; padding: 0; }
    .almas-chat-inbox-page > h1 { font-size: 20px; }
    .almas-chat-threads { max-height: 220px; }
    .almas-chat-conversation { min-height: 420px; padding: 14px 12px 16px; }
    .almas-chat-admin-messages { min-height: 280px; max-height: 48vh; padding: 12px; }
    .almas-chat-conversation-heading { align-items: flex-start; flex-direction: column; }
    .almas-chat-reply { align-items: stretch; flex-direction: row; }
    .almas-chat-reply textarea { min-height: 42px; }
    .almas-chat-reply .button { align-self: stretch; }
}

@media (max-width: 520px) {
    .almas-container .almas-chat-panel { position: fixed; inset: auto 10px 88px auto !important; box-sizing: border-box; width: min(380px, calc(100vw - 20px)); max-width: calc(100vw - 20px); height: min(600px, calc(100dvh - 100px)); min-height: min(340px, calc(100dvh - 100px)); border: 1px solid #dce5eb; border-radius: 8px; box-shadow: 0 18px 54px rgba(16, 40, 58, .24); }
    .almas-container.almas-side-left .almas-chat-panel { inset: auto auto 88px 10px !important; }
    .almas-chat-threads { max-height: 180px; padding: 8px; }
    .almas-chat-thread { padding: 10px 8px !important; }
    .almas-chat-conversation { min-height: 360px; }
    .almas-chat-admin-messages { min-height: 240px; max-height: 45vh; }
    .almas-chat-reply { grid-template-columns: 1fr; }
    .almas-chat-reply .button.button-primary { flex: 1; min-width: 0; width: auto; height: 44px; min-height: 44px; }
    .almas-chat-reply textarea { height: 52px; min-height: 52px; }
    .almas-chat-conversation h2 { font-size: 16px; }
    #almasChatPanel .almas-chat-visitor-details { width: 100%; }
}

#almasChatPanel .almas-chat-rating[hidden] { display: none !important; }
#almasChatPanel .almas-chat-rating {
    display: flex !important;
    min-height: 36px !important;
    flex: 0 0 auto !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    margin: 0 12px 3px !important;
    padding: 12px 10px 10px !important;
    border: 1px solid rgba(8,125,137,.16) !important;
    border-radius: 10px !important;
    background: rgba(255,255,255,.82) !important;
    box-shadow: 0 4px 10px rgba(18, 52, 78, .06) !important;
    color: #355267 !important;
    font-size: 11px !important;
}
#almasChatPanel .almas-chat-rating-label {
    color: #355267 !important;
    font-weight: 600 !important;
    line-height: 1.6 !important;
    text-align: right !important;
}
#almasChatPanel .almas-chat-rating-stars {
    display: flex !important;
    flex: 0 0 auto !important;
    justify-content: flex-start !important;
    gap: 0 !important;
    direction: ltr !important;
}
#almasChatPanel .almas-chat-rating-star {
    display: inline-flex !important;
    width: 24px !important;
    height: 24px !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #d6aa35 !important;
    cursor: pointer !important;
    font-size: 22px !important;
    line-height: 1 !important;
    transition: color .12s ease, transform .12s ease !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}
#almasChatPanel .almas-chat-rating-star:hover,
#almasChatPanel .almas-chat-rating-star:focus-visible,
#almasChatPanel .almas-chat-rating-star.is-selected,
#almasChatPanel .almas-chat-rating-star.is-preview {
    background: transparent !important;
    color: #f2b705 !important;
    outline: none !important;
    transform: scale(1.08) !important;
}
#almasChatPanel .almas-chat-rating-star:disabled { cursor: wait !important; opacity: .55 !important; }
#almasChatPanel .almas-chat-rating-row {
    display: flex !important;
    min-height: 27px !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 5px !important;
    direction: ltr !important;
}
#almasChatPanel .almas-chat-rating-comment-input {
    width: 100% !important;
    min-height: 40px !important;
    resize: vertical !important;
    padding: 7px 9px !important;
    border: 1px solid #d6e0e5 !important;
    border-radius: 7px !important;
    background: #fff !important;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, .03) !important;
    color: #23384a !important;
    font: inherit !important;
    font-size: 11px !important;
    box-sizing: border-box !important;
}
#almasChatPanel .almas-chat-rating-comment-input:focus {
    border-color: #168a9b !important;
    outline: 2px solid rgba(22,138,155,.12) !important;
}
#almasChatPanel .almas-chat-rating-submit-row {
    display: flex !important;
    width: 100% !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
}
#almasChatPanel .almas-chat-rating-submit {
    align-self: flex-start !important;
    padding: 5px 12px !important;
    border: 0 !important;
    border-radius: 7px !important;
    background: var(--almas-color, #e53935) !important;
    box-shadow: 0 3px 6px rgba(229, 57, 53, .18) !important;
    color: #fff !important;
    cursor: pointer !important;
    font: inherit !important;
    font-size: 11px !important;
    font-weight: 600 !important;
}
#almasChatPanel .almas-chat-rating-submit:hover,
#almasChatPanel .almas-chat-rating-submit:focus-visible {
    background: color-mix(in srgb, var(--almas-color, #e53935) 82%, #000) !important;
    outline: none !important;
}
#almasChatPanel .almas-chat-rating-submit:disabled { cursor: wait !important; opacity: .6 !important; }
#almasChatPanel .almas-chat-rating-status {
    min-width: 0 !important;
    flex: 1 1 auto !important;
    margin-inline-start: 8px !important;
    color: #a63e35 !important;
    font-size: 10px !important;
    text-align: left !important;
    overflow-wrap: anywhere !important;
}
#almasChatPanel .almas-chat-rating-comment {
    margin: 0 !important;
    color: #627888 !important;
    line-height: 1.6 !important;
    overflow-wrap: anywhere !important;
}
@media (max-width: 380px) {
    #almasChatPanel .almas-chat-rating { align-items: flex-start !important; flex-direction: column !important; }
}