/* livechat-console-email-and-locale.css - LiveChat operator console stylesheet.
   unified email channel, right-to-left rendering and the language selector.
   Ordered after the previous console stylesheet: the cascade of the former single livechat.css is preserved. */

/* ── Unified LiveChat email channel ───────────────────────────────────
   Email requests remain ordinary LiveChat conversations; these styles add
   channel identity, delivery truth, attachment controls, and template
   administration without creating a competing inbox. */
.lc-visually-hidden{
  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;
}
.email-channel-badge{
  display:inline-flex;align-items:center;margin-inline-start:7px;padding:2px 6px;
  border:1px solid #b9c5ff;border-radius:999px;color:#3346b5;background:#eef1ff;
  font-size:9px;font-weight:800;line-height:1.2;letter-spacing:.03em;text-transform:uppercase;
}
.pres-tag.email-channel{
  color:#3346b5;border-color:#b9c5ff;background:#eef1ff;
}
.email-dot{font-size:11px;line-height:1}
.email-thread-banner,.email-thread-alert{
  flex:none;display:flex;align-items:center;gap:12px;margin:10px 14px 0;padding:11px 13px;
  border:1px solid #cbd4ff;border-radius:12px;background:#f4f6ff;color:#18224c;
}
.email-thread-icon{
  width:36px;height:36px;display:grid;place-items:center;flex:none;
  border-radius:10px;color:#465fff;background:#e3e8ff;
}
.email-thread-icon svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8}
.email-thread-copy{min-width:0;flex:1}
.email-thread-heading{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.email-thread-copy p{margin:3px 0 0;color:#475467;font-size:11px;line-height:1.45}
.email-thread-facts{display:flex;gap:6px 14px;flex-wrap:wrap;margin-top:5px;color:#667085;font-size:10px}
.email-thread-alert.error{border-color:#f3b7bb;background:#fff2f3;color:#8c1822}
.email-thread-alert>span{
  width:28px;height:28px;display:grid;place-items:center;flex:none;border-radius:50%;
  color:#fff;background:#c52936;font-weight:900;
}
.email-thread-alert p{margin:2px 0 0;color:#8c3540;font-size:11px;line-height:1.45}
.email-delivery-status{
  display:inline-flex;align-items:center;gap:5px;padding:2px 7px;border:1px solid #cbd5e1;
  border-radius:999px;color:#475467;background:#f8fafc;font-size:9.5px;font-weight:800;
  line-height:1.4;white-space:nowrap;text-transform:uppercase;letter-spacing:.025em;
}
.email-delivery-status>span{width:6px;height:6px;border-radius:50%;background:currentColor}
.email-delivery-status.status-delivered{color:#067647;border-color:#abefc6;background:#ecfdf3}
.email-delivery-status.status-accepted{color:#175cd3;border-color:#b2ccff;background:#eff4ff}
.email-delivery-status.status-processing,.email-delivery-status.status-queued{color:#6941c6;border-color:#d9d6fe;background:#f4f3ff}
.email-delivery-status.status-retry_scheduled{color:#b54708;border-color:#fedf89;background:#fffaeb}
.email-delivery-status.status-failed,.email-delivery-status.status-cancelled{color:#b42318;border-color:#fecdca;background:#fef3f2}
.email-delivery-meta{
  display:flex;align-items:center;justify-content:flex-end;gap:5px 9px;flex-wrap:wrap;
  margin:4px 1px 0;color:var(--text-2);font-size:10px;
}
.msg-row.visitor .email-delivery-meta{justify-content:flex-start}
.email-retry{
  min-height:28px;padding:4px 8px;border:1px solid #d0d5dd;border-radius:7px;
  color:#344054;background:var(--panel);font:inherit;font-weight:700;cursor:pointer;
}
.email-retry:hover{border-color:var(--accent);color:var(--accent-text);background:var(--accent-soft)}
.email-delivery-error{
  max-width:520px;margin:4px 0 0;margin-inline-start:auto;padding:6px 8px;border-radius:8px;
  color:#b42318;background:#fef3f2;font-size:10px;line-height:1.4;
}
.email-message-files{display:flex;justify-content:flex-end;gap:5px;flex-wrap:wrap;margin-top:5px}
.email-file-link{
  display:inline-flex;align-items:center;gap:5px;max-width:290px;padding:5px 8px;
  border:1px solid var(--border);border-radius:8px;color:var(--text);background:var(--panel);
  font-size:10px;text-decoration:none;
}
.email-file-link:hover{border-color:var(--accent);background:var(--accent-soft)}
.email-file-link svg{width:13px;height:13px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8}
.email-file-link span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.email-file-link small{color:var(--text-2);white-space:nowrap}
.email-reply-pane{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:end}
.email-address-grid{grid-column:1/-1;display:grid;grid-template-columns:minmax(190px,.7fr) minmax(240px,1.3fr);gap:8px}
.email-address-grid label{display:grid;grid-template-columns:56px minmax(0,1fr);align-items:center;gap:7px;color:var(--text-2);font-size:11px;font-weight:700}
.email-address-grid input{
  width:100%;min-width:0;height:36px;padding:7px 10px;border:1px solid var(--border);
  border-radius:9px;color:var(--text);background:var(--panel);font:inherit;font-size:12px;
}
.email-address-grid input:focus{outline:2px solid var(--accent);outline-offset:1px;border-color:var(--accent)}
.email-draft-files{grid-column:1/-1;display:flex;gap:6px;flex-wrap:wrap}
.email-draft-file{
  display:inline-flex;align-items:center;gap:6px;max-width:320px;padding:5px 7px 5px 9px;
  border:1px solid var(--border);border-radius:8px;color:var(--text);background:var(--panel);
  font-size:10px;
}
.email-draft-file>svg{width:13px;height:13px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8}
.email-draft-file>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.email-draft-file small{color:var(--text-2)}
.email-draft-file button{
  width:25px;height:25px;display:grid;place-items:center;flex:none;border:0;border-radius:6px;
  color:#b42318;background:transparent;font-size:16px;cursor:pointer;
}
.email-draft-file button:hover{background:#fef3f2}
.reply-send.email-send{
  width:auto;min-width:104px;height:44px;padding:0 14px;border-radius:10px;gap:7px;
  font-size:12px;font-weight:800;white-space:nowrap;
}

.lc-email-settings .lc-set-inner{max-width:1540px}
.lc-email-ops{
  margin-bottom:14px;padding:16px;border:1px solid var(--bd);border-radius:var(--rad);
  background:var(--card);box-shadow:var(--shadow);
}
.lc-email-health-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.lc-email-health{
  display:flex;align-items:center;gap:9px;min-width:0;padding:10px;border:1px solid var(--bd);
  border-radius:10px;background:var(--surface);
}
.lc-email-health>span{width:26px;height:26px;display:grid;place-items:center;flex:none;border-radius:50%;font-weight:900}
.lc-email-health.ok>span{color:#067647;background:#dcfae6}
.lc-email-health.bad>span{color:#b42318;background:#fee4e2}
.lc-email-health b,.lc-email-health small{display:block}
.lc-email-health b{color:var(--tx);font-size:11px}
.lc-email-health small{margin-top:2px;color:var(--mut);font-size:9.5px}
.lc-email-counts{display:flex;gap:7px;flex-wrap:wrap;margin-top:11px}
.lc-email-counts span{display:inline-flex;align-items:baseline;gap:5px;padding:5px 8px;border:1px solid var(--bd);border-radius:8px;color:var(--mut);
  background:var(--surface);font-size:9.5px}
.lc-email-counts b{color:var(--tx);font-size:12px}
.lc-email-settings-layout{display:grid;grid-template-columns:210px minmax(420px,1fr) 330px;gap:14px;align-items:start}
.lc-email-locale-rail,.lc-email-editor,.lc-email-preview{
  border:1px solid var(--bd);border-radius:var(--rad);background:var(--card);box-shadow:var(--shadow);
}
.lc-email-locale-rail,.lc-email-preview{position:sticky;top:16px;padding:14px}
.lc-email-locale-list{display:flex;flex-direction:column;gap:5px;margin-top:10px}
.lc-email-locale-list button{
  min-height:46px;display:grid;grid-template-columns:38px 1fr;align-items:center;gap:8px;
  width:100%;padding:7px 9px;border:1px solid transparent;border-radius:9px;color:var(--mut);
  background:transparent;text-align:start;cursor:pointer;
}
.lc-email-locale-list button b{
  display:grid;place-items:center;min-height:30px;border-radius:7px;color:#465fff;background:#eef1ff;font-size:10px;
}
.lc-email-locale-list button span{font-size:11px}
.lc-email-locale-list button:hover{border-color:var(--bd);color:var(--tx);background:var(--surface)}
.lc-email-locale-list button[aria-selected="true"]{border-color:#b9c5ff;color:#25339a;background:#eef1ff}
.lc-email-locale-add{margin-top:13px;padding-top:12px;border-top:1px solid var(--bd)}
.lc-email-locale-add>label{display:block;margin-bottom:5px;color:var(--mut);font-size:9.5px;font-weight:800;text-transform:uppercase}
.lc-email-locale-add>div{display:flex;gap:5px}
.lc-email-locale-add input{min-width:0;width:100%;height:36px;padding:7px 8px;border:1px solid var(--bd);border-radius:8px;color:var(--tx);
  background:var(--surface);font:inherit;font-size:11px}
.lc-email-locale-add button{min-width:44px;border:0;border-radius:8px;color:#fff;background:var(--pri);font:inherit;font-size:11px;font-weight:800;
  cursor:pointer}
.lc-email-editor{overflow:hidden}
.lc-email-editor-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:17px;border-bottom:1px solid var(--bd)}
.lc-email-editor-head h2{margin:3px 0;color:var(--tx);font-size:17px}
.lc-email-editor-head p{margin:0;color:var(--mut);font-size:10px}
.lc-email-kind-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;padding:6px;border-bottom:1px solid var(--bd);background:var(--surface)}
.lc-email-kind-tabs button{min-height:38px;border:1px solid transparent;border-radius:8px;color:var(--mut);background:transparent;font:inherit;
  font-size:11px;font-weight:800;cursor:pointer}
.lc-email-kind-tabs button[aria-selected="true"]{border-color:#b9c5ff;color:#25339a;background:#eef1ff}
.lc-email-template-form{display:flex;flex-direction:column;gap:7px;padding:17px}
.lc-email-template-form>label{color:var(--tx);font-size:10.5px;font-weight:800}
.lc-email-template-form textarea{min-height:250px;resize:vertical;line-height:1.55}
.lc-email-placeholders{display:flex;align-items:center;gap:5px;flex-wrap:wrap;margin-top:3px}
.lc-email-placeholders>span{color:var(--mut);font-size:9.5px}
.lc-email-placeholders button{padding:4px 6px;border:1px solid var(--bd);border-radius:6px;color:#465fff;background:var(--surface);
  font:500 9px ui-monospace,SFMono-Regular,Consolas,monospace;cursor:pointer}
.lc-email-placeholders button:hover{border-color:#8fa0ff;background:#eef1ff}
.lc-email-editor-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;padding:12px 17px;border-top:1px solid var(--bd);background:var(--surface)}
.lc-email-dirty{margin-inline-end:auto;color:#b54708;font-size:10px;font-weight:800}
.lc-email-preview-mail{overflow:hidden;margin-top:10px;border:1px solid var(--bd);border-radius:11px;background:var(--surface)}
.lc-email-preview-mail>div{padding:10px 11px;border-bottom:1px solid var(--bd)}
.lc-email-preview-mail>div span,.lc-email-preview-mail>div b{display:block}
.lc-email-preview-mail>div span{margin-bottom:3px;color:var(--mut);font-size:8.5px;text-transform:uppercase;letter-spacing:.08em}
.lc-email-preview-mail>div b{color:var(--tx);font-size:11px;line-height:1.4}
.lc-email-preview-mail pre{max-height:440px;overflow:auto;margin:0;padding:12px;color:var(--tx);background:transparent;font:400 10.5px/1.6 inherit;
  white-space:pre-wrap;overflow-wrap:anywhere}
.lc-email-preview-empty{min-height:240px;display:flex;align-items:center;justify-content:center;flex-direction:column;padding:20px;color:var(--mut);
  text-align:center}
.lc-email-preview-empty>span{width:40px;height:40px;display:grid;place-items:center;border-radius:11px;color:#465fff;background:#eef1ff}
.lc-email-preview-empty svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8}
.lc-email-preview-empty b{margin-top:9px;color:var(--tx);font-size:12px}
.lc-email-preview-empty p{margin:4px 0 0;font-size:10px;line-height:1.5}
.lc-email-settings :is(.lc-email-locale-list button,.lc-email-kind-tabs button,.lc-email-placeholders button,.lc-email-locale-add input,
  .lc-email-locale-add button,.lc-email-editor button):focus-visible,
.email-reply-pane :is(button,input,textarea):focus-visible,.email-retry:focus-visible,.email-file-link:focus-visible{
  outline:2px solid var(--pri);outline-offset:2px;box-shadow:0 0 0 4px var(--ring);
}

:root[data-theme="dark"] .email-channel-badge,
:root[data-theme="dark"] .pres-tag.email-channel{color:#cbd2ff;border-color:#435188;background:#27345f}
:root[data-theme="dark"] .email-thread-banner{color:#e6e9ff;border-color:#435188;background:#1a2540}
:root[data-theme="dark"] .email-thread-icon{color:#cbd2ff;background:#27345f}
:root[data-theme="dark"] .email-thread-copy p,:root[data-theme="dark"] .email-thread-facts{color:#b8c0d0}
:root[data-theme="dark"] .email-thread-alert.error,:root[data-theme="dark"] .email-delivery-error{color:#ffb6bb;border-color:#68323a;background:#2c171b}
:root[data-theme="dark"] .email-thread-alert p{color:#eaa0a8}
:root[data-theme="dark"] .email-delivery-status{color:#cbd5e1;border-color:#475569;background:#1e293b}
:root[data-theme="dark"] .email-delivery-status.status-delivered{color:#9ee4c8;border-color:#244c40;background:#10251f}
:root[data-theme="dark"] .email-delivery-status.status-accepted{color:#b2ccff;border-color:#344d7e;background:#15243e}
:root[data-theme="dark"] .email-delivery-status.status-processing,
:root[data-theme="dark"] .email-delivery-status.status-queued{color:#d9d6fe;border-color:#4a4378;background:#211e3b}
:root[data-theme="dark"] .email-delivery-status.status-retry_scheduled{color:#fedf89;border-color:#62460e;background:#302307}
:root[data-theme="dark"] .email-delivery-status.status-failed,
:root[data-theme="dark"] .email-delivery-status.status-cancelled{color:#fecdca;border-color:#68323a;background:#2c171b}
:root[data-theme="dark"] .email-draft-file button:hover{background:#2c171b}
:root[data-theme="dark"] .lc-email-health.ok>span{color:#9ee4c8;background:#10251f}
:root[data-theme="dark"] .lc-email-health.bad>span{color:#ffb6bb;background:#2c171b}
:root[data-theme="dark"] .lc-email-locale-list button b,
:root[data-theme="dark"] .lc-email-locale-list button[aria-selected="true"],
:root[data-theme="dark"] .lc-email-kind-tabs button[aria-selected="true"],
:root[data-theme="dark"] .lc-email-preview-empty>span{color:#cbd2ff;border-color:#435188;background:#27345f}

@media (max-width:1320px){
  .lc-email-settings-layout{grid-template-columns:210px minmax(0,1fr)}
  .lc-email-preview{position:static;grid-column:1/-1}
  .lc-email-preview-mail{max-width:720px}
}
@media (max-width:980px){
  .lc-email-health-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .lc-email-settings-layout{grid-template-columns:1fr}
  .lc-email-locale-rail,.lc-email-preview{position:static;grid-column:auto}
  .lc-email-locale-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width:760px){
  .email-thread-banner,.email-thread-alert{margin:7px 8px 0;padding:9px;align-items:flex-start}
  .email-thread-icon{width:32px;height:32px}
  .email-thread-facts{gap:4px 8px}
  .email-thread-banner>.email-retry{min-height:44px}
  .email-reply-pane{grid-template-columns:auto minmax(0,1fr)}
  .email-address-grid{grid-template-columns:1fr}
  .email-address-grid label{grid-template-columns:48px minmax(0,1fr)}
  .email-address-grid input{height:44px;font-size:16px}
  .email-send{grid-column:1/-1;width:100%!important;min-height:44px}
  .email-draft-files{max-height:72px;overflow:auto}
  .email-draft-file button{min-width:44px;height:44px}
  .email-file-link,.email-retry{min-height:44px}
  .email-message-files,.email-delivery-meta{justify-content:flex-start}
  .email-delivery-error{margin-inline-start:0}
  .lc-email-ops{padding:12px}
  .lc-email-ops .lc-set-btn,
  .lc-email-locale-add input,
  .lc-email-locale-add button,
  .lc-email-kind-tabs button,
  .lc-email-placeholders button{min-height:44px}
  .lc-email-locale-add input{font-size:16px}
  .lc-email-placeholders button{padding:9px 10px;font-size:10px}
  .lc-email-health-grid{grid-template-columns:1fr 1fr}
  .lc-email-locale-list{grid-template-columns:repeat(2,minmax(0,1fr))}
  .lc-email-editor-head{padding:14px}
  .lc-email-template-form{padding:14px}
  .lc-email-editor-actions{padding:11px 14px}
  .lc-email-editor-actions .lc-set-btn{min-height:44px;flex:1 1 110px}
}
@media (max-width:520px){
  .lc-email-health-grid,.lc-email-locale-list{grid-template-columns:1fr}
  .email-thread-banner{flex-wrap:wrap}
  .email-thread-banner>.email-retry{width:100%}
}
@media (forced-colors:active){
  .email-delivery-status,.email-channel-badge,.pres-tag.email-channel,
  .lc-email-locale-list button[aria-selected="true"],.lc-email-kind-tabs button[aria-selected="true"]{
    color:HighlightText;border-color:Highlight;background:Highlight;
  }
}

/* IT4Y_LC_I18N_RTL_2026_09_24 — LiveChat renders LTR and RTL at document
   scope (html[dir] from the LiveChat catalog's locale data). Inline-axis
   layout uses logical properties throughout this file; the rules below cover
   what logical properties cannot express: horizontal transforms/animations
   and direction-bearing glyphs. */
[dir="rtl"] .lc-dir-arrow{display:inline-block;transform:scaleX(-1)}
[dir="rtl"] .toast{animation-name:slideInFromStart}
@keyframes slideInFromStart { from{opacity:0;transform:translateX(-40px);} to{opacity:1;transform:translateX(0);} }
[dir="rtl"] .lc-settings .lc-switch.on .lc-switch-knob{transform:translateX(-20px)}
@media (hover:hover) {
  [dir="rtl"] .p360-signout:hover .icon svg { transform:translateX(-2px); }
}
@media (max-width:760px) {
  [dir="rtl"] .app-sidebar { transform:translateX(105%); }
  [dir="rtl"] .app-sidebar.p360-open { transform:translateX(0); }
}

/* Operator language selector (LiveChatLocale.selectorHtml): a compact
   segmented control in the header; a full-width row inside the mobile header
   menu. The language name stays in the accessible name when visually hidden. */
.lc-locale-switch{display:inline-flex;align-items:center;gap:2px;padding:2px;border:1px solid var(--border);border-radius:999px;background:var(--panel)}
.lc-locale-option{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-width:32px;min-height:28px;padding:2px 9px;border:0;
  border-radius:999px;color:var(--text-2);background:transparent;font:inherit;font-size:var(--fs-sm);font-weight:600;line-height:1;cursor:pointer}
.lc-locale-option:hover{color:var(--text);background:var(--bg-2)}
.lc-locale-option.is-active{color:#fff;background:var(--accent)}
.lc-locale-option:focus-visible{outline:none;box-shadow:var(--focus-ring)}
.lc-locale-code{font-size:10.5px;letter-spacing:.04em}
.lc-hdr-locale .lc-locale-name{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
.lc-lang-code{margin-inline-end:5px;font-size:10px;font-weight:700;letter-spacing:.04em;opacity:.75}
@media (max-width:760px) {
  .hdr-actions-group.lc-open .lc-locale-switch{display:flex;width:100%;margin:4px 0}
  .hdr-actions-group.lc-open .lc-locale-option{flex:1 1 0;min-height:44px}
  .hdr-actions-group.lc-open .lc-locale-name{position:static;width:auto;height:auto;overflow:visible;clip:auto;clip-path:none}
  .hdr-actions-group.lc-open .lc-locale-code{display:none}
}
@media (forced-colors:active) {
  .lc-locale-option.is-active{outline:2px solid CanvasText}
}
