:root {
    --yms-chat-ink: #171b18;
    --yms-chat-green: #1f4d3d;
    --yms-chat-green-dark: #15372c;
    --yms-chat-cream: #f7f2e8;
    --yms-chat-line: #d9ddd7;
}

.yms-quote__form--simple .yms-simple-quote__step {
    border: 0;
    margin: 0;
    padding: 0;
}

.yms-quote__form--simple .yms-simple-quote__step legend {
    color: var(--yms-chat-ink);
    font-size: clamp(1.55rem, 3vw, 2.2rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: .5rem;
}

.yms-simple-quote__help {
    color: #5e655f;
    margin: 0 0 1.5rem;
}

.yms-simple-quote__label {
    color: var(--yms-chat-ink);
    display: block;
    font-weight: 700;
    margin-bottom: .65rem;
}

.yms-simple-quote__label b,
.yms-quote__form--simple label b {
    color: #a33d2e;
}

.yms-quote__choice-grid--simple {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.yms-quote__choice-grid--simple .yms-quote__choice span {
    min-height: 0;
}

.yms-simple-quote__dimensions {
    grid-template-columns: 1fr 1fr minmax(100px, .45fr);
}

.yms-quote__form--simple .yms-quote__field > label span {
    color: #6f756f;
    font-weight: 400;
}

.yms-simple-quote__actions {
    align-items: center;
}

.yms-chat {
    bottom: max(20px, env(safe-area-inset-bottom));
    font-family: Arial, Helvetica, sans-serif;
    position: fixed;
    right: max(20px, env(safe-area-inset-right));
    z-index: 99998;
}

.yms-chat * {
    box-sizing: border-box;
}

.yms-chat [hidden] {
    display: none !important;
}

.yms-chat__toggle {
    align-items: center;
    background: var(--yms-chat-green);
    border: 0;
    border-radius: 999px;
    box-shadow: 0 14px 34px rgba(17, 35, 28, .24);
    color: #fff;
    cursor: pointer;
    display: flex;
    font-size: 15px;
    font-weight: 700;
    gap: 10px;
    justify-content: center;
    min-height: 52px;
    padding: 0 20px;
}

.yms-chat__toggle:hover,
.yms-chat__toggle:focus-visible {
    background: var(--yms-chat-green-dark);
}

.yms-chat__dot {
    background: #8fe6b6;
    border: 2px solid rgba(255, 255, 255, .75);
    border-radius: 50%;
    height: 10px;
    width: 10px;
}

.yms-chat__panel {
    background: #fff;
    border: 1px solid rgba(23, 27, 24, .1);
    border-radius: 20px;
    bottom: 66px;
    box-shadow: 0 24px 60px rgba(17, 35, 28, .22);
    max-height: min(680px, calc(100vh - 110px));
    overflow: hidden;
    position: absolute;
    right: 0;
    width: min(380px, calc(100vw - 28px));
}

.yms-chat__header {
    align-items: center;
    background: var(--yms-chat-green);
    color: #fff;
    display: flex;
    justify-content: space-between;
    padding: 18px 20px;
}

.yms-chat__header div {
    display: grid;
    gap: 3px;
}

.yms-chat__header strong {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 21px;
}

.yms-chat__header span {
    color: rgba(255, 255, 255, .76);
    font-size: 12px;
}

.yms-chat__header button {
    background: transparent;
    border: 0;
    color: #fff;
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
    padding: 2px 4px;
}

.yms-chat__intro {
    background: var(--yms-chat-cream);
    color: #505751;
    font-size: 13px;
    line-height: 1.5;
    padding: 11px 20px;
}

.yms-chat__start {
    display: grid;
    gap: 13px;
    padding: 18px 20px 14px;
}

.yms-chat__start label {
    color: var(--yms-chat-ink);
    display: grid;
    font-size: 13px;
    font-weight: 700;
    gap: 5px;
}

.yms-chat input,
.yms-chat textarea {
    background: #fff;
    border: 1px solid var(--yms-chat-line);
    border-radius: 10px;
    color: var(--yms-chat-ink);
    font: inherit;
    line-height: 1.35;
    outline: 0;
    padding: 10px 11px;
    resize: vertical;
    width: 100%;
}

.yms-chat input:focus,
.yms-chat textarea:focus {
    border-color: var(--yms-chat-green);
    box-shadow: 0 0 0 3px rgba(31, 77, 61, .12);
}

.yms-chat__start button,
.yms-chat__reply button {
    background: var(--yms-chat-green);
    border: 0;
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    min-height: 43px;
    padding: 10px 15px;
}

.yms-chat button:disabled {
    cursor: wait;
    opacity: .6;
}

.yms-chat__messages {
    background: #f4f6f3;
    display: flex;
    flex-direction: column;
    gap: 9px;
    max-height: 350px;
    min-height: 190px;
    overflow-y: auto;
    padding: 16px;
}

.yms-chat__message {
    max-width: 84%;
}

.yms-chat__message p {
    border-radius: 14px 14px 14px 4px;
    line-height: 1.4;
    margin: 0;
    padding: 10px 12px;
    white-space: pre-wrap;
}

.yms-chat__message--visitor {
    align-self: flex-end;
}

.yms-chat__message--visitor p {
    background: var(--yms-chat-green);
    border-radius: 14px 14px 4px 14px;
    color: #fff;
}

.yms-chat__message--agent {
    align-self: flex-start;
}

.yms-chat__message--agent p {
    background: #fff;
    border: 1px solid var(--yms-chat-line);
    color: var(--yms-chat-ink);
}

.yms-chat__reply {
    align-items: end;
    background: #fff;
    border-top: 1px solid var(--yms-chat-line);
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr auto;
    padding: 12px;
}

.yms-chat__reply button {
    min-height: 42px;
}

.yms-chat__notice {
    background: #fff1ee;
    border-radius: 8px;
    color: #8a2d20;
    font-size: 12px;
    margin: 0;
    padding: 9px 10px;
}

.yms-chat__trap {
    height: 1px;
    left: -10000px;
    overflow: hidden;
    position: absolute;
    width: 1px;
}

.yms-chat footer {
    color: #747a75;
    font-size: 10px;
    line-height: 1.35;
    padding: 8px 16px 11px;
    text-align: center;
}

@media (max-width: 760px) {
    .yms-quote__choice-grid--simple,
    .yms-simple-quote__dimensions {
        grid-template-columns: 1fr 1fr;
    }

    .yms-simple-quote__unit {
        grid-column: span 2;
    }

    .yms-chat {
        bottom: 12px;
        right: 12px;
    }

    .yms-chat__panel {
        bottom: 62px;
        max-height: calc(100vh - 88px);
        width: calc(100vw - 24px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .yms-chat *,
    .yms-quote__form--simple * {
        scroll-behavior: auto !important;
    }
}
