/* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
	display: block;
}
body {
	line-height: 1;
}
ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}


/******* My Style ******/

:root {
    --primaryColor: #202b84;
    --secondaryColor: #f8a717;
    --chatBoxWidth: 360px;
    --chatBoxHeight: calc(100vh - 160px);
}

body {
    height: 600vh;
    width: 100vw;
    background: url(assets/images/hansons-bg.jpg) no-repeat top center;
    background-size: cover;
    overflow-x: hidden;
    font-family: 'Futura PT', sans-serif;
}

/******* Chat Style Start ******/

#chat-btn {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 54px;
    height: 54px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--secondaryColor);
    box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 4px, rgba(0, 0, 0, 0.2) 0px 2px 12px;
    cursor: pointer;
    overflow: hidden;
    z-index: +9999;
    transition: all 0.2s ease-in-out;
}

#chat-btn:hover {
    transform: scale(1.12);
}

#chat-btn i {
    font-size: 23px;
    color: #fff;
}

#chat-btn .ri-close-fill {
    font-size: 30px;
}

#chat-btn .ri-close-fill,
#chat-btn.active .ri-question-answer-fill {
    display: none;
}

#chat-btn.active .ri-close-fill {
    display: block;
}

#chat-btn:before {
    content: '';
    position: absolute;
    left: -10px;
    top: -10px;
    width: calc(100% + 20px);
    height: calc(100% + 20px);
    transform-origin: center;
    background: radial-gradient(#fff, #ffffff00);
    border-radius: 50%;
    z-index: -1;
    transform: scale(0);
    opacity: 0;
    animation-duration: 1s;
    animation-iteration-count: 1;
}

#chat-btn:before {
    animation-name: ripple;
}

#chat-btn.active:before {
    animation-name: ripple1;
}

@keyframes ripple {
    from {
        opacity: 0.5;
        transform: scale(0);
    }

    to {
        opacity: 0;
        transform: scale(10);
    }
}

@keyframes ripple1 {
    from {
        opacity: 0.5;
        transform: scale(0);
    }

    to {
        opacity: 0;
        transform: scale(10);
    }
}



#chat-box {
    transform: scale(0);
    opacity: 0;
    visibility: hidden;
    transform-origin: bottom right;
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 100%;
    width: var(--chatBoxWidth);
    height: var(--chatBoxHeight);
    max-height: 600px;
    z-index: +9999;
    transition: all 0.35s;
}

#chat-box.active {
    transform: scale(1);
    opacity: 1;
    visibility: visible;
}

#chat-box .chat-box-wrap {
    border-radius: 10px;
    overflow: hidden;
    display: block;
    width: 100%;
    height: 100%;
    background: #fff;
    box-shadow: 0 5px 20px #00000026;
}

.chat-box-wrap .chat-header {
    display: block;
    width: 100%;
    background: var(--primaryColor);
}

.chat-header .chat-header-wrap {
    padding: 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.chat-header-wrap .chat-head-logo-wrap {
    position: relative;
    margin-right: 10px;
}

.chat-header .chat-header-wrap .chat-header-logo {
    width: 38px;
    border-radius: 50%;
    height: 38px;
    object-fit: cover;
    object-position: center;
    box-shadow: 0 0 0 2px #fff;
}

.chat-header-wrap .chat-head-logo-wrap:after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid #fff;
    background: #00bda5;
    z-index: 1;
    right: -3px;
    bottom: 3px;
}

.chat-header .chat-header-wrap .chat-header-title {
    color: #fff;
    font-size: 17px;
    font-weight: 500;
}

.chat-box-wrap .chat-body {
    display: block;
    width: 100%;
    height: calc(100% - 119px);
    position: relative;
}

.chat-body .chat-branding {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9;
    background: linear-gradient(to bottom, #fff, #fff, #fff, #fff, #ffffff87, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 0 15px;
    font-size: 12px;
    font-weight: 400;
    color: #000;
}

.chat-body .chat-branding .chat-brand-img {
    width: auto;
    height: 14px;
    margin: 0 4px;
}

.chat-body .chat-branding a {
    color: #0176ff;
    text-decoration: none;
}

.chat-body .chat-body-wrap {
    display: block;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}

.chat-body .chat-body-wrap::-webkit-scrollbar {
    width: 2px;
    background: #f5f5f5;
}

.chat-body .chat-body-wrap::-webkit-scrollbar-track {
    border-radius: 0px;
}

.chat-body .chat-body-wrap::-webkit-scrollbar-thumb {
    background: var(--secondaryColor);
    border-radius: 0px;
}

#chattingBox {
    padding: 30px 0 20px;
    float: left;
    width: 100%;
}

