
:root {
    --mast-dock-red: #e4002b;
    --mast-dock-height: 96px;
    --mast-dock-font: 'Montserrat', Arial, sans-serif;
    --mast-dock-text: #171923;
    --mast-dock-muted: #737782;
    --mast-dock-border: #e2e3e7;
}

body:has(.mast-dock) {
    padding-bottom: calc(
        var(--mast-dock-height) + env(safe-area-inset-bottom, 0px)
    ) !important;
}

/* BASE */

.mast-dock,
.mast-dock * {
    box-sizing: border-box;
}

.mast-dock {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2147483000;
    font-family: var(--mast-dock-font);
    color: var(--mast-dock-text);
    pointer-events: none;
}

.mast-dock button,
.mast-dock a,
.mast-dock input {
    font-family: inherit;
}

.mast-dock button,
.mast-dock a {
    cursor: pointer;
}

/* BOTTOM NAVIGATION */

.mast-dock__nav {
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(24px, 5vw, 85px);
    min-height: var(--mast-dock-height);
    padding: 5px 20px calc(5px + env(safe-area-inset-bottom, 0px));
    background: #fff;
    box-shadow: 0 -5px 28px rgba(0, 0, 0, .07);
}

.mast-dock__nav button {
    appearance: none;
    border: 0;
    background: transparent;
    color: #222936;
    width: 125px;
    min-height: 68px;
    padding: 6px 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 7px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
    text-align: center;
    transition: color .2s ease;
}

.mast-dock__nav button span {
    display: block;
}

.mast-dock__nav svg,
.mast-dock__bubble svg {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mast-dock__nav button.is-active,
.mast-dock__nav button:hover,
.mast-dock__nav button:focus {
    color: var(--mast-dock-red) !important;
    background: transparent !important;
}

/* FLOATING PANEL */

.mast-dock__panel {
    pointer-events: none;
    position: absolute;
    bottom: calc(var(--mast-dock-height) + 12px);
    left: 50%;
    width: min(600px, calc(100vw - 32px));
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 15px);
    transition:
        opacity .25s ease,
        transform .25s ease,
        visibility .25s ease;
}

.mast-dock__panel.is-open {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.mast-dock__cards {
    position: relative;
}

/* CARDS */

.mast-dock__card {
    position: absolute;
    inset: auto 0 0;
    background: #fff;
    border-radius: 24px;
    padding: 26px 28px;
    box-shadow: 0 14px 45px rgba(0, 0, 0, .16);
    opacity: 0;
    visibility: hidden;
    transform: translateX(20px) scale(.98);
    transition:
        opacity .25s ease,
        transform .25s ease,
        visibility .25s ease;
    pointer-events: none;
}

.mast-dock__card.is-active {
    position: relative;
    opacity: 1;
    visibility: visible;
    transform: translateX(0) scale(1);
    pointer-events: auto;
    max-height: calc(100dvh - var(--mast-dock-height) - 65px);
    overflow-y: auto;
    scrollbar-width: thin;
}

/* CARD HEADING */

.mast-dock__heading {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 24px;
}

.mast-dock__bubble {
    display: grid;
    place-items: center;
    flex: 0 0 76px;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: #fcebed;
    color: var(--mast-dock-red);
}

.mast-dock__bubble svg {
    width: 36px;
    height: 36px;
}

.mast-dock__heading > div {
    flex: 1;
    min-width: 0;
}

.mast-dock__heading h3 {
    margin: 0 0 6px;
    font-family: var(--mast-dock-font);
    font-size: clamp(20px, 2vw, 25px);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -.5px;
    color: #171717;
}

.mast-dock__heading p {
    margin: 0;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--mast-dock-muted);
}

/* NEXT BUTTON */

.mast-dock__next {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f5f5f6;
    color: #171717;
    font-size: 30px;
    line-height: 1;
}

/* PRIMARY BUTTON */

.mast-dock .mast-dock__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 54px;
    padding: 14px 20px;
    border: 0;
    border-radius: 14px;
    background: var(--mast-dock-red);
    color: #fff !important;
    text-decoration: none !important;
    font-family: var(--mast-dock-font);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
    transition:
        background .2s ease,
        transform .2s ease;
}

.mast-dock .mast-dock__cta:hover {
    background: #c90026;
    color: #fff !important;
    transform: translateY(-1px);
}

.mast-dock__cta span {
    font-size: inherit;
    line-height: inherit;
}

/* PAGINATION */

.mast-dock__dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 18px 0 7px;
}

.mast-dock__dots button {
    width: 11px;
    height: 11px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #c9c9ce;
    transition: background .2s ease;
}

.mast-dock__dots button.is-active {
    background: var(--mast-dock-red);
}

/* CLOSE BUTTON */

.mast-dock__close {
    position: absolute;
    top: -13px;
    right: -10px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    background: #fff;
    color: var(--mast-dock-red);
    border: 1px solid #e5e5e5;
    border-radius: 50%;
    font-size: 23px;
    line-height: 1;
    box-shadow: 0 3px 12px rgba(0, 0, 0, .12);
}

/* OPEN DAY FORM */

.mast-dock__form {
    display: grid;
    gap: 11px;
}

