#support-dialog [hidden] { display: none !important; }

#support-dialog .cb-widget-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid #c9dff9;
    border-radius: 17px;
    background: #eef6ff;
    color: #0a1f44;
    text-align: start;
    font: inherit;
    cursor: pointer;
}
.cb-widget-trigger .support-option-copy { flex: 1; }
.cb-widget-trigger > .ui-icon { width: 18px; height: 18px; }

#support-dialog.cb-chat-open {
    inset: auto auto max(68px, calc(env(safe-area-inset-bottom) + 68px)) max(16px, env(safe-area-inset-left));
    width: min(430px, calc(100% - 32px));
    height: min(600px, calc(100vh - 86px));
    height: min(600px, calc(100dvh - 86px));
    max-height: none;
    max-width: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid #c9d9ec;
    border-radius: 16px;
    background: #f3f6fb;
    box-shadow: 0 12px 40px #0a1f442e;
}
#support-dialog.cb-chat-open::backdrop {
    background: #0a1f4405;
    backdrop-filter: none;
}
body .cb-site-launcher .cb-icon {
    width: 23px;
    height: 23px;
    color: #fff;
}
.cb-widget, .cb-widget * { box-sizing: border-box; }
.cb-widget {
    --cb-navy: #0a1f44;
    --cb-blue: #0c55c5;
    --cb-paper: #f3f6fb;
    --cb-line: #cedbeb;
    --cb-muted: #455a73;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
    color: var(--cb-navy);
    background: var(--cb-paper);
    font-family: var(--content-font, Vazirmatn, Tahoma, Arial, sans-serif);
    text-align: start;
}
.cb-widget .cb-icon {
    display: block;
    flex: none;
    width: 21px;
    height: 21px;
}
.cb-widget :is(button, input, a) { font: inherit; }
.cb-widget button { cursor: pointer; }
.cb-widget button:disabled { cursor: default; opacity: .65; }
.cb-widget :is(button, input, a):focus-visible, .cb-site-launcher:focus-visible {
    outline: 2px solid #3a79df;
    outline-offset: 2px;
}
.cb-widget a { text-decoration: none; }
.cb-widget-header {
    flex: none;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    min-height: 71px;
    background: var(--cb-navy);
    color: #fff;
}
.cb-widget-header > .cb-icon { width: 38px; height: 38px; }
#support-dialog .cb-widget-brand h2 {
    margin: 0;
    color: #fff;
    font-size: 17px;
    line-height: 1.45;
    font-weight: 850;
}
.cb-widget-brand p { margin: 3px 0 0; color: #dbe8fa; font-size: 12px; }
.cb-widget-close {
    margin-inline-start: auto;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #fff;
}
.cb-widget-close:hover { background: #ffffff20; }
.cb-widget-close:focus-visible { outline-color: #b2d4ff; }
.cb-widget-nav {
    flex: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    border-bottom: 1px solid var(--cb-line);
    background: #eef3fa;
}
.cb-widget-nav button {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    padding: 5px;
    border: 0;
    background: transparent;
    color: var(--cb-navy);
    font-size: 12px;
    font-weight: 740;
}
.cb-widget-nav button:hover { background: #dceafb; }
.cb-widget-nav button + button::before {
    position: absolute;
    inset-inline-start: 0;
    height: 18px;
    border-inline-start: 1px solid #b8cce4;
    content: "";
}
.cb-widget-log {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 16px 13px 14px;
    scrollbar-width: thin;
    scrollbar-color: #b9cce3 transparent;
}
.cb-message-row {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-bottom: 13px;
}
.cb-message-row > .cb-icon {
    width: 26px;
    height: 26px;
    margin-top: 8px;
    color: #123d78;
}
.cb-message-content {
    width: max-content;
    max-width: calc(100% - 35px);
    min-width: 0;
}
.cb-widget-message {
    padding: 9px 12px;
    border: 1px solid #dce6f2;
    border-radius: 14px 6px 14px 14px;
    background: #fff;
    color: var(--cb-navy);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: 14px;
    font-weight: 550;
    line-height: 1.9;
}
.cb-message-row.is-customer { justify-content: flex-end; }
.is-customer .cb-message-content { max-width: 85%; }
.is-customer .cb-widget-message {
    border-color: var(--cb-blue);
    border-radius: 14px 14px 14px 5px;
    background: var(--cb-blue);
    color: #fff;
}
.cb-quick-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 21px 0 13px;
}
.cb-quick-grid :is(button, a) {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 105px;
    padding: 10px 6px;
    border: 1px solid var(--cb-line);
    border-radius: 13px;
    background: #fcfdff;
    color: var(--cb-navy);
    text-align: center;
    font-size: 14px;
    font-weight: 800;
}
.cb-quick-grid .cb-icon { width: 34px; height: 34px; color: #123d78; }
.cb-quick-grid .is-primary {
    border-color: #3377d9;
    background: #e2f0ff;
}
.cb-quick-grid :is(button, a):hover { border-color: #3377d9; background: #e2f0ff; }
.cb-widget-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    white-space: normal;
}
.cb-widget-actions :is(button, a) {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 5px 10px;
    border: 1px solid #bacde6;
    border-radius: 9px;
    background: #fbfdff;
    color: var(--cb-navy);
    text-align: center;
    font-size: 12px;
    line-height: 1.6;
    font-weight: 750;
}
.cb-widget-actions :is(button, a):hover { background: #eaf3ff; }
.cb-widget-actions .cb-icon { width: 17px; height: 17px; color: #123d78; }
.cb-widget-message .cb-widget-actions button { flex: 1 1 auto; }
.cb-widget-extra { padding-bottom: 5px; }
.cb-recommendation {
    padding: 11px;
    border: 1px solid #d6e4f6;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 3px 8px #0a1f440d;
}
.cb-recommendation-heading { display: flex; align-items: center; gap: 10px; }
.cb-recommendation-icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 55px;
    height: 55px;
    border-radius: 11px;
    background: #e5f2ff;
    color: #104b9e;
}
.cb-recommendation-icon .cb-icon { width: 36px; height: 36px; }
.cb-recommendation-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 8px;
    background: #d3f3f0;
    color: #075653;
    font-size: 10px;
    font-weight: 780;
}
.cb-recommendation h3 { margin: 2px 0 0; color: var(--cb-navy); font-size: 17px; font-weight: 900; }
.cb-recommendation-text {
    margin: 7px 0 9px;
    color: var(--cb-muted);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: 12px;
    line-height: 1.8;
}
.cb-widget .cb-recommendation-primary {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 41px;
    padding: 7px 9px;
    border-radius: 9px;
    background: var(--cb-blue);
    color: #fff;
    text-align: center;
    font-size: 13px;
    font-weight: 830;
}
.cb-widget .cb-recommendation-primary:hover { background: #0847a9; }
.cb-recommendation-actions button { flex: 1 1 auto; }
.cb-feedback {
    display: flex;
    direction: ltr;
    justify-content: flex-start;
    gap: 2px;
    margin-top: 3px;
}
.cb-feedback button {
    display: grid;
    place-items: center;
    width: 36px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #425872;
}
.cb-feedback button:hover, .cb-feedback button[aria-pressed="true"] { background: #d9eaff; color: #104b9e; }
.cb-feedback .cb-icon { width: 17px; height: 17px; }
.cb-widget-footer {
    flex: none;
    padding: 11px 12px max(9px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--cb-line);
    background: #fbfdff;
}
.cb-widget-status { margin: 0 0 5px; color: var(--cb-muted); font-size: 11px; }
.cb-widget-status:empty { display: none; }
.cb-widget-form { display: flex; align-items: stretch; gap: 9px; margin: 0; }
.cb-widget-form input {
    min-width: 0;
    width: auto;
    flex: 1;
    min-height: 44px;
    margin: 0;
    padding: 6px 11px;
    border: 1px solid #bbcde5;
    border-radius: 10px;
    background: #fff;
    color: var(--cb-navy);
    font-size: 16px;
}
.cb-widget-form input::placeholder { color: #536681; font-size: 13px; }
.cb-widget-form button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 79px;
    padding: 6px 9px;
    border: 0;
    border-radius: 9px;
    background: var(--cb-blue);
    color: #fff;
    font-size: 13px;
    font-weight: 830;
}
.cb-widget-form button:hover { background: #0847a9; }
.cb-widget-form .cb-icon { width: 17px; height: 17px; transform: scaleX(-1); }
.cb-widget-note {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 8px 0 0;
    color: var(--cb-muted);
    font-size: 11px;
    line-height: 1.7;
}
.cb-widget-note .cb-icon { width: 15px; height: 15px; }

@media (min-width: 681px) {
    body .support-trigger.cb-site-launcher,
    body.public-approved .support-trigger.cb-site-launcher {
        left: max(16px, env(safe-area-inset-left));
        bottom: max(13px, env(safe-area-inset-bottom));
        min-height: 43px;
        border-color: #c4d8f3;
    }
}
@media (max-width: 680px) {
    #support-dialog.cb-chat-open {
        inset: var(--cb-viewport-top, 0px) 0 auto;
        width: 100%;
        height: 100vh;
        height: var(--cb-viewport-height, 100dvh);
        border: 0;
        border-radius: 0;
    }
    .cb-widget-header { padding-top: max(12px, env(safe-area-inset-top)); }
    .cb-quick-grid :is(button, a) { min-height: 111px; }
}
@media (max-width: 350px) {
    .cb-widget-log { padding-inline: 9px; }
    .cb-widget-nav button { gap: 5px; }
    .cb-quick-grid :is(button, a) { font-size: 12px; }
    .cb-widget-message { font-size: 13px; }
}
@media (max-height: 480px) {
    .cb-widget-header { min-height: 52px; padding-block: 4px; }
    .cb-widget-nav button { min-height: 38px; }
    .cb-widget-note { margin-top: 4px; }
}

.cb-widget .cb-handoff-button {
    flex: none; align-self: center; margin: 7px 0 0; min-height: 32px; padding: 4px 12px;
    border: 1px solid #bfd4ef; border-radius: 8px; background: #fff; color: #164785; font-size: 12px;
}
.cb-widget .cb-handoff-button.is-suggested { background: #e1efff; border-color: #5896e6; font-weight: 800; }
.cb-ticket-review,.cb-ticket-top { display: grid; gap: 8px; padding: 12px; margin-bottom: 12px; background: #fff; border: 1px solid #d2e1f2; border-radius: 12px; }
.cb-ticket-review label { display: grid; gap: 5px; font-size: 13px; }
.cb-ticket-review input:not([type=checkbox]),.cb-ticket-review textarea { width: 100%; padding: 7px; border: 1px solid #b6cbe5; border-radius: 8px; font: inherit; }
.cb-ticket-review .cb-ticket-confirm { display: flex; align-items: center; gap: 6px; }
.cb-ticket-review button { min-height: 38px; border: 1px solid #b6cbe5; border-radius: 8px; color: #0a1f44; background: #fff; }
.cb-ticket-review .cb-ticket-submit { background: #0c55c5; color: #fff; }
.cb-ticket-top > span { font-size: 12px; }
.cb-ticket-records{display:grid;gap:8px}.cb-ticket-review select{width:100%;padding:7px;border:1px solid #b6cbe5;border-radius:8px;background:#fff;font:inherit}
.cb-application{flex:1;min-height:0;display:flex;flex-direction:column}
.cb-application button{flex:none;min-height:38px;border:0;border-bottom:1px solid #c9d9ec;background:#eef6ff;color:#0a1f44}
.cb-application iframe{width:100%;height:100%;flex:1;min-height:0;border:0;background:white}
