html {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    height: 100%;
}

*,
*::before,
*::after {
    -webkit-box-sizing: inherit;
    -moz-box-sizing: inherit;
    box-sizing: inherit;
}

:root {
    /* elements */
    --rad: 20px;
    --rad-sm: 3px;
    --background: var(--mdb-gray-50);
    --text: var(--mdb-gray-900);
    --link: var(--mdb-primary);
    --user-bubble: var(--mdb-primary);
    --assistant-bubble: var(--mdb-gray-300);
    --chip-checked: var(--mdb-primary);
    --chip-unchecked: var(--mdb-gray-300);
    --table-header: var(--blue-gray-500);
    --table-row-odd: var(--blue-gray-100);
    --table-row-even: var(--blue-gray-50);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif,
        "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    padding-bottom: 1em;
    /* prevent left to right scrollbar */
    overflow-x: hidden;
    /* always show vertical scrollbar to prevent background jump */
    overflow-y: scroll;
    transition: background-image 0.2s ease-in-out;
}

#dark-overlay {
    /* background: rgb(0 0 0 / 25%); */
    height: 100vh;
    width: 100vw;
    z-index: -1;
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
}

h1,
h2,
h3,
h4,
h5,
h6,
.btn,
.form-label,
#chat-tabs .nav-tabs .nav-link,
.floating-container .subtext {
    font-family: Raleway, Verdana, Helvetica, Arial, sans-serif;
}

body > section {
    max-width: min(1220px, 90vw);
    margin: 2em auto;
    background: var(--background);
    padding: 0;
    border-radius: 26px;
    box-shadow: 1px 4px 8px #00000030;
}

section#main-container {
    min-height: 650px;
}

section#footer {
    padding: 2em;
    text-align: center;
}

body[data-direction="rtl"] button svg {
    transform: scaleX(-1);
}

hr {
    border: 1px solid #999;
}

a {
    color: var(--link);
    text-decoration: none;
}

a:hover {
    filter: brightness(1.1);
}

.logo-link {
    cursor: pointer;
    height: 70px;
    width: auto;
}

#jini-logo-link {
    height: 140px;
    width: auto;
}

@media screen and (max-width: 640px) {
    img#pm-logo-link {
        max-width: 180px;
        height: auto;
    }
}

.logo-link:hover {
    filter: brightness(1.1);
}

.h1,
.h2,
.h3,
.h4,
.h5,
.h6,
h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 1.25rem;
    margin-bottom: 1.5rem;
}

.h1,
h1 {
    font-size: min(calc(1.075rem + 1.5vw), 2.2rem);
}

.h2,
h2 {
    font-size: min(calc(1.025rem + 0.9vw), 1.7rem);
}

.h3,
h3 {
    font-size: min(calc(1rem + 0.6vw), 1.45rem);
}

.h4,
h4 {
    font-size: min(calc(0.975rem + 0.3vw), 1.2rem);
}

.h5,
h5 {
    font-size: 0.95rem;
}

.h6,
h6 {
    font-size: 0.7rem;
}

.main-heading {
    font-weight: 700;
    color: var(--mdb-primary);
    margin-bottom: 0.75em;
}

#chat {
    margin: auto;
}

#chat p {
    margin: 0;
}

#chat p ~ p {
    margin-top: 1em;
}

div#chat {
    margin: 0px auto;
    padding-top: 2px;
    padding-bottom: 22px;
}

.message-wrapper {
    display: flex;
    align-items: end;
    gap: 0.5em;
    margin-top: 1em;
}

body[data-direction="rtl"] div#chat {
    direction: rtl;
}

body:not([data-direction="rtl"]) .message-wrapper.user {
    flex-direction: row-reverse;
}

body[data-direction="rtl"] .message-wrapper.user {
    flex-direction: row-reverse;
}

.message-bubble {
    padding: 1.2rem;
    border-radius: 6px;
    margin: 4px 0;
    width: 65%;
    min-width: min(400px, 80vw);
}

