/* =========================
   LAYOUT
========================= */
.chatkone-container {
    -webkit-font-smoothing: antialiased;
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 999999;
    font-weight: 400;
    color: #14304A;
}

.chatkone-container * {
    outline: 0;
    box-sizing: border-box;
}

.chatkone-container img {
    display: block;
}

.chatkone-open {
    background: linear-gradient(135deg, #316ba1 0%, #14304a 100%);
    display: flex;
    align-items: center;
    border-radius: 18px;
    height: 60px;
    cursor: pointer;
    overflow: hidden;
    transition: .22s ease;
    box-shadow: 0 14px 34px rgba(20, 48, 74, .22);
    padding-right: 4px;
}

.chatkone-open:hover {
    transform: translateY(-2px);
}

.is-open .chatkone-open {
    padding: 0;
    height: 56px;
    border-radius: 16px;
}

.chatkone-open p {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    padding: 0 20px 0 22px;
    transition: .22s ease;
    margin: 0;
    letter-spacing: .15px;
}

.is-open .chatkone-open p {
    width: 0;
    padding: 0;
    white-space: nowrap;
}

.chatkone-button {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    box-shadow: none;
    background: #63C06D;
    color: #fff;
    font-size: 22px;
    line-height: 1;
    display: grid;
    place-items: center;
    transition: .22s ease;
    border-left: 1px solid rgba(20, 48, 74, .08);
}

.is-open .chatkone-button {
    border: 0;
    height: 56px;
    width: 56px;
    border-radius: 14px;
}

.chatkone-button:hover {
    transform: none;
    background: #4A9252;
    color: #fff;
}

.chatkone-button svg,
.chatkone-button svg * {
    pointer-events: none;
}

.chatkone-wrap {
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 130px);
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(20, 48, 74, .24);
    position: absolute;
    right: 0;
    bottom: 80px;
    height: 0;
    width: 0;
    transition: .24s ease;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .1);
}

.is-open .chatkone-wrap {
    width: 410px;
    height: 750px;
}

.chatkone-header {
    height: 48px;
    padding: 0 20px 235px;
}

.chatkone-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

.chatkone-body {
    padding: 20px;
    flex: 1;
}

.chatkone-pages {
    height: 100%;
    position: relative;
    overflow: hidden;
}

.chatkone-page {
    position: absolute;
    inset: 0;
    height: 100%;
    overflow-y: scroll;
    background-color: #F6F9FB;
    padding-bottom: 80px;
    overscroll-behavior: contain;
    -ms-overflow-style: auto;
    touch-action: pan-y;
    visibility: hidden;
    pointer-events: none;
    z-index: 0;
}

.chatkone-page::-webkit-scrollbar {
    display: none;
}

.chatkone-page.is-active {
    visibility: visible;
    pointer-events: auto;
    z-index: 2;
}

.chatkone__top {
    position: sticky;
    top: 0;
    display: flex;
    justify-content: space-between;
    width: 100%;
    z-index: 10;
    transition: .2s ease-in-out 0s;
    padding: 16px 56px 12px 16px;
}

.chatkone--bg-green.chatkone__top--orange {
    padding: 10px 20px;
}

.chatkone--bg-green .chatkone__top-title {
    padding: 0;
    border: none;
}

.chatkone__top-title {
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: .8px;
    font-weight: 800;
    padding-bottom: 5px;
    border-bottom: 2px solid #63C06D;
    color: #14304A;
}

.chatkone__top-close {
    position: absolute;
    right: 16px;
    top: 12px;
    font-size: 20px;
    background: rgba(0, 0, 0, .5);
    height: 32px;
    width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding-bottom: 1px;
    font-weight: 400;
    color: #fff;
    cursor: pointer;
}

/* =========================
   TEXT
========================= */
.chatkone-title {
    font-size: 28px;
    line-height: 32px;
    font-weight: 800;
    color: #14304A;
}

.chatkone-wrap p {
    font-size: 18px;
    line-height: 24px;
    letter-spacing: 0;
    margin: 10px 0;
    color: #14304A;
}

.chatkone-wrap a {
    text-decoration: none;
}

.chatkone-small-text {
    font-size: 11px;
    font-weight: 500;
}

.chatkone-text__white {
    color: #fff !important;
}

.chatkone-text__black {
    color: #14304A !important;
}

/* =========================
   BOX
========================= */
.chatkone-box {
    border-radius: 18px;
    margin: 16px 0;
    overflow: hidden;
    position: relative;
    box-shadow: 0 12px 28px rgba(20, 48, 74, .08);
}

