body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    overflow: hidden;
    /* Prevent main page from scrolling */
    height: 100vh;
}

a {
    color: rgb(59 130 246);
}

a:hover {
    color: #0056b3;
}

header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 20px 20px 10;
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    width: 100%;
    height: 50px;
    z-index: 1000;
    /* Ensure the header is on top */
    box-sizing: border-box;
}

.hidden {
    display: none !important;
}

.m-0 {
    margin: 0 !important;
}

.header-container {
    display: flex;
    align-items: center;
}

.logo img {
    height: 30px;
    margin-right: 10px;
}

.title {
    font-size: 20px;
    font-weight: bold;
}

.contact-icon {
    position: absolute;
    right: 60px;
}

.contact-icon img {
    height: 28px;
    width: 28px;
}

.instagram-icon {
    position: absolute;
    right: 20px;
}

.instagram-icon img {
    height: 30px;
    width: 30px;
}

#chat-container {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    flex-grow: 1;
    background-color: #ffffff;
    overflow: hidden;
    /* Ensure no overflow */
    margin-top: 50px; /* Space for the fixed header */
    margin-bottom: 65px;
    /* Space for the fixed input container */
    width: 100%;
    /* Center align */
    /* border: solid 3px blue; */
    /* max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;     */
}

#chat-box {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px 20px 20px 20px;
    display: flex;
    flex-direction: column;
    -webkit-overflow-scrolling: touch;
    /* Enable momentum scrolling on iOS */
    /* Adjust height to fit within viewport */
    /* border: solid 3px red; */
}

.bot-message,
.user-message {
    display: inline-block;
    margin: 10px 0;
    padding: 0 15px;
    border-radius: .75rem;
    max-width: 70%;
    word-wrap: break-word;
    line-height: 1.5;
    /* box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); */
    line-height: 1.7;
    font-size: 15px;
}

.bot-message p,
.user-message p {
    margin: .5em 0;
}

.bot-message {
    /* background-color: #f1f1f1; */
    background-color: #fff;
    align-self: flex-start;
    box-shadow: none;
    padding: 0 10px;
}

.user-message {
    background-color: #b9dfa4;
    color: #000;
    align-self: flex-end;
    border-radius: .75rem;
}

#input-container {
    display: flex;
    padding: 10px;
    background-color: #ffffff;
    width: 100%;
    box-sizing: border-box;
    border-top: 1px solid #dee2e6;
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 1000;
    /* Ensure the input container is on top */
}

#input-wrapper {
    display: flex;
    max-width: 1000px;
    /* Maximum width for desktop */
    margin-left: auto;
    /* Center align */
    margin-right: auto;
    /* Center align */
    width: 100%;
}

#user-input {
    flex-grow: 1;
    border: 1px solid #dee2e6;
    border-radius: .75rem;
    padding: .75rem;
    margin-right: 10px;
    font-size: 16px;
    /* Prevent zoom on input */
}

#send-btn {
    border: none;
    background-color: #b9dfa4;
    color: #000;
    border-radius: .75rem;
    padding: .75rem 20px;
    font-size: 16px;
    /* Prevent zoom on input */
    cursor: pointer;
}

#send-btn:hover {
    background-color: #b2df9a;
}

/* Typing Indicator Styles */
.tiblock {
    align-items: center;
    display: flex;
    height: 17px;
}

.ticontainer {
    padding: 10px 0;
}

.ticontainer .tidot {
    background-color: #90949c;
}

.tidot {
    -webkit-animation: mercuryTypingAnimation 1.5s infinite ease-in-out;
    border-radius: 5px;
    display: inline-block;
    height: 10px;
    margin-right: 5px;
    width: 10px;
}

.mr-0 {
    margin-right: 0;
}

@-webkit-keyframes mercuryTypingAnimation {
    0% {
        -webkit-transform: translateY(0px);
    }

    28% {
        -webkit-transform: translateY(-5px);
    }

    44% {
        -webkit-transform: translateY(0px);
    }
}

.tidot:nth-child(1) {
    -webkit-animation-delay: 200ms;
}

.tidot:nth-child(2) {
    -webkit-animation-delay: 300ms;
}

.tidot:nth-child(3) {
    -webkit-animation-delay: 400ms;
}

#conversation-starters {
    margin-bottom: 20px;            
}

.starter-bubble {
    font-size: 14px;
    display: inline-block;
    padding: 10px 20px;
    margin: 5px;
    border: 1px solid #ccc;
    border-radius: 20px;
    background-color: #f9f9f9;
    cursor: pointer;
    transition: background-color 0.3s;
}

.starter-bubble:hover {
    background-color: #eee;
}

