
@font-face {
    font-family: 'Vazirmatn';
    src: url('font/Vazirmatn-Regular.woff2') format('woff2');
}

#liveChatRoot,
#liveChatRoot * {
    box-sizing: border-box;
    font-family: 'Vazirmatn', sans-serif;
}

.live-chat-widget {
    position: fixed;
    left: 22px;
    bottom: 22px;
    z-index: 999999;
    direction: rtl;
}

.live-chat-launcher {
    min-width: 132px;
    height: 54px;
    border-radius: 999px;
    border: 0;
    background: linear-gradient(135deg, #ff8a00, #ff5e00);
    color: #fff;
    box-shadow: 0 14px 35px rgba(255, 94, 0, 0.35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    padding: 0 19px;
}

.live-chat-launcher i {
    font-size: 20px;
}

.live-chat-panel {
    width: 390px;
    height: 610px;
    max-height: calc(100vh - 40px);
    background: #111214;
    border: 1px solid #2f3136;
    border-radius: 16px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.live-chat-header {
    background:
        linear-gradient(135deg, rgba(255, 138, 0, 0.22), rgba(255, 94, 0, 0.08)),
        #18191d;
    border-bottom: 1px solid #2c2f34;
    padding: 14px 14px;
    color: #fff;
}

.live-chat-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.live-chat-title {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 15px;
    font-weight: 800;
    color: #ffad53;
}

.live-chat-title-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: #ff7a00;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.live-chat-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.live-chat-icon-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #4c5360;
    background: #2c3138;
    color: #ffffff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: .2s ease;
}

.live-chat-icon-btn:hover {
    background: #3a4049;
    border-color: #ff8a00;
    color: #ffad53;
    transform: translateY(-1px);
}

.live-chat-icon-btn.close-btn {
    background: #5b2026;
    border-color: #8f2f39;
    color: #ffd9de;
}

.live-chat-icon-btn.close-btn:hover {
    background: #73303a;
    border-color: #ff6b7d;
    color: #fff;
}

.live-chat-icon-btn.refresh-btn {
    background: #24303a;
    border-color: #355063;
    color: #cfe9ff;
}

.live-chat-icon-btn.refresh-btn:hover {
    background: #2c4050;
    border-color: #4ea1ff;
    color: #fff;
}

.live-chat-icon-btn.min-btn {
    background: #34311f;
    border-color: #5f5730;
    color: #ffe7a1;
}

.live-chat-icon-btn.min-btn:hover {
    background: #433d22;
    border-color: #ffb700;
    color: #fff;
}

.live-chat-status {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #c7c7c7;
    font-size: 12px;
}

.live-chat-code {
    color: #ffad53;
}

.live-chat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff8a00;
    box-shadow: 0 0 0 5px rgba(255, 138, 0, 0.12);
    display: inline-block;
    margin-left: 7px;
}

.live-chat-body {
    flex: 1;
    background:
        radial-gradient(circle at top right, rgba(255, 138, 0, 0.08), transparent 30%),
        #0f1012;
    padding: 14px;
    overflow-y: auto;
}

.live-chat-empty {
    min-height: 100%;
    color: #a8a8a8;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.9;
    padding: 25px;
}

.live-chat-identity {
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.live-chat-identity-card,
.live-chat-feedback-card,
.live-chat-cooldown-card {
    width: 100%;
    background: rgba(24, 25, 29, 0.94);
    border: 1px solid #30333a;
    border-radius: 16px;
    padding: 16px;
}

.live-chat-identity-title,
.live-chat-feedback-title,
.live-chat-cooldown-title {
    color: #ffad53;
    font-weight: 800;
    font-size: 14px;
    margin-bottom: 8px;
}

.live-chat-identity-text,
.live-chat-feedback-text,
.live-chat-cooldown-text {
    color: #bdbdbd;
    font-size: 12px;
    line-height: 1.9;
    margin-bottom: 12px;
}

.live-chat-field,
.live-chat-feedback-textarea {
    width: 100%;
    border-radius: 12px;
    border: 1px solid #34373d;
    background: #101114;
    color: #fff;
    padding: 9px 12px;
    outline: none;
    font-size: 13px;
    margin-bottom: 9px;
}

.live-chat-field {
    height: 43px;
}

.live-chat-feedback-textarea {
    min-height: 100px;
    resize: vertical;
}

.live-chat-field:focus,
.live-chat-feedback-textarea:focus {
    border-color: #ff8a00;
    box-shadow: 0 0 0 3px rgba(255, 138, 0, 0.12);
}

.live-chat-start,
.live-chat-feedback-submit {
    width: 100%;
    height: 43px;
    border-radius: 12px;
    border: 0;
    background: linear-gradient(135deg, #ff8a00, #ff5e00);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.live-chat-message {
    margin-bottom: 10px;
    display: flex;
}

.live-chat-message.user {
    justify-content: flex-start;
}

.live-chat-message.agent,
.live-chat-message.admin,
.live-chat-message.system {
    justify-content: flex-end;
}

.live-chat-bubble {
    max-width: 82%;
    padding: 10px 12px;
    border-radius: 14px;
    color: #f4f4f4;
    line-height: 1.8;
    font-size: 13px;
    word-break: break-word;
}

.live-chat-message.user .live-chat-bubble {
    background: linear-gradient(135deg, #ff8a00, #ff5e00);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.live-chat-message.agent .live-chat-bubble,
.live-chat-message.admin .live-chat-bubble {
    background: #202228;
    border: 1px solid #30333a;
    border-bottom-left-radius: 4px;
}

.live-chat-message.system .live-chat-bubble {
    background: rgba(255, 138, 0, 0.12);
    border: 1px solid rgba(255, 138, 0, 0.25);
    color: #ffbd73;
    text-align: center;
}

.live-chat-file {
    margin-top: 7px;
}

.live-chat-file a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: inherit;
    text-decoration: none;
    background: rgba(0, 0, 0, 0.16);
    border-radius: 10px;
    padding: 6px 9px;
    font-size: 12px;
}

.live-chat-file a:hover {
    text-decoration: underline;
}

.live-chat-meta {
    margin-top: 5px;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.72);
}

.live-chat-message.agent .live-chat-meta,
.live-chat-message.admin .live-chat-meta {
    color: #9e9e9e;
}

.live-chat-footer {
    background: #18191d;
    border-top: 1px solid #2c2f34;
    padding: 12px;
}

.live-chat-alert {
    margin-bottom: 8px;
    padding: 8px 10px;
    background: rgba(220, 53, 69, 0.13);
    border: 1px solid rgba(220, 53, 69, 0.35);
    color: #ffb4bd;
    border-radius: 10px;
    font-size: 12px;
}

.live-chat-success {
    margin-bottom: 8px;
    padding: 8px 10px;
    background: rgba(25, 135, 84, 0.13);
    border: 1px solid rgba(25, 135, 84, 0.35);
    color: #93f0bf;
    border-radius: 10px;
    font-size: 12px;
}

.live-chat-form {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.live-chat-input {
    flex: 1;
    min-height: 44px;
    max-height: 95px;
    resize: none;
    border-radius: 12px;
    border: 1px solid #34373d;
    background: #101114;
    color: #fff;
    padding: 10px 12px;
    outline: none;
    font-size: 13px;
    line-height: 1.7;
}

.live-chat-input:focus {
    border-color: #ff8a00;
    box-shadow: 0 0 0 3px rgba(255, 138, 0, 0.12);
}

.live-chat-input::placeholder,
.live-chat-field::placeholder,
.live-chat-feedback-textarea::placeholder {
    color: #858585;
}

.live-chat-attach,
.live-chat-send {
    width: 46px;
    height: 44px;
    border-radius: 12px;
    border: 0;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.live-chat-attach {
    background: #25272d;
    border: 1px solid #34373d;
}

.live-chat-attach:hover {
    border-color: #ff8a00;
    color: #ffad53;
}

.live-chat-send {
    background: linear-gradient(135deg, #ff8a00, #ff5e00);
}

.live-chat-send:disabled,
.live-chat-start:disabled,
.live-chat-feedback-submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.live-chat-selected-file {
    margin-top: 8px;
    color: #ffad53;
    font-size: 11px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.live-chat-remove-file {
    border: 0;
    background: transparent;
    color: #ffb4bd;
    cursor: pointer;
    padding: 0;
}

.live-chat-mini-note {
    margin-top: 8px;
    color: #8f8f8f;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.live-chat-rating {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.live-chat-rating-btn {
    height: 46px;
    border-radius: 12px;
    border: 1px solid #3b3f46;
    background: #1b1d22;
    color: #dcdcdc;
    cursor: pointer;
    transition: .2s ease;
    font-size: 12px;
    font-weight: 700;
}

.live-chat-rating-btn:hover,
.live-chat-rating-btn.active {
    border-color: #ff8a00;
    background: rgba(255, 138, 0, 0.18);
    color: #ffbd73;
}

.live-chat-cooldown-counter {
    margin-top: 10px;
    font-size: 26px;
    font-weight: 800;
    color: #ffad53;
    text-align: center;
}

@media (max-width: 576px) {
    .live-chat-widget {
        left: 12px;
        right: 12px;
        bottom: 12px;
    }

    .live-chat-launcher {
        margin-right: auto;
    }

    .live-chat-panel {
        width: 100%;
        height: 78vh;
    }
}