.mast-dock__form > input,
.mast-dock__form > select,
.mast-dock__form .mast-dock__phone {
    width: 100%;
    height: 48px;
    min-height: 48px;
    border: 1px solid var(--mast-dock-border);
    border-radius: 9px;
    background: #fff;
}

.mast-dock__form > input,
.mast-dock__form > select {
    padding: 11px 14px;
    color: #252525;
    font-family: var(--mast-dock-font);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
}

.mast-dock__form input::placeholder {
    color: #a0a8b6;
    opacity: 1;
}

.mast-dock__form input:focus,
.mast-dock__form select:focus {
    outline: none;
    border-color: var(--mast-dock-red);
    box-shadow: 0 0 0 2px rgba(228, 0, 43, .08);
}

/* PHONE FIELD */

.mast-dock__phone {
    display: flex;
    align-items: center;
    overflow: hidden;
}

.mast-dock__phone > span {
    padding: 0 12px 0 14px;
    font-size: 14px;
    font-weight: 500;
    color: #363636;
    white-space: nowrap;
}

.mast-dock__phone input {
    flex: 1;
    min-width: 0;
    width: 100%;
    height: 100%;
    border: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent;
    padding: 10px 12px 10px 0;
    font-size: 14px;
    color: #252525;
}

.mast-dock__phone:focus-within {
    border-color: var(--mast-dock-red);
    box-shadow: 0 0 0 2px rgba(228, 0, 43, .08);
}

.mast-dock__form .mast-dock__cta {
    margin-top: 3px;
}

/* FEEDBACK */

.mast-dock__feedback {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
}

.mast-dock__feedback:empty {
    display: none;
}

/* HONEYPOT */

.mast-dock__honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0;
    pointer-events: none;
}

/* DISABLED BUTTON */

.mast-dock .mast-dock__cta:disabled {
    opacity: .65;
    cursor: not-allowed;
    transform: none;
}

/* ACCESSIBILITY */

.mast-dock__nav button:focus-visible,
.mast-dock__panel button:focus-visible,
.mast-dock__panel a:focus-visible {
    outline: 3px solid #f06;
    outline-offset: 3px;
}

/* TABLET */

@media (max-width: 991px) {

    .mast-dock__nav {
        gap: clamp(12px, 3vw, 45px);
    }

    .mast-dock__nav button {
        width: 115px;
        font-size: 11px;
    }

    .mast-dock__panel {
        width: min(560px, calc(100vw - 30px));
    }

    .mast-dock__card {
        padding: 24px;
    }
}

/* MOBILE */

@media (max-width: 600px) {

    :root {
        --mast-dock-height: 84px;
    }

    .mast-dock__nav {
        justify-content: space-around;
        gap: 0;
        padding: 7px 4px calc(7px + env(safe-area-inset-bottom, 0px));
    }

    .mast-dock__nav button {
        width: 25%;
        min-width: 0;
        min-height: 65px;
        padding: 4px 2px;
        gap: 5px;
        font-size: 10px;
        line-height: 1.2;
        font-weight: 500;
    }

    .mast-dock__nav svg {
        width: 25px;
        height: 25px;
    }

    .mast-dock__panel {
        width: calc(100vw - 26px);
        bottom: calc(var(--mast-dock-height) + 8px);
    }

    .mast-dock__card {
        padding: 20px 17px;
        border-radius: 21px;
    }

    .mast-dock__heading {
        gap: 11px;
        margin-bottom: 18px;
    }

    .mast-dock__bubble {
        flex: 0 0 54px;
        width: 54px;
        height: 54px;
    }

    .mast-dock__bubble svg {
        width: 27px;
        height: 27px;
    }

    .mast-dock__heading h3 {
        font-size: 17px;
        line-height: 1.25;
        letter-spacing: -.2px;
    }

    .mast-dock__heading p {
        font-size: 12px;
        line-height: 1.4;
    }

    .mast-dock__next {
        width: 31px;
        height: 31px;
        flex-basis: 31px;
        font-size: 25px;
    }

    .mast-dock .mast-dock__cta {
        min-height: 49px;
        padding: 12px 14px;
        border-radius: 12px;
        font-size: 14px;
    }

    .mast-dock__form {
        gap: 9px;
    }

    .mast-dock__form > input,
    .mast-dock__form > select,
    .mast-dock__form .mast-dock__phone {
        height: 44px;
        min-height: 44px;
        font-size: 13px;
    }

    .mast-dock__phone input {
        font-size: 13px;
    }

    .mast-dock__dots {
        margin: 13px 0 5px;
        gap: 11px;
    }

    .mast-dock__dots button {
        width: 10px;
        height: 10px;
    }
}

/* VERY SMALL SCREENS */

@media (max-width: 360px) {

    .mast-dock__nav button {
        font-size: 9px;
    }

    .mast-dock__card {
        padding: 16px 13px;
    }

    .mast-dock__heading h3 {
        font-size: 15px;
    }

    .mast-dock__bubble {
        flex-basis: 48px;
        width: 48px;
        height: 48px;
    }
}

/* REDUCED MOTION */

@media (prefers-reduced-motion: reduce) {

    .mast-dock__panel,
    .mast-dock__card,
    .mast-dock__cta {
        transition: none;
    }
}