@font-face {
    font-family: iransans;
    src: url(../fontawesome/IRANSans.ttf);
}

/* @font-face {
  font-family: FontAwesome;
  src: url(../fontawesome-free-6.6.0-web/webfonts/fa-solid-900.woff2);
} */

.align-item-center {
    align-items: center !important;
}

.flex-column {
    flex-direction: column !important;
}

.justify-content-between {
    justify-content: space-between !important;
}


body {
    overflow-x: hidden;
    font-family: iransans;
    direction: rtl;
}

/* ---- Sidebar ---- */
#sidebar {
    overflow-x: hidden;
    text-align: right;
    position: fixed;
    height: 100vh;
    /* background: white; */
    background-color: #002033b8;
    border-left: 2px solid #013248;
    transition: 0.3s ease;
    overflow-y: auto;
}

@media (max-width:1024px) {
    #sidebar {
        background-color: #002033e3;
    }
}

#sidebar::-webkit-scrollbar {
    width: 8px;
    cursor: pointer;
}

#sidebar::-webkit-scrollbar-thumb {
    background: #004165;
    border-radius: 4px;
    cursor: pointer;
}

#sidebar::-webkit-scrollbar-track {
    background: #dddddd7d;
    border-radius: 4px;
}

@media (min-width: 768px) {
    #sidebar {
        width: 16.66666667%;
    }
}


#sidebar.hidden-desktop {
    display: none !important;
}

#openSidebarDesktop {
    width: 5%;
    position: fixed;
    top: 0;
    right: 0;
    align-items: center;
    flex-direction: column;
    gap: 20px;
    height: 100vh;
    background: #002033b8;
    padding: 20px 0;
    /* border-right: 1px solid #80808036; */
    border-right: 2px solid #013248;
    font-size: 20px;
    display: none;
    z-index: 900;
}

    #openSidebarDesktop .icon {
        cursor: pointer;
        color: white;
    }

/* Sidebar در موبایل */
@media (max-width: 1024px) {
    #sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: 260px;
        transform: translateX(-300px);
        z-index: 999;
        display: block !important;
    }

        #sidebar.show {
            transform: translateX(0);
        }

    #openSidebarDesktop {
        display: none !important;
    }
}

/* Backdrop موبایل */
#backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 998;
}

.back {
    background-image: url(../images/bac.jpg);
    background-size: cover;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ---- Chat ---- */
#chat-area {
    position: relative;
    /* height: 100vh; */
    display: flex;
    flex-direction: column;
    transition: 0.3s ease;
    overflow-x: hidden;
    overflow-y: auto;
}

#chat-header {
    padding: 15px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.thenew-style {
    left: 0;
    position: fixed;
    width: 95.666667%;
    top: 5px;
}

@media (max-width:1024px) {
    #chat-header {
        padding: 15px 30px;
        top: 0;
        z-index: 99;
        width: 100%;
        position: fixed;
        padding: 15px 30px;
        margin-bottom: 100px;
        margin: 0 auto;
        left: 0;
        background-color: #001f31db;
    }
}

#chat-messages {
    width: 60%;
    margin: 0 auto;
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    opacity: 1 !important;
    margin-top: 80px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-end;
}

@media (max-width:768px) {
    #chat-messages {
        width: 80%;
        font-size: 13px;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}

/* ---- Input ---- */




.input-wrapper input {
    width: 100%;
    padding: 15px 55px 15px 45px;
    border-radius: 35px;
    border: 1px solid #ccc;
    outline: none;
}

.icon-right {
    position: absolute;
    right: 15px;
    display: flex;
    gap: 14px;
    font-size: 16px;
    align-items: center;
    cursor: pointer;
}

.icon-left {
    position: absolute;
    left: 20px;
    font-size: 16px;
    cursor: pointer;
}

#addMenu {
    position: absolute;
    width: 190px;
    bottom: 55px;
    left: 10px;
    width: 140px;
    background: white;
    border-radius: 12px;
    padding: 10px 0;
    display: none;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    z-index: 50;
}

    #addMenu div {
        padding: 10px 15px;
        cursor: pointer;
    }

        #addMenu div:hover {
            background: #01283a;
        }

#mobile-menu-btn {
    padding: 8px 0px;
    font-size: 22px;
    display: none;
}

h5 {
    margin: 0;
}

@media (max-width: 1024px) {
    #mobile-menu-btn {
        display: block;
    }
}

.list-unstyled {
    padding: 0;
}

.new-col-1 {
    flex: 0 0 auto;
    width: 5%;
    margin-left: 5px;
}

