* {
  box-sizing: border-box;
}

/* =============================================
   EASYREACH LAUNCHER WRAP — DESKTOP (≥768px)
   
   واتساب ديسكتوب: bottom:28px  right:28px  height:58px
   EasyReach:      bottom = 28 + 58 + 14(gap) = 100px
   ============================================= */
.easyreach-launcher-wrap {
    z-index: 2147483647;
    position: fixed;
    bottom: 120px;
    right: 28px;
    width: 56px;
    height: 56px;
    transform-origin: center center;
}

/* =============================================
   LAUNCHER BUTTON
   ============================================= */
.easyreach-launcher-btn {
    position: absolute;
    top: 0;
    left: 0;
    background: rgb(103, 61, 230);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    cursor: pointer;
    backface-visibility: hidden;
    transition: transform 167ms cubic-bezier(0.33, 0, 0, 1),
                box-shadow 200ms ease;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    padding: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 20px rgba(103, 61, 230, 0.45),
                0 2px 8px rgba(0, 0, 0, 0.18);
}

.easyreach-launcher-btn:hover {
    transition: transform 250ms cubic-bezier(0.33, 0, 0, 1),
                box-shadow 200ms ease;
    transform: scale(1.1);
    box-shadow: 0 8px 28px rgba(103, 61, 230, 0.55),
                0 4px 12px rgba(0, 0, 0, 0.22);
}

.easyreach-launcher-btn.border-style-smotth_square {
    border-radius: 14px;
}

.er-launcher-close-icon {
    display: none;
}

/* =============================================
   LAUNCHER WINDOW — DESKTOP (≥768px)
   تفتح فوق الزر: bottom = 100 + 56 + 8 = 164px
   ============================================= */
.easyreach-launcher-window-wrap {
    z-index: 2147483000;
    position: fixed;
    bottom: 164px;
    right: 20px;
    height: min(704px, calc(100% - 180px));
    min-height: 80px;
    width: 400px;
    max-height: 704px;
    box-shadow: rgba(0, 0, 0, 0.16) 0px 5px 40px;
    border-radius: 12px;
    transform-origin: right bottom;
    pointer-events: all;
    background: linear-gradient(rgb(103, 61, 230) 40%, rgb(255, 255, 255) 100%);
    display: none;
}

/* =============================================
   CLOSE BUTTON
   ============================================= */
.er-launcher-close {
    background: #fff;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border: 2px solid #fa8155;
    border-radius: 6px;
    position: absolute;
    right: 10px;
    top: -17px;
    padding: 3px;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.2s ease;
}

.er-launcher-close:hover {
    background: #fa8155;
}

/* =============================================
   MOBILE (max-width: 767px)  ← يطابق breakpoint واتساب
   
   واتساب موبايل: bottom:calc(80px + safe-area)  right:16px  height:52px
   EasyReach:     bottom = 80 + 52 + 14(gap) = 146px + safe-area
   right = 16px (نفس واتساب للمحاذاة)
   ============================================= */
@media only screen and (max-width: 767px) {

    /* زر EasyReach فوق واتساب مباشرة */
    .easyreach-launcher-wrap {
        bottom: calc(146px + env(safe-area-inset-bottom, 0px));
        right: 16px;
        width: 52px;
        height: 52px;
    }

    .easyreach-launcher-btn {
        width: 52px;
        height: 52px;
    }

    /* النافذة تملأ الشاشة بالكامل على الجوال */
    .easyreach-launcher-window-wrap {
        bottom: 0;
        right: 0;
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        border-top-left-radius: 16px;
        border-top-right-radius: 16px;
    }
}

/* =============================================
   WINDOW CONTENT
   ============================================= */
.window-content-area {
    padding: 16px;
    max-height: 100%;
    overflow: auto;
}

.window-bottom-area-wrap {
    position: absolute;
    bottom: 0;
    background: #fff;
    width: 100%;
    height: 80px;
    border-bottom-right-radius: 12px;
    border-bottom-left-radius: 12px;
}

@media screen and (max-width: 767px) {
    .window-bottom-area-wrap {
        height: 60px;
    }
    .er-launcher-tab {
        font-size: 12px;
    }
    .bottom-tabs .er-launcher-tab svg {
        width: 20px;
        height: 20px;
    }
}