.chatkone-box__overlay {
    background: linear-gradient(90deg, rgba(24, 24, 24, 0.7) 0%, rgba(24, 24, 24, 0.4) 35%, rgba(24, 24, 24, 0) 72%);
    position: absolute;
    width: 100%;
    height: 100%;
}

.chatkone-box__media-bg {
    height: 200px;
    color: #fff;
}

.chatkone-box__media-bg .chatkone-box__heading,
.chatkone-box__media-bg .chatkone-box__text {
    text-shadow: 0 0 8px #14304a;
}

.chatkone-box__header {
    padding: 18px 18px 10px;
    display: flex;
    align-items: center;
}

.chatkone-box__avatar {
    margin-right: 10px;
}

.chatkone-box__avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: #63C06D;
    padding: 3px;
}

.chatkone-box__heading {
    font-size: 15px;
    font-weight: 700;
}

.chatkone-box__chat-link {
    padding: 14px 18px;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: #14304A;
    border-top: 1px solid rgba(20, 48, 74, .06);
    cursor: pointer;
}

.chatkone-box__chat-link:last-of-type {
    padding: 14px 18px 18px;
}

.chatkone-box__chat-link a {
    display: block;
    flex: 1;
    color: #14304A !important;
}

.chatkone-video {
    position: relative;
    cursor: pointer;
    height: 200px;
}

.chatkone-video-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chatkone-video-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    color: white;
    font-size: 28px;
    line-height: 70px;
    text-align: center;
    pointer-events: none;
}

.chatkone-video-embed {
    width: 100%;
    aspect-ratio: 16 / 9;
}

.chatkone-video-embed iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.chatkone-box__text-area {
    position: absolute;
    bottom: 20px;
    left: 20px;
    max-width: 210px;
}

.chatkone-box_text {
    font-size: 12px;
    font-weight: 500;
}

.chatkone-box__cta {
    height: 36px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0 14px;
    font-size: 12px;
    margin-top: 15px;
    background-color: #63C06D;
    border-radius: 999px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    border: none;
    transition: all .2s ease;
    width: fit-content;
}

.chatkone-box__cta:hover {
    background: #4A9252;
    color: #fff;
}

.chatkone-box .icon-play {
    margin-right: 8px;
}

/* =========================
   HELPERS
========================= */
.chatkone-bg-white,
.chatkone--bg-light-grey,
.chatkone--bg-grey {
    background-color: #fff;
}

.chatkone--bg-green {
    background-color: #63C06D;
}

/* =========================
   ICONS
========================= */
.chatkone__icon {
    display: flex;
    color: #63C06D;
}

.icon-right {
    height: 10px;
    width: 10px;
    border: 3px solid #14304A;
    border-left: none;
    border-bottom: none;
    transform: rotate(45deg);
    margin: 0 4px;
}

.icon-down {
    height: 15px;
    width: 15px;
    border: 3px solid #fff;
    border-left: none;
    border-bottom: none;
    transform: rotate(135deg);
    margin-top: -4px;
}

.icon-circle-dot {
    border: 1px solid #63C06D;
    height: 14px;
    width: 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-circle-dot::after {
    content: "";
    display: block;
    height: 6px;
    width: 6px;
    border-radius: 50%;
    background-color: #000;
}

.icon-play-orange {
    background-color: #63C06D;
    border-radius: 50%;
    width: 15px;
    height: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 2px;
}

/* =========================
   NAVIGATION
========================= */
.chatkone-nav {
    position: absolute;
    bottom: 16px;
    display: flex;
    align-items: center;
    height: 58px;
    background-color: #060606bf;
    width: 100%;
    max-width: 300px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 18px;
    z-index: 10;
    padding: 0 4px;
    box-shadow: 0 10px 26px rgba(20, 48, 74, .14);
    border: 1px solid rgba(20, 48, 74, .08);
    backdrop-filter: blur(80px);
}

.chatkone-nav__pages {
    display: flex;
    width: 100%;
    gap: 5px;
}

.chatkone-nav__pages .chatkone-nav__link {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    border-radius: 14px;
    height: 48px;
}

.chatkone-nav__link--last {
    border-left: none;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 0;
    flex: 0 0 48px;
    border-radius: 14px;
    color: #14304A;
}

.chatkone-nav__link {
    cursor: pointer;
    transition: .2s ease-in-out 0s;
}

.chatkone-nav__link.is-active,
.chatkone-nav__link--last.is-active {
    background: #6f6f6f;
    color: #fff;
}

.chatkone-nav__link.is-active path,
.chatkone-nav__link--last.is-active path {
    fill: #fff;
}

.chatkone-nav__link:hover,
.chatkone-nav__link--last:hover {
    transform: none;
    background: #6f6f6f;
}

.chatkone-nav__link span {
    font-size: 11px;
    font-weight: 700;
    margin-top: 2px;
}

/* =========================
   PAGE BACKGROUNDS
========================= */
#page-contact,
#page-chat,
#page-menu {
    background: #F6F9FB;
}