.new-col-11 {
    flex: 0 0 auto;
    width: 94.666667%;
}

#closeSidebarDesktop {
    cursor: pointer;
    color: white;
}

.send-btn {
    padding: 8px 10px;
    border-radius: 50%;
    background-color: #e2e2e2;
}



/*  */
/* پیام‌ها */
#chat-messages {
    padding: 20px;
    padding-bottom: 120px;
}

.input-wrapper {
    background: #dcdcdc;
    box-shadow: 0px 1px 6px #064c5f;
    border-radius: 25px;
    padding: 0px 93px 0 45px;
    display: flex;
    align-items: center;
    position: relative;
    /* width: 80%; */
    width: 53%;
}

@media (max-width:768px) {
    .input-wrapper {
        width: 96% !important;
        padding: 0px 35px;
        padding-right: 50px;
    }
}

/* منوی Add */
#addMenu {
    position: absolute;
    bottom: 60px;
    left: 10px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
    display: none;
    padding: 10px;
}

    #addMenu div {
        border-radius: 10px;
        padding: 6px 10px;
        cursor: pointer;
    }

/* textarea */
#chatInput, #chatInput2 {
    width: 100%;
    height: 50px;
    max-height: 620px;
    resize: none;
    border: none;
    outline: none;
    padding: 0 8px;
    background: transparent;
    overflow-y: auto;
    font-size: 16px;
    line-height: 22px;
    width: 100%;
    resize: none;
    /* overflow: hidden; */
    display: block;
    transition: height .15s ease;
    box-sizing: border-box;
    transform-origin: bottom;
}

    #chatInput::placeholder, #chatInput2::placeholder {
        color: #ffffff9a;
        opacity: 1;
    }
/* آیکن‌ها */
.icon-left1 {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #013248;
}

.icon-left {
    margin-right: 10px;
    font-size: 18px;
    cursor: pointer;
}

.icon-right {
    display: flex;
    align-items: center;
    gap: 17px !important;
}

.send-btn {
    background: black;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

    .send-btn i {
        color: white;
    }

/*  */
/*  */
/*  */
.chat-container {
    width: 100%;
    height: 70vh;
    max-height: 90vh;
    background: #f8f8f8;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
}


.messages-box {
    padding: 18px;
    padding-bottom: 140px;
    overflow-y: auto;
    flex: 1 1 auto;
}

@media(max-width:768px) {
    .messages-box {
        margin-top: 80px !important;
    }
}

/* استایل پیام کاربر */
.user-msg {
    background: #4f616c;
    width: fit-content;
    display: block;
    padding: 10px 14px;
    border-radius: 14px;
    margin: 12px 0;
    max-width: 75%;
    margin-left: auto;
    color: white;
    word-break: break-word;
}

/* استایل پیام ربات / دیگران */
.bot-msg {
    text-align: right;
    padding: 10px 14px;
    border-radius: 14px;
    margin: 8px 0;
    width: fit-content;
    max-width: 75%;
    word-break: break-word;
    line-height: 31px;
    float: left;
    background: #00000042;
    color: #ffffff;
}

.loader-box {
    position: relative;
    background-color: transparent;
    width: 120px;
    height: auto;
    float: left;
    display: flex;
    justify-content: flex-end
}

.bot-img {
    border-radius: 12px;
    overflow: hidden;
    max-width: 70%;
    width: fit-content;
    cursor: pointer;
}

@media(max-width:768px) {
    .bot-img {
        max-width: 95% !important;
    }

    .bot-msg {
        max-width: 100% !important;
    }
}


#chat-input-box {
    display: flex;
    align-items: center;
    justify-content: center;
    bottom: 0;
    left: 0;
    width: 100%;
    position: fixed;
    right: 120px;
    bottom: 22%;
    padding: 30px 0;
    z-index: 40;
}

.left-0 {
    left: 0px !important;
}

@media(max-width:1024px) {
    #chat-input-box {
        position: fixed;
        right: 0px;
    }
}

.hiuser {
    width: 100%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    font-weight: bold;
    /* position: absolute; */
    /* bottom: 100px;
  min-height: 100%; */
    /* overflow-y: scroll;
  direction: rtl;  */
    padding-bottom: 145px;
    bottom: 100px;
    min-height: 100vh;
}

    .hiuser h2 {
        font-weight: bold;
        color: white;
        text-shadow: 0px 3px 0px #006294, 0px -3px 0px #006294, 3px 0px 0px #006294, 0px 3px 0px #006294;
        /* -webkit-text-stroke: 2px #02384e; */
        font-size: 1.7rem;
    }

