/* Keep both business email addresses readable in their existing columns. */
.contact-methods .contact-email,
.contact-methods .contact-email > span,
.footer-contact,
.footer-contact a {
    min-width: 0;
}

.contact-methods .contact-email > span,
.footer-contact a {
    max-width: 100%;
    overflow-wrap: anywhere;
    white-space: normal;
}

/* Keep the footer credit above the floating action at the end of the page. */
.site-footer {
    padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
}

/* A direct, recognisable contact action on every public page. */
.whatsapp-float {
    --whatsapp-green: #128c4a;
    --whatsapp-ring: #25d366;
    position: fixed;
    right: calc(24px + env(safe-area-inset-right, 0px));
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    z-index: 40;
    display: inline-flex;
    align-items: center;
    min-height: 60px;
    max-width: calc(100vw - 48px);
    border-radius: 40px;
    color: #fff;
    text-decoration: none;
    touch-action: manipulation;
    cursor: pointer;
}

.whatsapp-disc {
    position: relative;
    isolation: isolate;
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    flex: 0 0 60px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--whatsapp-green);
    box-shadow: 0 7px 22px #003c2833, 0 2px 5px #002f511a;
}

.whatsapp-disc::after {
    content: '';
    position: absolute;
    inset: -6px;
    z-index: -1;
    border: 2px solid var(--whatsapp-ring);
    border-radius: inherit;
    opacity: 0;
    pointer-events: none;
}

.whatsapp-float .whatsapp-icon {
    display: block;
    width: 31px;
    height: 31px;
    flex-shrink: 0;
    color: #fff;
    fill: currentColor;
    stroke: none;
}

.whatsapp-float:focus-visible {
    outline: 3px solid var(--blue, #0080c6);
    outline-offset: 6px;
}

@media (prefers-reduced-motion: no-preference) {
    html:not([data-motion="paused"]) .whatsapp-disc::after {
        animation: whatsapp-contact-pulse 6s cubic-bezier(.2, .65, .3, 1) .6s infinite;
    }

    html:not([data-motion="paused"]) .whatsapp-icon {
        animation: whatsapp-icon-lift 6s ease-in-out .6s infinite;
    }

    html:not([data-motion="paused"]) .whatsapp-disc {
        transition: transform 200ms cubic-bezier(.2, .65, .3, 1);
    }

    html:not([data-motion="paused"]) .whatsapp-float:focus .whatsapp-disc::after,
    html:not([data-motion="paused"]) .whatsapp-float:focus .whatsapp-icon {
        animation-play-state: paused;
    }

    html:not([data-motion="paused"]) .whatsapp-float:focus-visible .whatsapp-disc {
        transform: translateY(-3px);
    }

    @media (hover: hover) {
        html:not([data-motion="paused"]) .whatsapp-float:hover .whatsapp-disc {
            transform: translateY(-3px);
        }

        html:not([data-motion="paused"]) .whatsapp-float:hover .whatsapp-disc::after,
        html:not([data-motion="paused"]) .whatsapp-float:hover .whatsapp-icon {
            animation-play-state: paused;
        }
    }

    html:not([data-motion="paused"]) .whatsapp-float:active .whatsapp-disc {
        transform: scale(.96);
    }
}

@keyframes whatsapp-contact-pulse {
    0% { opacity: 0; transform: scale(.94); }
    8% { opacity: .5; }
    30%, 100% { opacity: 0; transform: scale(1.2); }
}

@keyframes whatsapp-icon-lift {
    0%, 8%, 24%, 100% { transform: translateY(0); }
    16% { transform: translateY(-2px); }
}

html[data-motion="paused"] .whatsapp-disc,
html[data-motion="paused"] .whatsapp-icon,
html[data-motion="paused"] .whatsapp-disc::after {
    animation: none;
    transition: none;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .whatsapp-disc,
    .whatsapp-icon,
    .whatsapp-disc::after {
        animation: none;
        transition: none;
        transform: none;
    }
}

@media (max-width: 740px) {
    .footer-main .footer-contact {
        grid-column: 1 / -1;
    }

    .whatsapp-float {
        right: calc(16px + env(safe-area-inset-right, 0px));
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        min-height: 56px;
        max-width: calc(100vw - 32px);
    }

    .whatsapp-disc {
        width: 56px;
        height: 56px;
        flex-basis: 56px;
    }

    .whatsapp-float .whatsapp-icon {
        width: 29px;
        height: 29px;
    }

    /* Leave all space to the enquiry fields while the mobile keyboard is open. */
    body:has(.enquiry-form :focus) .whatsapp-float,
    body.menu-open .whatsapp-float {
        visibility: hidden;
        pointer-events: none;
    }
}

@media print {
    .whatsapp-float { display: none; }
    .site-footer { padding-bottom: 22px; }
}

/* A clear weekly schedule beside the business contact details. */
.business-hours {
    width: 100%;
    max-width: 425px;
    min-width: 0;
    margin-top: 24px;
    padding: 20px;
    border: 1px solid var(--border, #d9e2e8);
    border-left: 3px solid var(--orange, #ff9f46);
    border-radius: 5px;
    background: #fff;
    color: var(--ink, #002f51);
}

.hours-heading {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.6;
    letter-spacing: .08em;
}

.hours-heading > .icon {
    width: 19px;
    height: 19px;
    color: var(--blue, #0080c6);
}

.hours-timezone {
    margin-left: auto;
    padding: 2px 7px;
    border-radius: 3px;
    background: #edf3f7;
    color: #425c6d;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.6;
    letter-spacing: .03em;
    text-decoration: none;
}

.hours-list {
    display: grid;
    gap: 10px;
    margin: 15px 0 0;
    font-size: 14px;
    line-height: 1.6;
}

.hours-list > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 3px 16px;
    min-width: 0;
}

.hours-list dt {
    margin: 0;
    color: #475c6a;
}

.hours-list dd {
    margin: 0;
    font-weight: 600;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.hours-list .hours-closed {
    color: #5c6e7a;
    font-weight: 400;
}

.business-hours-compact {
    margin-top: 10px;
    padding: 17px 0 0;
    border: 0;
    border-top: 1px solid #456580;
    border-radius: 0;
    background: transparent;
    color: #fff;
}

.business-hours-compact .hours-heading {
    font-size: 10px;
}

.business-hours-compact .hours-heading > .icon {
    width: 17px;
    height: 17px;
    color: var(--orange, #ff9f46);
}

.business-hours-compact .hours-timezone {
    background: #ffffff0d;
    color: #c4d5e2;
}

.business-hours-compact .hours-list {
    gap: 8px;
    margin-top: 12px;
    font-size: 12px;
}

.business-hours-compact .hours-list > div {
    gap: 3px 12px;
}

.business-hours-compact .hours-list dt,
.business-hours-compact .hours-list .hours-closed {
    color: #bdcfdd;
}

@media (max-width: 360px) {
    .business-hours:not(.business-hours-compact) {
        padding: 17px 16px;
    }
}
