#secure-chat-widget {
    z-index: 2147483000;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 400px;
    max-height: 700px;
    box-shadow: rgba(0, 0, 0, 0.16) 0px 5px 40px;
    border-radius: 16px;
    overflow: hidden;
    display: none;
    flex-direction: column;
    background-color: white;
    font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    font-size: 14px;
    color: black;
}

#chat-hello {
    color: black;
}

#secure-chat-widget #chat-header {
    background-color: #9f78ff;
    color: white;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    position: relative;
}

#secure-chat-widget #chat-header-back {
    position: absolute;
    top: 10px;
    left: 10px;
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    display: none;
}

#secure-chat-widget #chat-header-close {
    position: absolute;
    top: 0px;
    right: 10px;
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

#secure-chat-widget #chat {
    border: 1px solid #ccc;
    padding: 10px;
    height: 400px;
    overflow-y: scroll;
}

#secure-chat-widget .message {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

#secure-chat-widget .message.user {
    justify-content: flex-end;
}

#secure-chat-widget .message.agent {
    justify-content: flex-start;
}

#secure-chat-widget .message .agent-profile-image {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin: 0 10px;
}

#secure-chat-widget .message .text {
    max-width: 250px;
    padding: 10px;
    border-radius: 5px;
}

#secure-chat-widget .message.user .text {
    background-color: #9f78ff;
    color:#ffffff;
}

#secure-chat-widget .message.agent .text {
    background-color: rgb(242, 242, 242);
    word-wrap: break-word;
    word-break: break-word;
    white-space: normal;
}
#secure-chat-widget .message.agent .text pre {
    word-wrap: break-word;
    word-break: break-word;
    white-space: normal;
}

#secure-chat-widget .typing {
    font-style: italic;
    color: #999;
}

#secure-chat-widget #chat-header-message {
    display: flex;
    align-items: center;
    margin-left:25px;
}

#secure-chat-widget #message {
    /*width: calc(100% - 60px);
    padding: 10px;
    border: none;
    border-top: 1px solid #ccc;*/
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 20px;
    margin-right: 10px;
    outline: none;
    font-size: 14px;
    max-height: 130px; /* Set maximum height */
    overflow-y: auto;
}

#secure-chat-widget #attachment-button {
    background: none;
    border: none;
    margin-right: 10px;
    cursor: pointer;
}

#secure-chat-widget #send {
    /*width: 50px;
    border: none;
    background-color: #9f78ff;
    color: white;
    cursor: pointer;*/
    width: 40px;
    height: 40px;
    border: none;
    background-color: #9f78ff;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

#secure-chat-widget #send svg {
    width: 24px;
    height: 24px;
    fill: white;
}

#secure-chat-widget #chat-input {
    display: flex;
    align-items: center;
    border-top: 1px solid #ccc;
    padding: 10px;
}

#secure-chat-button {
    z-index: 2147483000;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: #9f78ff;
    color: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
}

#secure-chat-widget #tab-bar {
    display: flex;
    justify-content: space-around;
    border-top: 1px solid #ccc;
}

#secure-chat-widget .tab-button {
    flex-grow: 1;
    padding: 10px;
    text-align: center;
    cursor: pointer;
}

#secure-chat-widget .tab-button svg {
    display: block;
    margin: 0 auto 5px;
}

#secure-chat-widget #chat-home, #chat-messages, #chat-help {
    display: none;
}

#secure-chat-widget #chat-home.active, #chat-messages.active, #chat-help.active {
    display: block;
}

#secure-chat-widget #home-content {
    text-align: center;
    padding:15px;
    height: 400px;
}


#secure-chat-widget #home-content h1 {
    font-size: 20px;
}

#secure-chat-widget #home-content h2 {
    font-size: 16px;
    color: #555;
}
#secure-chat-widget #help-content {
    padding:15px;
    max-height: 400px;
    overflow-y: scroll;
}
#secure-chat-widget #help-content h1, #secure-chat-widget #help-content h2, #secure-chat-widget #help-content p {
    color:#000000;
}
#secure-chat-widget #help-content h1 {
    font-size: 2em;
    margin-bottom: 5px;
}
#secure-chat-widget #help-content h2 {
    font-size: 16px;
    margin-bottom: 15px;
}
#secure-chat-widget #help-content h2 a:hover {
    color:#9f78ff}

#secure-chat-widget .email-prompt form.closed {
    padding: 20px 10px 20px 10px;
    background: #F8F8F8;
    box-shadow: rgba(0, 0, 0, 0.16) 0px 5px 40px;
    border-radius: 16px;
}

#secure-chat-widget .email-prompt {
    border-top: 1px solid #ccc;
    padding: 10px;
}

#secure-chat-widget .email-prompt form.initial {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

#secure-chat-widget .email-prompt ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

#secure-chat-widget .email-prompt input[type="text"], #secure-chat-widget .email-prompt textarea {
    width: calc(100% - 15px); /* Adjust width to compensate for submit button */
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-right: 10px;
    font-size: 16px;
    outline: none!important;
    margin-bottom: 10px;
    font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

#secure-chat-widget .email-prompt form.closed input[type="text"] {
    width: calc(44% - 15px);
    float:left;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-right: 10px;
    font-size: 16px;
    outline: none!important;
    margin-bottom: 10px;
    font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}
#secure-chat-widget .email-prompt form.closed textarea {
    width: calc(100% - 20px);
    float:none;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-right: 10px;
    font-size: 16px;
    outline: none!important;
    margin-bottom: 10px;
    font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}