/* =============================================
   BOTTOM TABS
   ============================================= */
.bottom-tabs {
    display: flex;
    justify-content: space-between;
    padding: 11px 25px;
    align-items: center;
}

.er-launcher-tab {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.er-launcher-tab:hover,
.er-launcher-tab.er-tab-active {
    color: #673de6;
}

.er-launcher-tab:hover svg path,
.er-launcher-tab:hover svg circle,
.er-launcher-tab.er-tab-active svg path,
.er-launcher-tab.er-tab-active svg circle {
    fill: #673de6;
}

/* =============================================
   HOME TAB
   ============================================= */
.home-tab-content {
    height: 66vh;
    overflow-y: auto;
    padding-right: 12px;
    margin-right: -16px;
}

.support-tem-area {
    margin-bottom: 50px;
}

.support-tem-area ul {
    padding: 0;
    margin: 0;
    list-style: none;
    display: flex;
}

.support-tem-area ul li img {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    margin-left: -4px;
}

.support-tem-area ul li:first-child img {
    margin-left: 0;
}

.er-window-title {
    font-size: 24px;
    color: #fff;
    margin-top: 25px;
}

.help-tab-content h3 {
    color: #fff;
    font-size: 22px;
}

/* =============================================
   LINK TOOLBAR
   ============================================= */
.er-link-toolbar-wrap {
    margin-top: 25px;
}

.er-link-toolbar-wrap ul {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    list-style: none;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.er-link-toolbar-wrap ul li a {
    background: #ffffff;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 58px;
    position: relative;
}

.er-link-toolbar-wrap ul li a svg,
.er-link-toolbar-wrap ul li a svg path {
    fill: #673de6;
}

.er-link-toolbar-wrap .custom-element-tooltip {
    display: none;
    position: absolute;
    top: -32px;
    font-size: 13px;
    background: #212121;
    color: #ffffff;
    width: max-content;
    text-align: center;
    z-index: 999;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
}

.er-link-toolbar-wrap ul li:first-child .custom-element-tooltip {
    right: -25px;
}

.er-link-toolbar-wrap ul li:first-child .custom-element-tooltip::after {
    margin-left: -18px;
}

.er-link-toolbar-wrap .custom-element-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: black transparent transparent transparent;
}

.er-link-toolbar-wrap ul li a:hover .custom-element-tooltip {
    display: block;
}

/* =============================================
   KNOWLEDGE BASE
   ============================================= */
.er-knowledge-based-wrap {
    margin-top: 35px;
    padding-bottom: 40px;
}

.er-knowledge-based-inner {
    position: relative;
    box-sizing: border-box;
    overflow: hidden;
    padding: 15px;
    background: white;
    border-radius: 10px;
    box-shadow: rgba(0, 0, 0, 0.08) 0px 0px 0px 1px,
                rgba(0, 0, 0, 0.06) 0px 2px 8px;
    margin-bottom: 30px;
}

.er-knowledge-based-inner h3 {
    margin-top: 0;
    margin-bottom: 19px;
    font-size: 20px;
    font-weight: 600;
}

.er-knowledge-based-inner ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

.er-knowledge-based-inner ul li a {
    font-size: 15px;
    text-decoration: none;
    display: block;
    padding: 6px;
}

.er-active { display: block; }
.er-hide   { display: none;  }

.easyreach-knowledge-details-wrap {
    display: none;
    background: #fff;
    border-radius: 12px;
}

.window-content-help-control {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    align-items: center;
}

.window-content-help-details {
    padding: 12px;
    font-size: 16px;
    overflow-y: scroll;
    height: 70vh;
}

.knowledge-details-title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 20px;
}

.knowledge-details-thumbnail img {
    max-width: 100%;
    height: auto;
}

.easyreach-toggle-expansion,
.easyreach-toggle-reduction,
.easyreach-category-go-back,
.knowledge-based-item,
.er-product-item,
.easyreach-go-back {
    cursor: pointer;
}

.easyreach-toggle-reduction { display: none; }
.knowledge-category-posts   { display: none; }