.message-bubble.assistant {
    background: var(--assistant-bubble);
    color: var(--text);
    border-radius: var(--rad) var(--rad) var(--rad) var(--rad-sm);
    margin-right: auto; /* align left */
}

body[data-direction="rtl"] .message-bubble.assistant {
    border-radius: var(--rad) var(--rad) var(--rad-sm) var(--rad);
    /* align right */
    margin-right: 0;
}

.message-bubble.user {
    background: var(--user-bubble);
    color: white;
    border-radius: var(--rad) var(--rad) var(--rad-sm) var(--rad);
    margin-left: auto; /* align right */
}

body[data-direction="rtl"] .message-bubble.user {
    border-radius: var(--rad) var(--rad) var(--rad) var(--rad-sm);
    /* align left */
    margin-left: 0;
}

.message-bubble > :first-child {
    margin-top: 0;
}

.btn-no-outline-primary {
    --mdb-btn-bg: transparent;
    --mdb-btn-color: var(--mdb-primary);
    --mdb-btn-hover-bg: transparent;
    --mdb-btn-hover-color: var(--mdb-primary-600);
    --mdb-btn-focus-bg: transparent;
    --mdb-btn-focus-color: var(--mdb-primary-600);
    --mdb-btn-active-bg: transparent;
    --mdb-btn-active-color: var(--mdb-primary-700);
    --mdb-btn-border-color: var(--mdb-primary);
    --mdb-btn-focus-border-color: var(--mdb-primary-600);
    --mdb-btn-hover-border-color: var(--mdb-primary-600);
    border-color: var(--mdb-btn-border-color);
    box-shadow: none;
}

.btn-no-outline-primary:first-child:hover,
.btn-no-outline-primary:focus-visible,
.btn-no-outline-primary:hover,
:not(.btn-check) + .btn-no-outline-primary:hover {
    border-color: var(--mdb-btn-hover-border-color);
    box-shadow: none;
    background-color: var(--mdb-btn-color);
    color: white;
}

.header-buttons.hidden {
    display: none;
}

.new-chat-button {
    white-space: nowrap;
    font-size: 1rem;
}

.phone-number {
    white-space: nowrap;
    font-size: 1.2rem;
    opacity: 1;
    transition: opacity 0.7s cubic-bezier(0.25, 1, 0.5, 1);
}

.phone-number.hidden {
    opacity: 0;
}

.typing-bubble.message-bubble {
    width: min(calc(1200px - 300px), calc(90vw - 300px));
    padding-left: 1.5em;
    padding-right: 0.75em;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 58px;
    margin-right: 0;
    transition: all 0.7s cubic-bezier(0.25, 1, 0.5, 1);
}

.typing-bubble > img {
    width: 100%;
}

#welcome-bubble.message-bubble.hidden {
    width: 0;
    min-width: 0;
    padding: 0;
    opacity: 0;
}

#followup-bubble-container {
    display: flex;
    align-items: end;
    justify-content: center;
    gap: 0.5em;
    margin: 1em auto;
    transition: 0.3s ease-out;
    height: 66px;
}

#followup-bubble-container.hidden {
    opacity: 0;
    height: 0;
    overflow: hidden;
}

#followup-bubble {
    justify-content: flex-start;
}

#followup-bubble > img {
    max-width: 460px;
}

@media only screen and (max-width: 1080px) {
    #welcome-bubble.message-bubble,
    #followup-bubble-container {
        display: none;
    }

    .phone-number.hidden {
        opacity: 1;
    }
}

/* cta buttons below chat */
.buttons {
    display: flex;
    gap: 1em;
    justify-content: center;
    width: 70%;
    min-width: min(400px, 100%);
    margin-top: 1em;
    flex-wrap: wrap;
}

/* link underline effect */
div#chat .message-wrapper.done a,
#footer a {
    position: relative;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
}
div#chat .message-wrapper.done a::before,
#footer a:not(.no-underline)::before {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 1px;
    background-color: var(--link);
    transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