@media (max-width:450px) {
    .hiuser h2 {
        font-size: 17px;
    }
}

.hiuser h1 {
    background: linear-gradient(to right, #f2e5a2 0%, #d9b650 25%, #b88a28 50%, #e6d293 75%, #f2e5a2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.input-wrapper {
    background-color: #002135ad;
    width: 60%;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}



/* منو Add */
#addMenu {
    width: 180px;
    color: white;
    position: absolute;
    bottom: 58px;
    left: 12px;
    display: none;
    background: #013248;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    z-index: 50;
}

#chatInput, #chatInput2 {
    width: 100%;
    min-height: 45px;
    max-height: 200px;
    resize: none;
    overflow-y: auto;
    padding: 10px 14px;
    border-radius: 12px;
    /* border: 1px solid #ddd; */
    font-size: 15px;
    line-height: 1.4;
    box-sizing: border-box;
    text-align: right;
    direction: rtl;
    color: white;
}

    #chatInput::placeholder,
    #chatInput2::placeholder {
        direction: ltr;
        unicode-bidi: plaintext;
    }
    #chatInput:placeholder-shown,
    #chatInput2:placeholder-shown {
        direction: ltr;
    }

    #chatInput::-webkit-scrollbar, #chatInput2::-webkit-scrollbar {
        width: 8px;
        cursor: pointer;
    }

    #chatInput::-webkit-scrollbar-thumb, #chatInput2::-webkit-scrollbar-thumb {
        background: #012e47;
        border-radius: 4px;
        cursor: pointer;
    }

    #chatInput::-webkit-scrollbar-track, #chatInput2::-webkit-scrollbar-track {
        background: #dddddd7d;
        border-radius: 4px;
    }

/* آیکن‌ها */
.icon-left {
    margin-right: 8px;
    cursor: pointer;
    font-size: 18px;
}

.icon-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* دکمه ارسال */
.send-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.d2 {
    display: none;
}

@media(max-width:768px) {
    .send-btn {
        width: 30px;
        height: 30px;
    }

    .d2 {
        display: none;
    }
}

.send-btn .icon {
    color: #013248;
    font-size: 16px;
}


.messages-box .user-msg.new {
    display: block;
    opacity: 0;
    animation: fadeIn .25s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.pb-25 {
    padding-bottom: 22px !important;
}

.sidebar-header {
    padding-top: 13px !important;
    border-bottom: 2px solid #013248;
}

.sidebarlist1 li a,
.sidebarlist2 li a {
    color: rgb(249, 249, 249);
    text-decoration: none;
    font-size: 13px;
}

.sidebarlist1 li,
.sidebarlist2 li {
    margin: 12px;
    width: 90%;
    cursor: pointer;
    font-size: 15px;
    text-align: right;
}

    .sidebarlist1 li:hover,
    .sidebarlist2 li:hover {
        border-radius: 10px;
        background-color: rgba(128, 128, 128, 0.578);
    }

.sidebarlist2 li {
    display: flex;
    /* flex-direction: row-reverse; */
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.8rem 0.5rem 1.2rem;
}

    .sidebarlist2 li .three-dots .icon {
        opacity: 0;
        transition: all 0.2s ease-in-out;
    }

    .sidebarlist2 li:hover .icon {
        opacity: 1;
    }

.chat-title {
    font-size: 14px;
    color: rgb(255, 255, 255);
    position: relative;
}

    .chat-title::before {
        content: "";
        width: 80%;
        height: 1px;
        background-color: #013248;
        position: absolute;
        border-radius: 8px;
        top: 0px;
        right: 10%;
    }

@media (max-width:768px) {
    .sidebarlist2 li .three-dots .icon {
        opacity: 1 !important;
    }
}

.pb-0 {
    padding-bottom: 0 !important;
}

/* .sidebarlist1 li  {
  direction: rtl;
} */
.sidebarlist1 li a {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* modal */
.image-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    inset: 0;
    background: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
}

.modal-content {
    max-width: 90%;
    max-height: 80%;
    border-radius: 10px;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    color: white;
    cursor: pointer;
    z-index: 10001;
}

.image-actions {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 25px;
    z-index: 10001;
}

.action-btn {
    background: none;
    border: none;
    font-size: 30px;
    color: white;
    cursor: pointer;
}

/*  */
.chat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .chat-item.active-chat {
        border-radius: 10px;
        background-color: rgba(128, 128, 128, 0.578);
    }

        .chat-item.active-chat .icon {
            opacity: 1 !important;
        }

.three-dots {
    cursor: pointer;
    padding: 5px;
    color: white;
}

.chat-menu {
    position: absolute;
    top: 35px;
    left: -3px;
    background: #012e47;
    color: white;
    border-radius: 8px;
    width: 160px;
    box-shadow: 0 5px 15px rgb(0 0 0 / 35%);
    display: none;
    z-index: 200;
    padding: 8px 10px;
}

    .chat-menu .menu-item {
        border-radius: 10px;
        padding: 10px 12px;
        cursor: pointer;
        display: flex;
        gap: 8px;
        align-items: center;
    }

        .chat-menu .menu-item:hover {
            background: #00000030;
        }


.temp-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    background: rgba(0, 0, 0, 0.5);
    /* بک‌گراند تیره */
    justify-content: center;
    align-items: center;
    z-index: 3000;
}

