/* General  */

body {
    background-color: transparent;
    font-family: Helvetica !important;
}

ul {
    padding-left: 20px;
}

li {
    margin-top: .5em;
    margin-bottom: .5em;
}

/* Add viewport meta tag properties to prevent zooming on mobile */
@-ms-viewport {
    width: device-width;
    user-scalable: no;
    zoom: 1;
}

@-webkit-viewport {
    width: device-width;
    user-scalable: no;
    zoom: 1;
}

@viewport {
    width: device-width;
    user-scalable: no;
    zoom: 1;
}

/* Mobile specific overrides to prevent zooming and maintain full screen */
@media only screen and (max-device-width: 480px) {
    input[type="text"],
    input[type="email"],
    textarea,
    select,
    .form-control {
        font-size: 16px !important; /* Prevents iOS zoom on focus */
    }
    
    /* Mobile Safari dynamic viewport handling */
    .chat-container {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        height: 100vh !important; /* Always use viewport height */
        width: 100vw !important; /* Always use viewport width */
        display: flex;
        flex-direction: column;
        max-height: 100vh;
        z-index: 9999;
        background-color: #eef1f4;
        border-radius: 0;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
        transition: height 0.1s ease-out;
    }
    
    /* Fix middle section to take available space */
    .middle {
        flex: 1 1 auto;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    }
    
    /* Ensure the header and input area don't resize */
    .top, .chat-window-footer {
        flex: 0 0 auto;
    }
}

p {
    font-size: 15px;
}

a,
a:hover,
a:focus,
a:active {
    text-decoration: underline;
    color: grey;
    background-color: transparent;
}


.chat-container {
    position: fixed;
    
    left: 20px;
    
    bottom: 40px;
    display: none;
    flex-direction: column;
    z-index: 9999;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    background-color: #eef1f4;
    border-radius: 20px;
    font-weight: lighter;

    
    /* Dynamically set the size based on widget_size */
    
    width: 420px;
    height: 650px;
    /* Responsive height adjustments for medium screens */
    @media (max-height: 750px) {
        height: 85vh;
        max-height: 650px;
    }
    
    
}

@media only screen and (max-device-width: 480px) {
    /* adjust this to your liking for iPhone devices */
    .chat-container {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        top: 0;
        height: calc(100% - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        width: 100%;
        display: none;
        flex-direction: column;
        z-index: 9999;
        background-color: #eef1f4;
        border-radius: 0;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    }
    .top {
        border-radius: 0 !important;
    }
}

/* Circle  */

.img-circle {
    width: 100%;
    height: auto;
    display: flex;
}

#close-chat-message-bubble {
    position: absolute;
    top: -7px;
    right: -7px;
    width: 20px;
    height: 20px;
    background-color: #eaeaeae5;
    border-radius: 50%;
    border: none;
    cursor: pointer;
}

#close-chat-message-bubble span {
    display: inline-block;
    color: black;
    font-size: 15px;
    font-weight: normal;
}

#chat {
    position: fixed;
    right: 30px;
    bottom: 30px;
}

#chat-message-bubble {
    max-width: 250px;
    height: auto;
    background-color: white;
    border-radius: 20px;
    position: fixed;
    
        left: 20px;
    
    bottom: 90px;
    padding: 10px;
    border: none;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

#chat-message-bubble .close-btn {
    color: grey;
    font-size: 13px;
    font-weight: thin;
}

.svg-bubble-close {
    stroke: #5a5a5a;
    fill: none;
}

#chat-message-bubble p {
    margin: 10px;
}

.hidden {
    display: none;
}

#chat-circle {
    width: 60px;
    height: 60px;
    background-color: #00535a;
    border: 0px solid #ffffff;
    border-radius: 50%;
    position: fixed;
    
        left: 20px;
        right: auto;
    
    bottom: 20px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    padding: 10px;
}

/* Top */

.header-logo {
    margin-left: 20px;
    align-items: left;
    margin-right: 10px;
}

.header-logo img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #00535a;
}

.header-text {
    text-align: left;
    margin-left: 10px;
}

.top {
    position: relative;
    top: 0;
    color: #ffffff;
    background-color: #00535a;
    cursor: pointer;
    padding: 10px;
    border-bottom: 0.1px solid #eeeaea;
    display: flex;
    border-radius: 20px 20px 0px 0px;
}

.close-btn,
.close-btn:hover,
.close-btn:focus {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: calc(15px + (15px * 0.3));
    cursor: pointer;
    opacity: 100%;
    outline: none;
}

.refresh-btn,
.refresh-btn:hover,
.refresh-btn:focus {
    position: absolute;
    right: 35px;
    top: 17px;
    font-size: calc(15px + (15px * 0.2));
    cursor: pointer;
    opacity: 100%;
    outline: none;
    margin-right: 7px;
}

.top h5 {
    text-align: left;
    font-size: calc(15px + (15px * 0.1));
    margin-bottom: 0;
    font-weight: lighter;
}