#page-home {
    background: url(/wp-content/uploads/2023/03/kotimuutto.jpeg);
    background-color: rgba(0, 0, 0, 0.4);
    background-blend-mode: darken;
    background-size: cover;
    background-position: center;
    position: relative;
}

/* =========================
   CONTACT PAGE
========================= */
/* .chatkone-contact__title {
    width: 75%;
    margin: 0 auto 50px;
    text-align: center;
}

#chatkone__contact-form {
    margin: auto;
}

#chatkone__contact-form label {
    position: absolute;
    top: -99999px;
    left: -99999px;
}

#chatkone__contact-form input[type=text],
#chatkone__contact-form textarea {
    width: 100%;
    color: #484848;
    border: 1px solid #dedede;
    border-radius: 8px;
    outline: none;
    margin-bottom: 15px;
    font-size: 16px;
    box-shadow: 0 0 0 0, 0 0 0 0, 2px 2px 6px rgba(0, 0, 0, .07) inset;
}

#chatkone__contact-form textarea {
    height: 146px;
    padding: 24px 16px;
}

#chatkone__contact-form input {
    height: 50px;
    padding: 9px 20px;
}

#chatkone__submit {
    padding: 10px 25px;
    border: 1px solid #c3c3c3;
    border-radius: 25px;
    font-size: 16px;
    color: #989898;
    margin-top: 20px;
    background-color: #c3c3c3;
    font-weight: 500;
    width: 100%;
} */

.chatkone-contact {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
    position: absolute;
    top: 0;
}

/* HERO */
.chatkone-contact__hero {
    background: linear-gradient(135deg, #14304A, #1d4a6f);
    color: #fff;
    padding: 18px;
    border-radius: 18px;
}

.chatkone-contact__hero h2 {
    margin: 0 0 6px;
    font-size: 22px;
}

.chatkone-contact__hero p {
    margin: 0;
    font-size: 13px;
    opacity: 0.9;
    color: #fff;
}

/* QUICK CONTACT */
.chatkone-contact__quick {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.chatkone-contact__quick-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    background: #fff;
    text-decoration: none;
    color: #14304A;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.chatkone-contact__quick-card i {
    font-size: 20px;
    color: #63C06D;
}

.chatkone-contact__quick-card span {
    display: block;
    font-size: 12px;
    color: #6b7c8f;
}

/* FORM */
.chatkone-contact__form-wrap {
    background: #fff;
    padding: 14px;
    border-radius: 18px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 80px;
}

.chatkone-contact__form-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #14304A;
}

#chatkone__contact-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#chatkone__contact-form textarea,
#chatkone__contact-form input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    font-size: 14px;
}

#chatkone__contact-form textarea {
    min-height: 90px;
    resize: vertical;
}

.chatkone-contact__footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 12px;
    color: #6b7c8f;
}

.chatkone-contact__status {
    margin: 4px 0 0;
    min-height: 20px;
    font-size: 13px;
    font-weight: 600;
}

.chatkone-contact__status.is-success {
    color: #238636;
}

.chatkone-contact__status.is-error {
    color: #c0362c;
}

#chatkone__submit {
    width: 100%;
    border: none;
    font-weight: 700;
}

#chatkone__submit:disabled {
    opacity: 0.7;
    cursor: wait;
}

/* =========================
   MENU PAGE
========================= */
#page-menu {
    padding-top: 60px;
}

.chatkone_menu-title {
    font-size: 18px;
    color: #000;
    font-weight: 700;
}

/* =========================
   CHAT UI
========================= */
.chatkone-chat__msg {
    display: flex;
    margin: 12px 0;
}

.chatkone-chat__msg--bot {
    justify-content: flex-start;
    align-items: flex-end;
}

.chatkone-chat__msg--user {
    justify-content: flex-end;
}

.chatkone-chat__avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 8px;
    flex-shrink: 0;
    align-self: flex-end;
    background: #63C06D;
    padding: 2px;
}

.chatkone-chat__bubble {
    max-width: 78%;
    padding: 12px 14px;
    border-radius: 18px;
    white-space: pre-wrap;
    line-height: 1.4;
    font-size: 14px;
    box-shadow: 0 4px 14px rgba(20, 48, 74, .06);
}