@media (hover: hover) and (pointer: fine) {
    div#chat .message-wrapper.done a:hover::before,
    #footer a:hover::before {
        left: 0;
        right: auto;
        width: 100%;
    }
}

.copy-button {
    float: right;
    border: 0px;
    background: transparent;
    color: var(--bs-gray-700);
}
.copy-button:hover {
    color: var(--bs-gray-600);
}

/* typing animation */
.message-bubble.loading .message {
    padding: 0.65em 1em 1em 1em;
    display: inline-block;
}
.typing {
    position: relative;
}
.typing span {
    content: "";
    -webkit-animation: blink 1.5s infinite;
    animation: blink 1.5s infinite;
    -webkit-animation-fill-mode: both;
    animation-fill-mode: both;
    height: 10px;
    width: 10px;
    background: var(--text);
    position: absolute;
    left: 0;
    top: 0;
    border-radius: 50%;
}
.typing span:nth-child(2) {
    -webkit-animation-delay: 0.2s;
    animation-delay: 0.2s;
    margin-left: 15px;
}
body[data-direction="rtl"] .typing span:nth-child(2) {
    margin-left: -15px;
}
.typing span:nth-child(3) {
    -webkit-animation-delay: 0.4s;
    animation-delay: 0.4s;
    margin-left: 30px;
}
body[data-direction="rtl"] .typing span:nth-child(3) {
    margin-left: -30px;
}
@keyframes blink {
    0% {
        opacity: 0.1;
    }
    20% {
        opacity: 1;
    }
    100% {
        opacity: 0.1;
    }
}

/* tables */
.message-bubble table {
    margin-top: 1em;
    border-collapse: collapse;
}
.message-bubble table td,
.message-bubble table th {
    padding: 8px;
}
.message-bubble table tr:nth-child(odd) {
    background-color: var(--table-row-odd);
}
.message-bubble table tr:nth-child(even) {
    background-color: var(--table-row-even);
}
.message-bubble table th {
    text-align: left;
    background-color: var(--table-header);
    color: white;
}

/* chips checkboxes */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    margin: 0.5em 0em;
}
.chips input[type="checkbox"] {
    display: none;
}
.chips label {
    display: inline-block;
    padding: 0.5em 1.5em;
    border-radius: 999px;
    background-color: var(--chip-unchecked);
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}
.chips input[type="checkbox"]:checked + label {
    padding: 0.5em 0.832em;
    background-color: var(--chip-checked);
    color: white;
}
.chips input[type="checkbox"]:checked + label::before {
    content: "\2713";
    margin-right: 0.5em;
}
.chips input[type="checkbox"]:not(:checked) + label:hover {
    filter: brightness(0.9);
}
.chips input[type="checkbox"]:checked + label:hover {
    filter: brightness(1.1);
}

/* Auto-growing textarea from https://css-tricks.com/the-cleanest-trick-for-autogrowing-textareas/ */
.autogrow {
    /* easy way to plop the elements on top of each other and have them both sized based on the tallest one's height */
    display: grid;
}
.autogrow::after {
    /* Note the weird space! Needed to preventy jumpy behavior */
    content: attr(data-replicated-value) " ";
    /* This is how textarea text behaves */
    white-space: pre-wrap;
    /* Hidden from view, clicks, and screen readers */
    visibility: hidden;
}
.autogrow > textarea {
    /* You could leave this, but after a user resizes, then it ruins the auto sizing */
    resize: none;
    /* Firefox shows scrollbar on growth, you can hide like this. */
    overflow: hidden;
}
.autogrow > textarea,
.autogrow::after {
    /* Identical styling required!! */
    border: 1px solid #ced4da;
    padding: 0.5rem;
    font: inherit;
    /* Place on top of each other */
    grid-area: 1 / 1 / 2 / 2;
}