.top p {
    text-align: left;
    margin-bottom: 0;
    margin-top: 0;
    font-size: calc(15px - (15px * 0.2));
    font-weight: normal;
}

/* Bottom  */

.bottom {
    height: 60px;
    position: sticky;
    bottom: 0;
}

.chat-window-footer {
    padding: 10px 20px;
    display: block;
    align-items: center;
}

.chat-window-footer .input-group {
    align-items: center;
    width: 100%;
    flex-wrap: nowrap;
    margin-left: 0;
    padding-left: 0;
}

.chat-container .input-group #user-input {
    background-color: #ffffff;
    font-weight: lighter;
    border-radius: 20px;
    border: none;
    outline: none;
    box-shadow: none;
    color: #002a32;
    flex-grow: 1;
    margin-right: 10px;
    padding: 12px 16px;
    width: calc(100% - 50px);
}

.svg-refresh {
    fill: #ffffff;
}

.svg-close {
    stroke: #ffffff;
    fill: none;
}

.svg-send {
    stroke: #ffffff;
    fill: none;
}

.chat-links {
    color: #00686e;
}

.chat-links:hover,
.chat-links:active,
.chat-links:focus {
    color: #002a32;
}

.chat-container .form-control,
.chat-container .form-control:hover,
.chat-container .form-control:focus,
.chat-container .form-control:active {
    font-size: 15px;
    border: 2px solid #ffffff;
    outline: none;
    border-radius: 20px;
    background-color: transparent;
    box-shadow: none;
    color: #002a32;
}

textarea.form-control,
textarea.form-control:hover,
textarea.form-control:focus,
textarea.form-control:active {
    height: 48px; /* Allow the height to adjust */
    min-height: 48px; /* Set a minimum height for the field */
    max-height: 280px; /* Limit the maximum height to approximately 5 lines */
    resize: none; /* Disable manual resizing */
    overflow-y: auto; /* Enable scrolling if the content exceeds max-height */ 
    padding: 12px 24px !important;
}

.powered-by {
    text-align: center;
    font-size: calc(15px - (15px * 0.3));
    color: grey;
    margin: 10px 0px;
}

/* Middle  */

.middle {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px 20px 10px 20px;
}

.chatbot-buttons {
    padding-top: 3px;
    text-align: left;
}

.button-suggestion,
.button-suggestion:focus,
.button-suggestion:active {
    border: 0;
    padding: 7px 10px;
    border-radius: 20px;
    background-color: #ffffff80;
    color: #00535a;
    font-size: calc(15px - (15px * 0.2));
    margin: 3px;
    box-shadow: none;
}

.button-suggestion:hover {
    background-color: #ffffff;
    border: 0;
    color: #00535a;
}

.collect-email-button {
    padding: 8px 12px;
    border-radius: 20px;
    border: none;
    background-color: #00535a;
    color: #ffffff;
    font-size: calc(15px - (15px * 0.2));
    margin: 3px;
    box-shadow: none;
    margin-top: 10px; 
}

.collect-email-button:hover {
    filter: brightness(1.1) !important;
    color: #ffffff;
}

.url-buttons {
    white-space: nowrap;
    overflow-x: scroll;
    padding: 5px 0px;
}

.url-suggestion,
.url-suggestion:focus,
.url-suggestion:active {
    padding: 5px 5px;
    border-radius: 20px;
    background-color: #00535a;
    border: 1px solid #eaecf0;
    color: gray;
    font-size: calc(15px - (15px * 0.35));
    margin: 3px;
    box-shadow: none;
}

.url-suggestion:hover {
    padding: 5px 5px;
    border-radius: 20px;
    background-color: #F9F9F9;
    border: 1px solid transparent;
    margin: 3px;
    color: gray;
    
}

.chatbot-is-typing-block {
    font-size: 15px;
    border-radius: 20px 20px 20px 0px;
    background-color: #ffffff;
    color: #000000;
    padding: 10px;
    margin-top: 10px;
    text-align: left;
    max-width: 80%;
}

.chatbot-is-typing span {
        width: 6px;
        height: 6px;
        background-color: #000000;
        display: inline-block;
        /* margin: 1px; */
        border-radius: 50%;

        &:nth-child(1) {
            animation: bounce 1s infinite;
        }

        &:nth-child(2) {
            animation: bounce 1s infinite .2s;
        }

        &:nth-child(3) {
            animation: bounce 1s infinite .4s;
        }
}

@keyframes bounce {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(8px);
    }

    100% {
        transform: translateY(0px);
    }
}


/* User messages  */

.user-message {
    font-size: 15px;
    border-radius: 20px 20px 0px 20px;
    background-color: #00535a;
    color: #ffffff;
    padding: 10px;
    margin-top: 10px;
    text-align: right;
    margin-left: auto !important;
    max-width: 80%;
    word-break: break-word;
}

.user-row {
    margin: 0;
}