.chatkone-chat__msg--bot .chatkone-chat__bubble {
    background: #fff;
    color: #14304A;
    border: 1px solid rgba(20, 48, 74, .08);
}

.chatkone-chat__msg--user .chatkone-chat__bubble {
    background: #14304A;
    color: #fff;
}

.chatkone-chat__quick {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0 10px;
    justify-content: flex-end;
}

.chatkone-chat__quick .chatkone-chat__quickbtn,
[type=button].chatkone-chat__quickbtn {
    border: 1px solid rgba(20, 48, 74, .12);
    background: #fff;
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 13px;
    cursor: pointer;
    color: #14304A;
    white-space: normal;
    text-align: left;
    box-shadow: 0 4px 14px rgba(20, 48, 74, .05);
    font-weight: 700;
    transition: .2s ease;
}

[type=button].chatkone-chat__quickbtn:hover,
[type=button].chatkone-chat__quickbtn.is-active {
    border-color: #63C06D;
    background: #63C06D;
    color: #fff;
}

[type=button].chatkone-chat__quickbtn.chatkone-chat__quickbtn--done {
    border-color: #4A9252;
    background: #4A9252;
    color: #fff;
}

[type=button].chatkone-chat__quickbtn.chatkone-chat__quickbtn--done::before {
    content: "";
    flex-basis: 100%;
    width: 0;
}

.chatkone-chat__form {
    display: flex;
    gap: 10px;
    padding: 12px;
    background: #fff;
    border: 1px solid rgba(20, 48, 74, .08);
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(20, 48, 74, .06);
    position: sticky;
    bottom: 0;
}

.chatkone-chat__form.is-hidden {
    display: none;
}

.chatkone-chat__form input {
    flex: 1;
    border-radius: 12px;
    border: 1px solid rgba(20, 48, 74, .12);
    padding: 12px 14px;
    font-size: 14px;
    color: #14304A;
    background: #F6F9FB;
}

.chatkone-chat__form button {
    border-radius: 12px;
    border: none;
    background: #63C06D;
    color: #14304A;
    padding: 12px 16px;
    cursor: pointer;
    font-weight: 700;
    transition: .2s ease;
}

.chatkone-chat__form button:hover {
    background: #4A9252;
    color: #fff;
}

.chatkone-chat__form.is-disabled {
    opacity: .6;
    pointer-events: none;
}

.chatkone-chat__msg--typing {
    align-items: flex-start;
}

.chatkone-chat__msg--bot.chatkone-chat__msg--typing {
    align-items: flex-end;
}

.chatkone-chat__bubble--typing {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 52px;
    min-height: 22px;
    padding: 12px 14px;
    border-radius: 18px;
    line-height: 1;
    background: #fff;
}

.chatkone-chat__typing-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.28;
    animation: chatkone-typing-bounce 1.2s infinite ease-in-out;
    will-change: transform, opacity;
}

.chatkone-chat__typing-dot:nth-child(1) {
    animation-delay: 0s;
}

.chatkone-chat__typing-dot:nth-child(2) {
    animation-delay: 0.16s;
}

.chatkone-chat__typing-dot:nth-child(3) {
    animation-delay: 0.32s;
}

@keyframes chatkone-typing-bounce {

    0%,
    80%,
    100% {
        transform: translateY(0) scale(1);
        opacity: 0.28;
    }

    40% {
        transform: translateY(-4px) scale(1.05);
        opacity: 0.95;
    }
}

/* =========================
   CHAT HEADER — MODERN FINAL
========================= */

.chatkone__top--chat {
    background: linear-gradient(135deg, #14304A 0%, #316BA1 100%);
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    padding: 20px 56px 16px 16px;
    /* match default header and space for close */
    border-bottom: none;
}

.chatkone__top-title.chatkone__top-title--chat,
.chatkone__top-title--chat {
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    letter-spacing: .2px;
    text-transform: none;
    border: none;
    padding: 0;
}

.chatkone-chat__header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.chatkone-chat__back,
.chatkone-chat__reset {
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    color: #fff;
    opacity: .94;
    text-decoration: none;
}

.chatkone-chat__reset {
    color: #fff;
}

.chatkone-chat__back:hover,
.chatkone-chat__reset:hover {
    text-decoration: none;
    opacity: 1;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 520px) {

    .is-open .chatkone-wrap {
        width: calc(100vw - 20px);
        height: calc(100vh - 20px);
        max-width: none;
        max-height: none;
        bottom: -6px;
        right: -6px;
    }

    .chatkone-open p {
        padding: 0 12px 0 14px;
    }

}