#chattingBox .messageAI {
    display: inline-block;
    margin-left: 12px;
    padding: 10px 15px;
    border-radius: 0 20px 20px;
    background: #e7e7e7;
    color: #000;
    font-size: 16px;
    font-weight: 400;
    text-align: left;
    clear: both;
    float: left;
    max-width: calc(100% - 24px);
    box-sizing: border-box;
    transform: scale(0);
    transform-origin: top left;
    animation: messageAnimation 1 0.15s;
    animation-fill-mode: forwards;
}

#chattingBox .messageUser {
    display: inline-block;
    margin-right: 12px;
    padding: 10px 15px;
    border-radius: 20px 20px 0;
    background: var(--primaryColor);
    color: #fff;
    font-size: 16px;
    font-weight: 400;
    text-align: left;
    float: right;
    clear: both;
    max-width: calc(100% - 24px);
    box-sizing: border-box;
    transform: scale(0);
    transform-origin: bottom right;
    animation: messageAnimation 1 0.15s;
    animation-fill-mode: forwards;
}

@keyframes messageAnimation {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

#chattingBox .messageAI + .messageUser,
#chattingBox .messageUser + .messageAI {
    margin-top: 10px;
}

#chattingBox .typingAI {
    min-height: 38px;
    position: relative;
}

#chattingBox .typingAI span {
    width: 6px;
    height: 6px;
    background: var(--primaryColor);
    display: inline-block;
    border-radius: 50%;
    right: 0px;
    bottom: 0px;
    margin: 0px 2.5px;
    position: relative;
    animation: jump 1s infinite;
 }

 #chattingBox .typingAI span:nth-child(1) {
    -webkit-animation-delay: 100ms;
    animation-delay: 100ms;
 }

 #chattingBox .typingAI span:nth-child(2) {
    -webkit-animation-delay: 200ms;
    animation-delay: 200ms;
 }

 #chattingBox .typingAI span:nth-child(3) {
    -webkit-animation-delay: 300ms;
    animation-delay: 300ms;
 }

 @keyframes jump {
    0%   {bottom: 0px;}
    20%  {bottom: 5px;}
    40%  {bottom: 0px;}
 }

#chattingBox a {
    font-weight: 500;
    text-decoration: underline;
}

#chattingBox a:active {
    color: var(--secondaryColor);
}

#chattingBox b {
    font-weight: 500;
}

#chattingBox>div {
    margin-bottom: 2px;
    line-height: 1.1em;
}

.chat-box-wrap .chat-footer {
    border-top: 2px solid #ebebeb;
    position: relative;
}

.chat-box-wrap .chat-footer:before {
    content: '';
    position: absolute;
    left: 0;
    top: -3px;
    height: 2px;
    width: 0;
    background: var(--primaryColor);
    transition: all 0.3s;
}

.chat-box-wrap .chat-footer.focus:before {
    width: 100%;
}

.chat-footer #messageBox {
    display: block;
    width: 100%;
    position: relative;
}

#messageBox #chatMessage {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 8px 12px 15px;
    border-radius: 0;
    border: none;
    outline: none;
    height: 53px;
    font: inherit;
    font-size: 16px;
    color: #000;
    font-weight: 400;
    padding-right: 30px;
    background: #fff !important;
    background-color: #fff !important;
}

#messageBox #chatMessage[readonly] {
    background: #efefef !important;
}

#messageBox #chatSubmitBtn {
    box-sizing: border-box;
    position: absolute;
    top: 0;
    right: 0;
    border: none;
    background: transparent !important;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px 0 5px;
    font-size: 23px;
    color: var(--primaryColor);
    cursor: pointer;
    -webkit-appearance: none;
}

#chatNotification {
    opacity: 0;
    visibility: hidden;
    display: none;
}

#closeChatMobile {
    font-size: 24px;
    margin-left: auto;
    color: #fff;
    cursor: pointer;
    display: none;
}


/***** Responsive *****/

@media only screen and (max-width: 500px) {

:root {
    --chatBoxWidth: 100vw;
    --chatBoxHeight: 100vh;
}

body {
    background: url(assets/images/hansons-mobile-bg.jpg) no-repeat top center;
    background-size: cover;
    height: 630vh;
}

#chat-box {
    left: 0;
    bottom: 0;
    max-height: 100%;
}

#chat-btn.active .ri-question-answer-fill {
    display: block;
}

#chat-btn.active .ri-close-fill {
    display: none;
}

#closeChatMobile {
    display: block;
}

body.chat--open {
    overflow: hidden;
}

}