.modal-box {
    background: #01141e;
    padding: 25px;
    border-radius: 12px;
    width: 28rem;
    border: 1px solid rgb(1 34 52);
    color: white;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
    width: 100%;
}

    .modal-actions .yes,
    .modal-actions .no {
        padding: 8px 18px;
        border: none;
        border-radius: 3.40282e+38px;
        cursor: pointer;
        font-size: 12px;
    }

.yes {
    background: #0b2a33;
    color: white;
}

.no {
    background: #ccc;
}

.version {
    font-size: 16px;
    border: 2px solid #013248;
    border-radius: 10px;
    color: white;
    background-color: #001f31;
    padding: 10px 15px;
    cursor: pointer;
}

@media (min-width:768px) {
    .mb-100 {
        margin-bottom: 100px;
    }
}
/*  */
.loader {
    width: 48px;
    height: 48px;
    border: 5px solid #FFF;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    position: relative;
    animation: pulse 1s linear infinite;
}

    .loader:after {
        content: '';
        position: absolute;
        width: 48px;
        height: 48px;
        border: 5px solid #FFF;
        border-radius: 50%;
        display: inline-block;
        box-sizing: border-box;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        animation: scaleUp 1s linear infinite;
    }

@media (max-width:500px) {
    .loader {
        width: 39px;
        height: 39px;
        border: 4px solid #FFF;
    }

        .loader:after {
            width: 39px;
            height: 39px;
            border: 4px solid #FFF;
        }
}

@keyframes scaleUp {
    0% {
        transform: translate(-50%, -50%) scale(0)
    }

    60%, 100% {
        transform: translate(-50%, -50%) scale(1)
    }
}

@keyframes pulse {
    0%, 60%, 100% {
        transform: scale(1)
    }

    80% {
        transform: scale(1.2)
    }
}

.bot-title {
    font-weight: bold;
    margin-bottom: 5px;
}

.bot-subtitle {
    font-size: 14px;
    color: #e9e9e9;
    margin-bottom: 5px;
}

.bot-divider {
    height: 1px;
    background: #ddd;
    margin: 10px 0;
}
/* new style */

.login-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(2px);
    display: none;
    z-index: 999;
}


.login-modal {
    position: fixed;
    width: 420px;
    height: 420px;
    padding: 20px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    z-index: 1000;
    direction: rtl;
    align-items: stretch;
    flex-direction: column;
    justify-content: space-evenly;
    box-shadow: 0 0px 14px 11px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px) saturate(120%);
    -webkit-backdrop-filter: blur(12px) saturate(120%);
    background-size: cover;
    border-radius: 16px;
}

@media (max-width:550px) {
    .login-modal {
        width: 95%;
        height: 340px;
    }
}

.login-header {
    font-size: 25px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    color: white;
    position: relative;
    align-items: center
}

.close-modal {
    cursor: pointer;
    font-size: 24px;
    position: absolute;
    top: 9px;
    left: 15px;
    color: white;
}


.input-box {
    position: relative;
    margin-bottom: 15px;
}

    .input-box input {
        width: 100%;
        padding: 10px 35px 10px 10px;
        border-radius: 8px;
        border: none;
        outline: none;
        background: #000b11ad;
        color: white;
    }

.input-icon {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    color: white;
}


.login-btn {
    width: 100%;
    padding: 10px;
    /* background: #14374b; */
    color: white;
    border: 2px solid #0e1b22;
    /* border: none; */
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    background: #0000000f;
}

    .login-btn:hover {
        background: #0000003f;
    }
