:root {
  --primary: #982586;
  --secondary: #524553;
  --highlight: #ffdd1b;
  --more_highlight: #d83428;
  --dark: #1a1a1a;
  --green: #2d6a4f;
  --gray: #f1f1f1;
   --light-gray: #f5f5f5;
  --cream2: #fef0dc;
  --light: #ffffff;
  --shadow: 0 8px 40px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.18);
}

/* සියලුම styles #htg-chat තුළ පමණක් භාවිතා වේ; website එකේ අනෙක් CSS වෙනස් නොවේ. */
#htg-chat,
#htg-chat * {
    box-sizing: border-box
}

#htg-chat {
    font-family: Poppins, Arial, sans-serif;
    position: fixed;
    bottom: 30px;
    right: 22px;
    z-index: 2147483000;
    color: #29212b;
    font-size: 13px
}

#htg-chat button {
    cursor: pointer;
    font: inherit;
    border: 0
}

#htg-chat-open {
    display: flex;
    align-items: center;
    gap: 10px;
      background: linear-gradient(150deg, var(--primary), var(--secondary));
    /* background: #932588; */
    color: #fff;
    padding: 15px 19px;
    border-radius: 35px;
    box-shadow: 0 9px 28px #6d1c6870;
    font-weight: 600 !important
}

#htg-chat-open i {
    font-size: 19px
}

#htg-chat-panel {
    position: absolute;
    bottom: 68px;
    right: 0;
    width: min(390px, calc(100vw - 24px));
    height: min(560px, calc(100dvh - 105px));
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 12px 50px #23112740;
    display: flex;
    flex-direction: column;
    border: 1px solid #eadfea
}

#htg-chat-panel[hidden] {
    display: none !important
}

.htg-chat-head {
    background: linear-gradient(115deg, #932588, #62215d);
    color: white;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 17px 15px;
    flex-shrink: 0
}

.htg-chat-avatar {
    width: 37px;
    height: 37px;
    display: grid;
    place-items: center;
    background: #ffffff30;
    border-radius: 12px;
    font-size: 18px
}

.htg-chat-head strong {
    display: block;
    font-size: 12px;
    letter-spacing: .5px
}

.htg-chat-head small {
    display: block;
    color: #f7dff2;
    font-size: 10px;
    margin-top: 4px
}

#htg-chat-close {
    margin-left: auto;
    background: transparent;
    color: white;
    font-size: 26px !important;
    line-height: 1
}

#htg-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px;
    background: #faf7fa;
    display: flex;
    flex-direction: column;
    gap: 12px
}

.htg-chat-msg {
    max-width: 88%;
    padding: 11px 13px;
    border-radius: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-wrap: anywhere
}

.htg-chat-msg.bot {
    align-self: flex-start;
    background: #fff;
    border: 1px solid #eee4ef;
    border-bottom-left-radius: 3px
}

.htg-chat-msg.user {
    align-self: flex-end;
    background: #932588;
    color: #fff;
    border-bottom-right-radius: 3px
}

.htg-chat-suggestions {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding: 9px 12px
}

.htg-chat-suggestions button {
    white-space: nowrap;
    background: #f6ecf5;
    color: #7a2871;
    padding: 7px 10px;
    border-radius: 15px;
    font-size: 11px !important
}

#htg-chat-form {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid #f0e7f0
}

#htg-chat-input {
    flex: 1;
    min-width: 0;
    border: 1px solid #e6dbe7;
    border-radius: 11px;
    padding: 10px 12px;
    outline: none;
    font: inherit;
    background: white;
    color: #282028
}

#htg-chat-input:focus {
    border-color: #932588
}

#htg-chat-send {
    background: #932588;
    color: #fff;
    border-radius: 11px;
    width: 41px;
    flex-shrink: 0
}

#htg-chat-send:disabled {
    opacity: .5
}

.htg-chat-foot {
    text-align: center;
    font-size: 9px;
    color: #8a818c;
    padding: 0 7px 8px
}

.htg-chat-product {
    background: white;
    border: 1px solid #eadfea;
    border-radius: 12px;
    padding: 9px;
    display: flex;
    gap: 9px;
    align-items: center
}

.htg-chat-product img {
    width: 50px;
    height: 55px;
    object-fit: contain
}

.htg-chat-product strong {
    display: block;
    font-size: 11px
}

.htg-chat-product a {
    color: #932588;
    font-weight: 600;
    font-size: 11px
}

@media(max-width:480px) {
    #htg-chat {
        right: 25px;
        bottom: 50px
    }

    #htg-chat-panel {
        bottom: 64px;
        height: min(540px, calc(100dvh - 90px))
    }

    #htg-chat-open {
        padding: 13px 15px
    }
}