/* autocomplete input */
.autocomplete {
    position: relative;
    display: inline-block;
}
.autocomplete-items {
    position: absolute;
    border: 1px solid #d4d4d4;
    border-bottom: none;
    border-top: none;
    z-index: 99;
    top: 100%;
    left: 0;
    right: 0;
}
.autocomplete-items div {
    padding: 8px 12px;
    cursor: pointer;
    background-color: #fff;
    border-bottom: 1px solid #d4d4d4;
}
/*when hovering an item:*/
.autocomplete-items div:hover {
    background-color: #e9e9e9;
}
/*when navigating through the items using the arrow keys:*/
.autocomplete-active {
    background-color: var(--mdb-primary) !important;
    color: #ffffff;
}

/* daterangepicker overrides */
.drp-buttons button {
    box-shadow: none;
}
.daterangepicker.show-calendar .drp-buttons {
    display: flex;
    align-items: center;
    justify-content: end;
}
div.daterangepicker td.active,
div.daterangepicker td.active:hover {
    background-color: var(--mdb-primary-400);
}
.daterangepicker td.in-range {
    background-color: var(--mdb-primary-50);
}
.daterangepicker .ranges li.active {
    background-color: var(--mdb-primary-400);
}
.daterangepicker td.available:hover,
.daterangepicker th.available:hover {
    background-color: var(--mdb-primary-100);
}

/* fix mdb radio button group */
.btn-check:checked + .btn,
.btn.active,
.btn.show,
.btn:first-child:active,
:not(.btn-check) + .btn:active {
    color: var(--mdb-white);
    background-color: #9fa6b2;
}
.btn-group > .btn:nth-child(n + 3) {
    z-index: 1;
}
.btn-group,
.btn-group-vertical,
.input-group > .btn,
.input-group > .btn:hover {
    --mdb-btn-box-shadow: none;
    --mdb-btn-hover-box-shadow: none;
    --mdb-btn-focus-box-shadow: none;
    --mdb-btn-active-box-shadow: none;
    box-shadow: none;
}
.btn-group:focus-within {
    box-shadow: 0 0 0 2px #e3ebf7;
}

/* plus minus input */
.plus-minus > input.count {
    text-align: center;
    border-top: 2px solid #e3ebf7;
    border-bottom: 2px solid #e3ebf7;
}
.btn-minus,
.btn-plus {
    padding-left: 1.5em;
    padding-right: 1.5em;
}

#chat-tabs-properties {
    padding: 1em 0 2em 0;
}
@media (min-width: 600px) {
    #chat-tabs-properties {
        padding: 1em 2em 2em 2em;
    }
}
#properties-iframe-loading-spinner {
    padding: 2em 0 2.5em 3em;
    background: #eaf0f7;
    border-radius: 6px;
}
#properties-iframe-container {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}
#properties-iframe {
    width: 100%;
    height: 100vh;
    border: none;
}
#properties-iframe.rentalz-booking-search {
    max-width: 1024px;
}

.floating-container {
    position: sticky;
    display: flex;
    top: 1em;
    z-index: 999;
    float: right;
    transform: translate(-2em, 1.4em);
    flex-direction: column;
    max-width: 300px;
    background: #fbfbfbe6;
    padding: 0.5em;
    border-radius: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    text-align: center;
}

.floating-container > button#find-vacation-homes-button {
    border-radius: 999px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24) !important;
}

.floating-container > button#find-vacation-homes-button:hover {
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23) !important;
}

#featured-property img {
    width: 100%;
    border-radius: var(--rad);
    margin-bottom: 1.5em;
    transition: 0.1s ease-in;
    cursor: pointer;
}

#featured-property img:hover {
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23) !important;
}

.floating-container .subtext {
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    margin-top: 1em;
}

@media (max-width: 1200px) {
    .floating-container {
        display: none !important;
    }
}

@media (min-width: 1201px) {
    .message-wrapper.assistant:first-of-type .message-bubble {
        width: calc(65% + 180px);
    }
}