#secure-chat-widget .email-prompt textarea {

}

#secure-chat-widget .email-prompt select {
    margin-bottom:10px;
}
#secure-chat-widget .email-prompt button[type="submit"] {
    background-color: #9f78ff;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 16px;
}

#secure-chat-widget .email-prompt button[type="submit"]:hover {
    opacity: 0.6;
}

#secure-chat-widget .email-prompt h2 {
    font-size:25px;
    color:#000000;
    clear:both;
}

#secure-chat-widget .email-prompt label {
    display:none;
}

#secure-chat-widget .email-prompt form.initial {
    display: flex;
    align-items: stretch;
    justify-content: center;
    text-align: center;
    gap: 0;
}

#secure-chat-widget .email-prompt form.initial ul {
    display: flex;
    align-items: stretch;
    width: 100%;
    margin: 0;
    padding: 0;
}

#secure-chat-widget .email-prompt form.initial li {
    display: flex;
    flex: 1;
}

#secure-chat-widget .email-prompt form.initial input[type="text"],
#secure-chat-widget .email-prompt form.initial input[type="email"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ccc;
    border-radius: 8px 0 0 8px;
    margin: 0;
    font-size: 16px;
    outline: none;
    border-right: none;
    font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    height: 48px;
    box-sizing: border-box;
}

#secure-chat-widget .email-prompt form.initial button[type="submit"] {
    background-color: #9f78ff;
    color: white;
    border: none;
    border-radius: 0 8px 8px 0;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 16px;
    height: 48px;
    min-width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    margin: 0;
}

#secure-chat-widget .email-prompt form.initial input[type="text"]:focus,
#secure-chat-widget .email-prompt form.initial input[type="email"]:focus {
    border-color: #9f78ff;
    box-shadow: 0 0 0 1px #9f78ff;
}

#secure-chat-widget .email-prompt form.initial button[type="submit"]:hover {
    opacity: 0.9;
}

#secure-chat-widget #available-agents {
    margin-top:10px;
}

#secure-chat-widget .agent-profile-photo {
    width: 40px; /* Adjust the size as needed */
    height: 40px;
    border-radius: 50%;
    border: 2px solid white; /* Adds a border around the images */
    margin-left: -15px; /* Controls the overlap, increase the negative value for more overlap */
    z-index: 1; /* Ensures proper stacking order */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Optional: Adds a slight shadow */
    position: relative; /* Required for z-index to work */
}

#secure-chat-widget .agent-profile-photo:first-child {
    margin-left: 0; /* No margin on the first item */
    z-index: 2; /* Higher z-index for the first image to be on top */
}

#secure-chat-widget .agent-profile-photo:nth-child(2) {
    z-index: 3; /* Higher z-index for the second image to be on top */
}

#secure-chat-widget #email-prompt-message {
    padding: 10px;
    margin-bottom: 10px;
}

#secure-chat-widget #chat-message-tab-button {
    display: flex;
    justify-content:
    space-between;
    align-items: center;
    cursor: pointer;
    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;
    text-align: left;
    padding:20px;
    margin-bottom: 100px;
}
#secure-chat-widget #chat-message-tab-button .message-wrapper .main-title {
    font-size: 16px; font-weight: bold;

}
#secure-chat-widget #chat-message-tab-button .message-wrapper .sub-title{
    font-size: 14px; color: gray;
}

#secure-chat-widget .message-click svg path {
    color: #9f78ff;
}

#secure-chat-widget .tab-button.active svg path, #secure-chat-widget .tab-button.active span {
color: #9f78ff;
}

#secure-chat-widget .typing-container {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    justify-content: flex-start;
}

#secure-chat-widget .typing-container .agent-profile-image {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin: 0 10px;
}

#secure-chat-widget .typing-bubble {
    background-color: rgb(242, 242, 242);
    padding: 15px 20px;
    border-radius: 18px;
    max-width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#secure-chat-widget .typing-dots {
    display: flex;
    gap: 4px;
}

#secure-chat-widget .typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #999;
    animation: typing-animation 1.4s infinite ease-in-out;
}

#secure-chat-widget .typing-dot:nth-child(1) {
    animation-delay: 0ms;
}

#secure-chat-widget .typing-dot:nth-child(2) {
    animation-delay: 200ms;
}

#secure-chat-widget .typing-dot:nth-child(3) {
    animation-delay: 400ms;
}

@keyframes typing-animation {
    0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.4;
    }
    30% {
        transform: translateY(-15px);
        opacity: 1;
    }
}

#secure-chat-widget .time-slots-container {
    margin: 10px 0;
}

#secure-chat-widget .time-slots-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 10px;
}

#secure-chat-widget .time-slot-btn {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-weight: 500;
}

#secure-chat-widget .time-slot-btn:hover {
    background: linear-gradient(135deg, #9f78ff 0%, #9f78ffaa 100%);
    color: white;
    border-color: #9f78ff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#secure-chat-widget .time-slot-btn:active {
    transform: translateY(0);
}

@media (max-width: 767px) {
    #secure-chat-widget {
        bottom: 0px;
        right: 0px;
        border-radius: 0px;
    }
    #secure-chat-widget #chat-header-close {
        top: -30px;
    }
    #secure-chat-widget .email-prompt input[type="text"], #secure-chat-widget .email-prompt textarea, #secure-chat-widget .email-prompt form.closed input[type="text"] {
        width: 100%;
    }

}