/* Chatbot messages */

.chatbot-message {
    font-size: 15px;
    border-radius: 20px 20px 20px 0px;
    background-color: #ffffff;
    color: #000000;
    padding: 10px;
    margin-top: 10px;
    text-align: left;
    max-width: 80%;
    word-break: break-word;
}


/* Carousel styles */

/* css for cards within the cards carousels */
.cardsLine {
    flex-grow: 1;
    display: flex;
    gap: 16px;
    overflow-x: scroll;
    overflow-y: hidden;
    transition: width 0.5s ease;
    -webkit-overflow-scrolling: touch;
    margin: 10px 0px;
}

.mainCard {
    background-color: #ffffff;
    color: #000000;
    border-radius: 20px;
    display: flex;
    width: 242px;
    flex-shrink: 0;
    flex-direction: column;
}

.cardTop {
    display: flex;
    padding: 15px 15px 5px 15px;
    flex: 1;
}

.cardBottom {
    display: flex;
    -webkit-box-align: center;
    align-items: center;
    -webkit-box-pack: center;
    justify-content: center;
    padding: 0px 10px 10px 10px;
    line-height: 1;
    width: 100%;
    color: #000000;
    cursor: pointer;
    flex-shrink: 0;
}

.cardBottom button {
    width: 100%;
    height: 100%;
    border: 1px solid #000000;
    background-color: transparent;
    border-radius: 10px;
    padding: 10px;
    font-size: 12px;
}

.learnMoreButton a {
    color: #000000; 
}

.learnMoreButton:hover a {
    color: #000000; 
}

.cardBottom button:hover {
    border: 1px solid #000000;
    background-color: #00535a; 
    color: #ffffff;
}

.cardInfo {
    display: flex;
    flex-direction: column;
    -webkit-box-flex: 1;
    flex-grow: 1;
}

.cardTitle {
    line-height: normal;
    color: #000000;
    font-weight: bold;
    font-size: 15px;
    word-break: break-word;
    /* Show 2 lines max */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    -webkit-line-clamp: 1;
}


.cardUrl {
    font-size: 10px;
    color: #000000;
    line-height: 1.54;
    margin-top: 4px;
    display: -webkit-box;
    max-height: 40px;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    -webkit-line-clamp: 1;
}

.cardDescription {
    font-size: 13px;
    color: #000000;
    line-height: 1.54;
    margin-top: 4px;
    display: -webkit-box;
    max-height: 40px;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    -webkit-line-clamp: 3;
}

#collect-email {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    background-color: #ffffff; 
    color: #000000;
    border-radius: 20px;
    padding: 12px 12px 12px 12px;
    width: 80%;
    margin-top: 10px;
    box-shadow: 0 2px 16px 0 rgba(0,0,0,0.04);
    margin-left: 0;
    margin-right: auto;
}

#collect-email input {
    background-color: transparent;
    color: #000000;
    width: 100%; /* Make inputs take full width of the container */
    margin-bottom: 10px; /* Add margin between the email and text inputs */
}

#collect-email label {
    font-size: calc(15px - 3px);
    font-weight: 300;
    margin-left: 8px;
    color: #000000;
    letter-spacing: 0.01em;
}

.input-error {
  border: 1.5px solid #e74c3c !important;
  background-color: #fff6f6;
}

#form-error-messages {
    width: 100%;
}

#form-error-messages span {
    font-size: calc(15px - 3px);
    color: red;
    display: none;
    font-weight: 300;
    margin-left: 8px;
}

/* Contact form styles */
input[type="text"],
input[type="password"],
input[type="number"],
input[type="color"],
input[type="email"],
textarea {
  color: #616161;
  font-weight: lighter;
  line-height: 1.2em;
  font-family: sans-serif;
  border-radius: 20px;
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
  border: 1px solid #ccc;
}

.send-btn {
    background-color: #00535a;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    border: none;
}

.send-btn:hover {
    background-color: #00535a;
    filter: brightness(1.1);
}
.send-btn:focus {
    box-shadow: none;
}

#collect-email span {
    font-size: calc(15px - (15px * 0.2)); /* Make warning text smaller */
    display: block !important; /* Ensure span is a block element for margin to work */
}

#collect-email input,
#collect-email textarea {
    background-color: #eef1f4;
    color: #002a32;
    border: 1.5px solid #ffffff;
    border-radius: 20px;
    font-size: 15px;
    padding: 10px 16px;
    outline: none;
    transition: border 0.2s;
    width: 100%;
    box-sizing: border-box;
}

#collect-email input:focus,
#collect-email textarea:focus {
    border: 1.5px solid #ffffff;
}

#collect-email textarea {
    min-height: 84px; 
    max-height: 220px;
    resize: none;
}

#collect-email input::placeholder,
#collect-email textarea::placeholder {
    color: #b0b0b0;
    opacity: 1;
    font-weight: 400;
}

#collect-email .form-group {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 0px;
}