.er-product-item,
.knowledge-based-item {
    font-size: 15px;
    color: #000;
    padding: 8px 6px;
    transition: 0.4s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.knowledge-based-item:hover {
    background: rgba(103, 61, 230, 0.1);
    border-radius: 8px;
}

.er-product-item {
    background: #9677f2;
    border-radius: 8px;
    margin-bottom: 8px;
}

.er-product-item:hover { background: #8963f9; }

.er-product-item a {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 6px;
    color: #fff;
}

.er-product-item a img {
    width: 40px;
    border: 1px solid #fff;
    border-radius: 4px;
}

.knowledge-based-cat-item {
    display: flex;
    flex-direction: column;
    align-items: start;
}

.knowledge-based-item-title {
    display: flex;
    justify-content: space-between;
    width: 100%;
    line-height: 1.2;
}

.articles-count { font-size: 13px; }

/* =============================================
   CONTACT FORM
   ============================================= */
.er-contact-form-wrap-top {
    overflow-y: auto;
    height: 66vh;
    padding-bottom: 60px;
    padding-right: 6px;
    margin-top: 20px;
}

.er-contact-form-wrap {
    max-width: 400px;
    background: #fff;
    padding: 18px;
    border-radius: 5px;
    margin: 0 auto;
    margin-top: 20px;
}

.er-contact-form input {
    width: 100%;
    height: 40px;
    margin: 0;
    margin-bottom: 15px;
}

.er-contact-form textarea { width: 100%; }

.er-contact-form input,
.er-contact-form textarea {
    border: 1px solid #eee;
    border-radius: 5px;
    padding: 6px;
    font-size: 15px;
}

.contact-form-title {
    color: #000;
    font-size: 20px;
    margin-top: 0;
    margin-bottom: 20px;
}

.er-contact-form input[type=submit].er-contact-submit-btn {
    margin-top: 20px;
    background: #673de6 !important;
    color: #fff !important;
    font-size: 15px;
    border: 1px solid #673de6;
    transition: 0.4s;
}

.er-contact-form input[type=submit].er-contact-submit-btn:hover {
    background: transparent !important;
    color: #000 !important;
}

/* =============================================
   VIDEO TAB
   ============================================= */
.er-custom-video {
    border: 1px solid #fff;
    padding: 8px 6px;
    border-radius: 5px;
    background: #fff;
    margin-bottom: 25px;
    line-height: 1;
}

.er-custom-video video {
    width: 100%;
    height: auto;
    margin: 0;
}

.er-custom-video video,
.youtube-video-frame {
    border-radius: 7px;
}

.er-custom-video p {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 15px;
    margin-top: 5px;
    border-bottom: 1px solid #dadada;
    padding-bottom: 8px;
    color: #292929;
    line-height: 1.3;
}

.youtube-video-frame {
    width: 100%;
    height: auto;
}

.video-tab-content .video-tab-content-inner {
    overflow-y: auto;
    height: 66vh;
    padding-bottom: 60px;
    padding-right: 6px;
    margin-top: 20px;
}

/* =============================================
   AI CHAT
   ============================================= */
.er-ai-chat-form-wrap {
    background: #fff;
    padding: 10px;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 64vh;
    margin-top: 10px;
}

.er-ai-tab-title {
    margin: 0;
    padding-bottom: 5px;
    border-bottom: 1px solid #e7e0e0;
    margin-bottom: 9px;
    font-size: 15px;
    font-weight: 600;
}

.er-ai-conversation-block {
    overflow-y: scroll;
    height: 100vh;
    padding-right: 10px;
}

.ai-chat-request-item {
    display: flex;
    justify-content: end;
}

.ai-chat-request-item span { background: #f4f4f4; }

.ai-chat-response-item {
    display: flex;
    justify-content: flex-start;
    gap: 6px;
    align-items: flex-start;
}

.ai-chat-response-item svg {
    width: 20px;
    height: auto;
}

.ai-chat-response-item .bot-icon {
    width: 30px;
    height: auto;
    max-width: max-content;
    border: 2px solid #673de6;
    border-radius: 50px;
    padding: 2px;
}

.ai-chat-response-item span { background: #e3effd; }

.ai-chat-request-item span p:not(:first-child),
.ai-chat-response-item span p:not(:first-child) {
    margin-top: 10px !important;
    margin-bottom: 0px !important;
}

.ai-chat-request-item span p:first-child,
.ai-chat-response-item span p:first-child {
    margin: 0px !important;
}

.ai-chat-request-item span h3,
.ai-chat-response-item span h3 { font-size: 18px; }

.ai-chat-response-item { text-align: left; }

.ai-chat-request-item,
.ai-chat-response-item { margin-bottom: 20px; }

.ai-chat-request-item span,
.ai-chat-response-item span {
    border-radius: 6px;
    padding: 8px;
    font-size: 15px;
    color: #111;
    display: inline-block;
    max-width: 100%;
    word-break: break-word;
}

.er-ai-prompt-block input {
    border: 1px solid #f4f4f4;
    border-radius: 8px;
    height: 40px;
    font-size: 15px;
    max-width: 100%;
    width: 100%;
    background: #f4f4f4;
    padding: 5px;
}

.er-ai-prompt-block {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-top: 1px solid #ccc;
    padding-top: 7px;
}

.er-ai-prompt-block textarea {
    border-radius: 5px;
    border: 1px solid #e7e0e0;
    height: 55px;
    padding: 6px;
    width: 100%;
}

.ai-chat-trigger {
    background: #673de6;
    border-radius: 8px;
    display: inline-flex;
    padding: 6px;
    cursor: pointer;
    transition: 0.2s;
}

.ai-chat-trigger:hover {
    scale: 1.1;
    box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
}

.er-alert { font-size: 14px; }

/* =============================================
   SCROLLBAR
   ============================================= */
.er-scrollbar::-webkit-scrollbar-track {
    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
    background-color: #F5F5F5;
    border-radius: 5px;
}

.er-scrollbar::-webkit-scrollbar {
    border-radius: 5px;
    width: 10px;
    background-color: #F5F5F5;
}

.er-scrollbar::-webkit-scrollbar-thumb {
    border-radius: 5px;
    background-color: #F90;
    background-image: -webkit-linear-gradient(45deg,
        rgba(255, 255, 255, .2) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, .2) 50%,
        rgba(255, 255, 255, .2) 75%,
        transparent 75%,
        transparent);
}

/* =============================================
   LOADERS
   ============================================= */
.er-loader {
    width: 20px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: #000;
    box-shadow: 0 0 0 0 #0004;
    animation: l1 1s infinite;
    margin: 40px auto;
}

@keyframes l1 {
    100% { box-shadow: 0 0 0 30px #0000; }
}

.er-chat-suggestions {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}

.er-chat-suggestions-top {
    font-size: 14px;
    margin-bottom: 7px;
    display: block;
    font-weight: 500;
}

.er-chat-suggestions .er-chat-suggestion {
    border: 1px solid #8c6cec;
    display: inline-block;
    border-radius: 6px;
    padding: 4px 6px;
    line-height: 1.2;
    font-size: 14px;
    cursor: pointer;
    background: #ecf1fb;
    transition: 0.3s;
}

.er-chat-suggestions .er-chat-suggestion:hover {
    background: #8c6cec;
    color: #fff;
}

.er-thinking-loader {
    width: 45px;
    aspect-ratio: 5;
    --_g: no-repeat radial-gradient(circle closest-side, #000 90%, #0000);
    background: var(--_g) 0% 50%, var(--_g) 50% 50%, var(--_g) 100% 50%;
    background-size: calc(100% / 3) 100%;
    animation: genchat-loaderl7 1s infinite linear;
}

@keyframes genchat-loaderl7 {
    33% {
        background-size: calc(100% / 3) 0%,
                         calc(100% / 3) 100%,
                         calc(100% / 3) 100%;
    }
    50% {
        background-size: calc(100% / 3) 100%,
                         calc(100% / 3) 0%,
                         calc(100% / 3) 100%;
    }
    66% {
        background-size: calc(100% / 3) 100%,
                         calc(100% / 3) 100%,
                         calc(100% / 3) 0%;
    }
}