/**
 * Irish Dance Party floating actions.
 *
 * Translate is intentionally untouched.
 * Desktop: WhatsApp is fixed at the lower-right with a safe edge gap.
 * Mobile: Book Tickets is bottom-centred and WhatsApp sits on the same line.
 */

:root {
    --idp-floating-edge-gap: 24px;
    --idp-book-bg: #ec008c;
    --idp-book-bg-hover: #d90080;
}

.idp-floating-book,
.idp-floating-whatsapp {
    position: fixed;
    z-index: 99990;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* Desktop/tablet: the existing header already contains Book Tickets. */
.idp-floating-book {
    display: none;
}

/* Desktop WhatsApp: fixed lower-right, matching the requested placement. */
.idp-floating-whatsapp {
    top: auto !important;
    bottom: 30px;
    right: 15px;
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    box-shadow: none;
    transform: none;
    cursor: pointer;
    transition: transform 180ms ease, filter 180ms ease;
    text-decoration: none !important;
    overflow: visible;
    /* Keep above Elementor sections/sticky UI; z-index:1 can be covered. */
    z-index: 99990;
}

.idp-floating-whatsapp img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
}

.idp-floating-whatsapp:hover,
.idp-floating-whatsapp:focus-visible {
    transform: scale(1.045);
    filter: brightness(1.03);
}

.idp-floating-whatsapp:focus-visible,
.idp-floating-book:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

/*
 * Mobile layout
 * ---------------------------------------------------------------
 * Translate remains exactly as provided by the translation plugin.
 * Book Tickets: bottom-centred.
 * WhatsApp: same bottom line as Book Tickets + equal right edge gap.
 */
@media only screen and (max-width: 767px) {
    :root {
        --idp-floating-edge-gap: 16px;
    }

    .idp-floating-book {
        left: 50%;
        bottom: calc(var(--idp-floating-edge-gap) + env(safe-area-inset-bottom, 0px));
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 200px;
        letter-spacing: 4px;
        height: 50px;
        min-height: 50px;
        padding: 12px 20px;
        color: #fff !important;
        background: var(--idp-book-bg);
        border: 0;
        border-radius: 12px;
        box-shadow: 0 7px 20px rgba(0, 0, 0, 0.18);
        transform: translateX(-50%);
        font-family: inherit;
        font-size: 14px;
        font-weight: 700;
        line-height: 1;
        text-align: center;
        text-transform: uppercase;
        white-space: nowrap;
        text-decoration: none !important;
        transition: background-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
    }

    .idp-floating-book:hover,
    .idp-floating-book:focus-visible {
        color: #fff !important;
        background: var(--idp-book-bg-hover);
        box-shadow: 0 9px 23px rgba(0, 0, 0, 0.23);
    }

    .idp-floating-book:hover {
        transform: translateX(-50%) translateY(-2px);
    }

    /* Same horizontal line as Book Tickets. Inline desktop top values are
       neutralised here so sticky/Translate detection cannot move it. */
    .idp-floating-whatsapp {
        top: auto !important;
        right: calc(var(--idp-floating-edge-gap) + env(safe-area-inset-right, 0px));
        bottom: calc(var(--idp-floating-edge-gap) + env(safe-area-inset-bottom, 0px));
        width: 50px;
        height: 50px;
        transform: none;
    }

    .idp-floating-whatsapp:hover,
    .idp-floating-whatsapp:focus-visible {
        transform: scale(1.045);
    }
}

@media (prefers-reduced-motion: reduce) {
    .idp-floating-book,
    .idp-floating-whatsapp {
        transition: none;
    }
}
