/* whatsapp.css */

/* Base styles for the main chat container (Desktop View) */
#whatsapp-chat {
    box-sizing: border-box !important;
    outline: none !important;
    position: fixed;
    width: 350px;
    border-radius: 10px;
    box-shadow: 0 1px 15px rgba(32, 33, 36, 0.28);
    bottom: 90px;
    right: 30px;
    overflow: hidden;
    z-index: 400;
    background: #fff;
}

/* Base styles for the floating "Chat with Us" button (Desktop View) */
a.blantershow-chat {
    background: #fff;
    color: #404040;
    position: fixed;
    display: flex;
    font-weight: 400;
    justify-content: space-between;
    z-index: 98;
    bottom: 25px;
    right: 30px;
    font-size: 15px;
    padding: 10px 20px;
    border-radius: 30px;
    box-shadow: 0 1px 15px rgba(32, 33, 36, 0.28);
    text-decoration: none; /* Added to remove underline */
}

a.blantershow-chat svg {
    transform: scale(1.2);
    margin: 0 10px 0 0;
}

/* Chat Header */
.whatsapp-chat-header {
    background: #095e54; /* Dark green for header */
    color: #fff;
    padding: 20px;
}

.whatsapp-chat-header h3 {
    margin: 0 0 10px;
}

.whatsapp-chat-header p {
    font-size: 14px;
    line-height: 1.7;
    margin: -10px; /* Adjusting margin to fit better */
}

.whatsapp-chat-header .whatsapp-chat-name {
    font-size: 16px;
    font-weight: 600;
    padding-bottom: 0;
    margin-bottom: 0;
    line-height: 0.5;
}

/* Chat Avatar with Online Indicator */
.whatsapp-chat-avatar {
    position: relative;
}

.whatsapp-chat-avatar::after {
    content: "";
    bottom: 0px;
    right: 0px;
    width: 12px;
    height: 12px;
    box-sizing: border-box;
    background-color: #4ad504; /* Online indicator green */
    display: block;
    position: relative;
    z-index: 1;
    border-radius: 50%;
    border: 2px solid #095e54; /* Border color matching header */
    left: 40px;
    top: 38px;
}

.whatsapp-chat-avatar img {
    border-radius: 100%;
    width: 50px;
    float: left;
    margin: 0 10px 0 0;
}

/* Chat Labels and Names */
.info-chat span {
    display: block;
}

#get-label,
span.chat-label {
    font-size: 12px;
    color: #888;
}

#get-nama,
span.chat-nama {
    margin: 5px 0 0;
    font-size: 15px;
    font-weight: 700;
    color: #222;
}

#get-label,
#get-nama {
    color: #fff; /* For header text */
}

span.my-number {
    display: none; /* Hidden element */
}

/* Chat Input Area */
textarea#chat-input {
    border: none;
    font-family: "Arial", sans-serif;
    width: 100%;
    height: 50px;
    outline: none;
    resize: none;
    padding: 10px;
    font-size: 14px;
}

/* Send Button */
a#send-it {
    width: 30px;
    font-weight: 700;
    padding: 10px 10px 0;
    background: #eee;
    border-radius: 10px;
}

a#send-it svg {
    fill: #a6a6a6;
    height: 24px;
    width: 24px;
}

/* First Message Bubble */
.first-msg {
    background: transparent;
    padding: 30px;
    text-align: center;
}

.first-msg span {
    background: #e2e2e2;
    color: #333;
    font-size: 14.2px;
    line-height: 1.7;
    border-radius: 10px;
    padding: 15px 20px;
    display: inline-block;
}

.start-chat .blanter-msg {
    display: flex; /* For input and send button layout */
}

#get-number {
    display: none; /* Hidden element for WhatsApp number */
}

/* Close Chat Button */
a.close-chat {
    position: absolute;
    top: 5px;
    right: 15px;
    color: #fff;
    font-size: 30px;
}