#show-more.starter-bubble {
    border: 1px solid green;
    background-color: rgba(144, 238, 144, 0.3); /* light green with 0.3 opacity */
}

#show-more.starter-bubble:hover {
    background-color: rgba(144, 238, 144, 0.5); /* a shade of light green for hover with 0.5 opacity */
}

.product-list {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    margin: 15px 0;
    padding: 0 0 15px;
    min-height: 410px;
}

.product {
    border: 1px solid #ddd;
    margin: 10px;
    padding: 10px;
    display: inline-block;
    width: 150px;
    min-width: 150px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    white-space: normal;
}

.ranking {
    font-weight: bold;
    color: #ff9900;
    font-size: 18px;
}

.photo img {
    max-width: 100%;
    height: auto;
}

.details {
    margin-top: 10px;
}

.product-title {
    font-size: 13px;
    margin-bottom: 5px;
    line-height: 1.5
}

.price {
    color: #b12704;
    font-size: 13px;
    line-height: 1.5
}

/* Modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9998;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;    
}

.modal {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    text-align: center;
    z-index: 9999;
}

.modal h1 {
    font-size: 2.5em;
    margin-block-start: 0;
    margin-block-end: 0.35em;
}

.modal h2 {
    font-size: 1.25em;
    margin-block-start: .95em;
    margin-block-end: .1em;
}

.modal h3 {
    margin-block-start: 0;
    color: #555;
}

.modal p {
    margin-block-start: 1.9em;
    margin-block-end: 0;
    font-size: 15px;
}

.modal .disclaimer {
    font-size: 12px;
    width: 100%;
    margin: 20px auto 10px;
    display: block;
    max-width: 300px;
}

.modal img {
    max-width: 100%;
    border-radius: 50%;
    /* This makes the image a circle */
    width: 150px;
    /* Adjust the size as needed */
    height: 150px;
    /* Ensures the image is a circle */
    margin-top: 10px;
}

#name-input {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
    border-radius: .75rem;
    padding: .75rem;
    font-size: 16px;
    /* Prevent zoom on input */
    box-sizing: border-box;
}

#name-submit {
    border: none;
    background-color: #007bff;
    color: white;
    border-radius: .75rem;
    padding: .75rem 20px;
    font-size: 16px;
    /* Prevent zoom on input */
    cursor: pointer;
    width: 100%;
}

#name-submit:hover {
    background-color: #0056b3;
}

.cookie-banner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
    /* Initially hidden */
}

.cookie-banner {
    position: fixed;
    bottom: 0;
    width: 100%;
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-sizing: border-box;
    font-size: 15px;
}

.cookie-banner p {
    text-align: left;
    padding-right: 15px;
}

.cookie-button {
    border: none;
    background-color: #007bff;
    color: white;
    border-radius: .75rem;
    padding: .75rem 20px;
    font-size: 16px;
    /* Prevent zoom on input */
    cursor: pointer;
}

.cookie-button:hover {
    background-color: #0056b3;
}

/* Ensure the input container is always visible on mobile */
@media (max-width: 600px) {
    #chat-container {
        margin-bottom: 65px;
        /* Space for the fixed header */
    }

    #chat-box {
        padding-bottom: 20px;
        /* Space for the input container */
        padding-left: 15px;
        padding-right: 15px;
        height: 100vh;
    }

    .starter-bubble {
        margin: 5px;
        padding: 6px 12px;
    }

    .mobile-break {
        display: block;
    }

    .cookie-banner {
        font-size: 12px;
    }

    .bot-message {
        max-width: 85%;
    }


    .contact-icon {
        position: absolute;
        right: 35px;
    }

    .contact-icon img {
        height: 18px;
        width: 18px;
    }

    .instagram-icon {
        position: absolute;
        right: 10px;
    }

    .instagram-icon img {
        height: 20px;
        width: 20px;
    }          
}

/* Avoid Chrome to see Safari hack */
@supports (-webkit-touch-callout: none) {
    body {
        /* The hack for Safari */
        height: -webkit-fill-available;
    }
}

/* Styles for the second modal's form fields */
#info-modal .modal {
    max-width: 350px;
    width: 100%;
}

#info-modal select,
#info-modal input[type="text"],
#info-modal input[type="email"],
#info-modal button {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
    border-radius: .75rem;
    font-size: 16px;
    box-sizing: border-box;
}

#info-modal input[type="email"] {
    margin-bottom: 10px;
}

#info-modal small {
    display: block;
    margin-bottom: 20px;
    color: #555;
}

#info-modal button {
    background-color: #007bff;
    color: white;
    cursor: pointer;
}

#info-modal button:hover {
    background-color: #0056b3;
}