#header,
#party-info,
#chat,
#followup {
    padding: 1.5em;
}

#followup {
    padding-top: 0.25em;
}

#header {
    padding-bottom: 0;
}

#chat-tabs {
    margin: 1em 0;
    border-bottom: 1px solid var(--mdb-gray-300);
}
#chat-tabs .nav-tabs {
    margin: 0 1em;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
}
#chat-tabs .nav-tabs .nav-link.active {
    background-color: transparent;
    border-bottom-width: 4px;
}
#chat-tabs .nav-tabs .nav-link:hover {
    background-color: var(--mdb-primary-50);
}
#chat-tabs .nav-tabs .nav-link:focus {
    background-color: var(--mdb-primary-50);
}
#chat-tabs .nav-tabs .nav-link:not(.active) {
    border-bottom: 4px solid transparent;
}
#chat-tabs .nav-tabs .nav-link:not(.active):hover {
    background-color: var(--mdb-primary-50);
    border-bottom: 4px solid var(--mdb-primary-100);
}
#chat-tabs .nav-tabs .nav-link {
    font-size: 0.85rem;
}
@media (min-width: 470px) {
    #chat-tabs .nav-tabs .nav-link {
        font-size: 0.9rem;
    }
}
@media (min-width: 660px) {
    #chat-tabs .nav-tabs .nav-link {
        font-size: 1.2rem;
    }
}

.suggestion-pills {
    display: flex;
    row-gap: 1em;
    column-gap: 1em;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    height: 42px;
    overflow: hidden;
}

.suggestion-pill {
    background: var(--mdb-gray-300);
    padding: 0.5em 1.2em;
    border-radius: 0.25rem;
    cursor: pointer;
    text-align: center;
}

.suggestion-pill:hover {
    filter: brightness(0.9);
}

/* fixes for responsive design */
@media (min-width: 1240px) {
    .col-custom-xl-auto {
        flex: 0 0 auto;
        width: auto;
    }

    .col-custom-xl-1 {
        flex: 0 0 auto;
        width: 8.33333333%;
    }

    .col-custom-xl-2 {
        flex: 0 0 auto;
        width: 16.66666667%;
    }

    .col-custom-xl-3 {
        flex: 0 0 auto;
        width: 25%;
    }

    .col-custom-xl-4 {
        flex: 0 0 auto;
        width: 33.33333333%;
    }

    .col-custom-xl-5 {
        flex: 0 0 auto;
        width: 41.66666667%;
    }

    .col-custom-xl-6 {
        flex: 0 0 auto;
        width: 50%;
    }

    .col-custom-xl-7 {
        flex: 0 0 auto;
        width: 58.33333333%;
    }

    .col-custom-xl-8 {
        flex: 0 0 auto;
        width: 66.66666667%;
    }

    .col-custom-xl-9 {
        flex: 0 0 auto;
        width: 75%;
    }

    .col-custom-xl-10 {
        flex: 0 0 auto;
        width: 83.33333333%;
    }

    .col-custom-xl-11 {
        flex: 0 0 auto;
        width: 91.66666667%;
    }

    .col-custom-xl-12 {
        flex: 0 0 auto;
        width: 100%;
    }
}
@media (max-width: 780px) {
    #header {
        row-gap: 1em;
        flex-wrap: wrap;
    }

    #header,
    #party-info,
    #chat,
    #followup {
        padding: 1.25em;
    }

    #followup {
        padding-top: 0.25em;
    }
}
@media (max-width: 524px) {
    div.author svg {
        width: 0.6em;
    }
}
@media (max-width: 436px) {
    #chat-tabs .nav-tabs {
        margin: 0;
    }
    body > section {
        max-width: 100vw;
        margin-top: 0;
        border-radius: 0;
    }
}
@media (max-width: 380px) {
    #jini-logo-link {
        height: 90px;
    }
    .logo-link {
        height: 58px;
    }
}