/* Keyframe Animations for chat visibility */
@keyframes ZpjSY {
    0% { background-color: #b6b5ba; }
    15% { background-color: #111111; }
    25% { background-color: #b6b5ba; }
}

@keyframes hPhMsj {
    15% { background-color: #b6b5ba; }
    25% { background-color: #111111; }
    35% { background-color: #b6b5ba; }
}

@keyframes iUMejp {
    25% { background-color: #b6b5ba; }
    35% { background-color: #111111; }
    45% { background-color: #b6b5ba; }
}

@keyframes showhide {
    from { transform: scale(0.5); opacity: 0; }
}

@keyframes showchat {
    from { transform: scale(0); opacity: 0; }
}

/* Chat Visibility Classes */
.hide {
    display: none;
    animation-name: showhide;
    animation-duration: 0.5s;
    transform: scale(1); /* Ensure final state is scaled */
    opacity: 1; /* Ensure final state is opaque */
}

.show {
    display: block;
    animation-name: showhide;
    animation-duration: 0.5s;
    transform: scale(1); /* Ensure final state is scaled */
    opacity: 1; /* Ensure final state is opaque */
}

/* WhatsApp Message Container and Bubbles */
.whatsapp-message-container {
    display: flex;
    z-index: 1;
}

.whatsapp-message {
    padding: 7px 14px 6px;
    background-color: white;
    border-radius: 0px 8px 8px;
    position: relative;
    transition: all 0.3s ease 0s;
    opacity: 0; /* Initial state for animation */
    transform-origin: center top 0px;
    z-index: 2;
    box-shadow: rgba(0, 0, 0, 0.13) 0px 1px 0.5px;
    margin-top: 4px;
    margin-left: -54px; /* Adjusting for avatar/spacing */
    max-width: calc(100% - 66px);
}

.whatsapp-chat-body {
    padding: 20px 20px 20px 10px;
    background-color: #e6ddd4; /* WhatsApp chat background */
    position: relative;
}

.whatsapp-chat-body::before {
    display: block;
    position: absolute;
    content: "";
    left: 0px;
    top: 0px;
    height: 100%;
    width: 100%;
    z-index: 0;
    opacity: 0.08;
    background-image: url("https://elfsight.com/assets/chats/patterns/whatsapp.png"); /* Pattern background */
}

.dAbFpq { /* This class seems to be for a message container/flex item */
    display: flex;
    z-index: 1;
}

/* Typing indicator dots */
.eJJEeC {
    background-color: white;
    width: 52.5px;
    height: 32px;
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: 10px;
    opacity: 0; /* Initial state for animation */
    transition: all 0.1s ease 0s;
    z-index: 1;
    box-shadow: rgba(0, 0, 0, 0.13) 0px 1px 0.5px;
}

.hFENyl {
    position: relative;
    display: flex;
}

.ixsrax,
.dRvxoz {
    height: 5px;
    width: 5px;
    margin: 0px 2px;
    border-radius: 50%;
    display: inline-block;
    position: relative;
    animation-duration: 1.2s;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
    top: 0px;
}

.ixsrax {
    background-color: #9e9da2;
    animation-name: ZpjSY;
}

.dRvxoz {
    background-color: #b6b5ba;
    animation-name: hPhMsj;
}

/* Incoming message bubble */
.kAZgZq {
    padding: 7px 14px 6px;
    background-color: white;
    border-radius: 0px 8px 8px;
    position: relative;
    transition: all 0.3s ease 0s;
    opacity: 0; /* Initial state for animation */
    transform-origin: center top 0px;
    z-index: 2;
    box-shadow: rgba(0, 0, 0, 0.13) 0px 1px 0.5px;
    margin-top: 4px;
    margin-left: -54px; /* Adjusting for avatar/spacing */
    max-width: calc(100% - 66px);
}

.kAZgZq::before {
    position: absolute;
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAmCAMAAADp2asXAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAACQUExURUxpccPDw9ra2m9vbwAAAAAAADExMf///wAAABoaGk9PT7q6uqurqwsLCycnJz4+PtDQ0JycnIyMjPf3915eXvz8/E9PT/39/RMTE4CAgAAAAJqamv////////r6+u/v7yUlJeXl5f///5ycnOXl5XNzc/Hx8f///xUVFf///+zs7P///2fVensAAAAvdFJOUwCow1cBCCnqAhNAnY0WIDW2f2/hSeo99g1lBYT87vDXG8/6d8oL4sgM5szrkgl660OiZwAAAHRJREFUKM/ty7cSggAABNFVUQFzwizmjPz/39k4YuFWtm55bw7eHR6ny63+alnswT3/rIDzUSC7CrAziPYCJCsB+gbVkgDtVIDh+DsE9OTBpCtAbSBAZSEQNgWIygJ0RgJMDWYNAdYbAeKtAHODlkHIv997AkLqIVOXVU84AAAAAElFTkSuQmCC");
    background-position: 50% 50%;
    background-repeat: no-repeat;
    background-size: contain;
    content: "";
    top: 0px;
    left: -12px;
    width: 12px;
    height: 19px;
}

.bMIBDo { /* Author name within message bubble */
    font-size: 13px;
    font-weight: 700;
    line-height: 18px;
    color: rgba(0, 0, 0, 0.4);
}

.iSpIQi { /* Message text within bubble */
    font-size: 14px;
    line-height: 19px;
    margin-top: 4px;
    color: #111111;
}

.cqCDVm { /* Message time within bubble */
    text-align: right;
    margin-top: 4px;
    font-size: 12px;
    line-height: 16px;
    color: rgba(17, 17, 17, 0.5);
    margin-right: -8px;
    margin-bottom: -4px;
}

/* Media Query for Phone View */
@media screen and (max-width: 480px) {
    #whatsapp-chat {
        width: auto; /* Allow width to adjust */
        left: 5%; /* 5% margin from left */
        right: 5%; /* 5% margin from right */
        bottom: 90px; /* Keep consistent bottom spacing */
        font-size: 80%; /* Slightly smaller font size for overall chat */
    }

    a.blantershow-chat {
        bottom: 25px; /* Keep consistent bottom spacing */
        right: 20px; /* Adjust right margin for smaller screens */
        padding: 8px 15px; /* Slightly smaller padding for the button */
        font-size: 14px; /* Slightly smaller font size for the button */
    }
}
