/* Floating quick-call widget — site-wide, bottom-right, desktop + mobile.
   Default state is compact (icon only). The .is-expanded modifier shows the
   number; JS adds it on load and removes it after a short delay, and CSS
   :hover/:focus re-expands it on devices that support hover. */

.mkd-child-call-widget {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9990; /* above the SR7 slider, below modals/overlays */

    display: inline-flex;
    align-items: center;
    gap: 10px;

    height: 56px;
    max-width: 56px; /* compact: icon only */
    padding: 0 17px;
    box-sizing: border-box;
    overflow: hidden;

    border-radius: 28px;
    background-color: #c8102e; /* fire-red accent */
    color: #ffffff;
    text-decoration: none;
    white-space: nowrap;

    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
    transition: max-width 0.32s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.mkd-child-call-widget:hover,
.mkd-child-call-widget:focus,
.mkd-child-call-widget:focus-visible,
.mkd-child-call-widget.is-expanded {
    max-width: 320px; /* expanded: room for the number */
    color: #ffffff;
    background-color: #a60d26;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.34);
}

.mkd-child-call-widget__icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    line-height: 0;
}

.mkd-child-call-widget__label {
    flex: 0 0 auto;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.3px;
    /* Fade with the width so text doesn't overflow the pill during the collapse. */
    opacity: 0;
    transition: opacity 0.2s ease;
}

.mkd-child-call-widget:hover .mkd-child-call-widget__label,
.mkd-child-call-widget:focus .mkd-child-call-widget__label,
.mkd-child-call-widget:focus-visible .mkd-child-call-widget__label,
.mkd-child-call-widget.is-expanded .mkd-child-call-widget__label {
    opacity: 1;
}

/* Mobile: nudge in from the edges and shrink slightly. No hover here, so it
   stays compact after the initial reveal and a tap dials immediately. */
@media (max-width: 680px) {
    .mkd-child-call-widget {
        right: 16px;
        bottom: 16px;
        height: 52px;
        max-width: 52px;
        padding: 0 15px;
    }

    .mkd-child-call-widget:hover,
    .mkd-child-call-widget:focus,
    .mkd-child-call-widget:focus-visible,
    .mkd-child-call-widget.is-expanded {
        max-width: 300px;
    }

    .mkd-child-call-widget__label {
        font-size: 16px;
    }
}

/* Respect reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
    .mkd-child-call-widget,
    .mkd-child-call-widget__label {
        transition: none;
    }
}
