/*
 * QARAR B2B — Contact Dock Bottom-Left V3
 * Desktop: compact vertical icons at bottom-left.
 * Mobile: compact horizontal row at bottom-left.
 * No outer white dock background.
 */

.floating-dock {
    position: fixed !important;
    z-index: 999 !important;

    left: 12px !important;
    right: auto !important;
    bottom: 18px !important;
    top: auto !important;

    transform: none !important;

    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;

    padding: 0 !important;
    margin: 0 !important;

    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;

    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;

    pointer-events: none !important;
}

.floating-dock--right,
.floating-dock--left {
    left: 12px !important;
    right: auto !important;
}

/* Only WhatsApp + Call */
.floating-dock .floating-action {
    display: none !important;
}

.floating-dock .floating-action--whatsapp,
.floating-dock .floating-action--call {
    display: inline-flex !important;
}

.floating-action,
.floating-dock--expanded .floating-action {
    position: relative !important;

    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;

    padding: 0 !important;
    margin: 0 !important;

    align-items: center !important;
    justify-content: center !important;

    border: 0 !important;
    border-radius: 7px !important;

    color: #fff !important;
    text-decoration: none !important;

    box-shadow: 0 4px 10px rgba(0,0,0,.12) !important;
    pointer-events: auto !important;

    transition:
        transform .16s ease,
        filter .16s ease,
        box-shadow .16s ease !important;
}

.floating-action__label {
    display: none !important;
}

/* WhatsApp */
.floating-action--whatsapp {
    background: #00d45a !important;
}

.floating-action--whatsapp::before,
.floating-action--whatsapp::after {
    display: none !important;
}

.floating-action__whatsapp-icon {
    width: 20px !important;
    height: 20px !important;
    display: block !important;
    color: #fff !important;
}

/* Phone — QARAR red */
.floating-action--call {
    background: #c9091d !important;
}

.floating-action__call-icon {
    width: 18px !important;
    height: 18px !important;
    display: block !important;
    color: #fff !important;
}

@media (hover: hover) and (pointer: fine) {
    .floating-action--whatsapp:hover,
    .floating-action--call:hover {
        transform: translateY(-2px) scale(1.03) !important;
        filter: brightness(.96);
        box-shadow: 0 6px 14px rgba(0,0,0,.15) !important;
    }
}

/* Mobile — small horizontal contact row like the reference */
@media (max-width: 767px) {
    .floating-dock,
    .floating-dock--right,
    .floating-dock--left {
        left: 7px !important;
        right: auto !important;
        bottom: calc(7px + env(safe-area-inset-bottom, 0px)) !important;
        top: auto !important;

        flex-direction: row !important;
        align-items: center !important;
        gap: 4px !important;

        padding: 0 !important;
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
    }

    .floating-action,
    .floating-dock--expanded .floating-action {
        width: 31px !important;
        min-width: 31px !important;
        height: 31px !important;
        min-height: 31px !important;

        border-radius: 5px !important;
        box-shadow: 0 3px 8px rgba(0,0,0,.12) !important;
    }

    .floating-action__whatsapp-icon {
        width: 17px !important;
        height: 17px !important;
    }

    .floating-action__call-icon {
        width: 15px !important;
        height: 15px !important;
    }
}

/* Extra-small phones */
@media (max-width: 360px) {
    .floating-dock,
    .floating-dock--right,
    .floating-dock--left {
        left: 5px !important;
        bottom: calc(5px + env(safe-area-inset-bottom, 0px)) !important;
    }

    .floating-action,
    .floating-dock--expanded .floating-action {
        width: 29px !important;
        min-width: 29px !important;
        height: 29px !important;
        min-height: 29px !important;
    }

    .floating-action__whatsapp-icon {
        width: 16px !important;
        height: 16px !important;
    }

    .floating-action__call-icon {
        width: 14px !important;
        height: 14px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .floating-action {
        transition: none !important;
    }
}


/* Hidden on desktop; mobile section below turns it on. */
.floating-action__mobile-label {
    display: none !important;
}


/* =========================================================
   QARAR — Enjaz-style Mobile Bottom Contact Bar V4
   Mobile only.
   Small red Call button + wide green WhatsApp button.
   ========================================================= */
@media (max-width: 767px) {

    .floating-dock,
    .floating-dock--right,
    .floating-dock--left {
        position: fixed !important;
        z-index: 999 !important;

        left: 7px !important;
        right: auto !important;
        bottom: calc(7px + env(safe-area-inset-bottom, 0px)) !important;
        top: auto !important;

        width: min(238px, calc(100vw - 14px)) !important;
        height: 36px !important;

        display: grid !important;
        grid-template-columns: 36px minmax(0, 1fr) !important;
        grid-template-rows: 36px !important;
        gap: 5px !important;
        align-items: stretch !important;

        direction: ltr !important;
        transform: none !important;

        padding: 0 !important;
        margin: 0 !important;

        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;

        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;

        pointer-events: none !important;
    }

    /* Only these two actions are part of the mobile bar. */
    .floating-dock .floating-action {
        display: none !important;
    }

    .floating-dock .floating-action--call,
    .floating-dock .floating-action--whatsapp {
        display: inline-flex !important;
        position: relative !important;

        height: 36px !important;
        min-height: 36px !important;

        margin: 0 !important;
        padding: 0 !important;

        border: 0 !important;
        border-radius: 6px !important;

        color: #fff !important;
        text-decoration: none !important;

        box-shadow: 0 2px 7px rgba(0, 0, 0, .13) !important;
        pointer-events: auto !important;

        transform: none !important;
    }

    /* Small left call button. */
    .floating-dock .floating-action--call {
        grid-column: 1 !important;
        grid-row: 1 !important;

        width: 36px !important;
        min-width: 36px !important;

        align-items: center !important;
        justify-content: center !important;

        background: #c9091d !important;
    }

    .floating-action__call-icon {
        width: 17px !important;
        height: 17px !important;
        display: block !important;
        color: #fff !important;
    }

    /* Wide right WhatsApp button, like the Enjaz mobile action strip. */
    .floating-dock .floating-action--whatsapp {
        grid-column: 2 !important;
        grid-row: 1 !important;

        width: 100% !important;
        min-width: 0 !important;

        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;

        padding-inline: 14px !important;

        background: #00d45a !important;
        direction: rtl !important;
    }

    .floating-action--whatsapp::before,
    .floating-action--whatsapp::after {
        display: none !important;
        content: none !important;
    }

    .floating-action__whatsapp-icon {
        flex: 0 0 auto !important;
        width: 17px !important;
        height: 17px !important;
        display: block !important;
        color: #fff !important;
    }

    .floating-action__mobile-label {
        display: inline-block !important;

        color: #fff !important;
        font-family: "Cairo", Arial, sans-serif !important;
        font-size: 11px !important;
        font-weight: 700 !important;
        line-height: 1 !important;

        white-space: nowrap !important;
    }

    /* Do not show the old optional expanded label on mobile. */
    .floating-action__label {
        display: none !important;
    }
}

/* Very small phones */
@media (max-width: 360px) {

    .floating-dock,
    .floating-dock--right,
    .floating-dock--left {
        left: 5px !important;
        bottom: calc(5px + env(safe-area-inset-bottom, 0px)) !important;

        width: min(218px, calc(100vw - 10px)) !important;
        height: 34px !important;

        grid-template-columns: 34px minmax(0, 1fr) !important;
        grid-template-rows: 34px !important;
        gap: 4px !important;
    }

    .floating-dock .floating-action--call,
    .floating-dock .floating-action--whatsapp {
        height: 34px !important;
        min-height: 34px !important;
        border-radius: 5px !important;
    }

    .floating-dock .floating-action--call {
        width: 34px !important;
        min-width: 34px !important;
    }

    .floating-action__call-icon,
    .floating-action__whatsapp-icon {
        width: 16px !important;
        height: 16px !important;
    }

    .floating-action__mobile-label {
        font-size: 10.5px !important;
    }
}


/* =========================================================
   QARAR — Mobile Full-Width Equal Contact Bar V5
   50% Call + 50% WhatsApp
   ========================================================= */
@media (max-width: 767px) {

    .floating-dock,
    .floating-dock--right,
    .floating-dock--left {
        position: fixed !important;
        z-index: 9999 !important;

        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        top: auto !important;

        width: 100vw !important;
        max-width: none !important;
        height: 44px !important;

        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        grid-template-rows: 44px !important;
        gap: 0 !important;

        padding: 0 !important;
        margin: 0 !important;

        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;

        transform: none !important;
        direction: ltr !important;

        pointer-events: none !important;
    }

    .floating-dock .floating-action {
        display: none !important;
    }

    .floating-dock .floating-action--call,
    .floating-dock .floating-action--whatsapp {
        display: flex !important;

        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;

        height: 44px !important;
        min-height: 44px !important;

        padding: 0 12px !important;
        margin: 0 !important;

        align-items: center !important;
        justify-content: center !important;
        gap: 7px !important;

        border: 0 !important;
        border-radius: 0 !important;

        color: #fff !important;
        box-shadow: none !important;

        direction: rtl !important;
        pointer-events: auto !important;
        transform: none !important;
    }

    .floating-dock .floating-action--call {
        grid-column: 1 !important;
        grid-row: 1 !important;
        background: #c9091d !important;
    }

    .floating-dock .floating-action--whatsapp {
        grid-column: 2 !important;
        grid-row: 1 !important;
        background: #00d45a !important;
    }

    .floating-action__mobile-label {
        display: inline-block !important;

        color: #fff !important;
        font-family: "Cairo", Arial, sans-serif !important;
        font-size: 11px !important;
        font-weight: 700 !important;
        line-height: 1 !important;

        white-space: nowrap !important;
    }

    .floating-action__label {
        display: none !important;
    }

    .floating-action__call-icon,
    .floating-action__whatsapp-icon {
        flex: 0 0 auto !important;
        width: 17px !important;
        height: 17px !important;
        color: #fff !important;
    }

    .floating-action--whatsapp::before,
    .floating-action--whatsapp::after {
        display: none !important;
        content: none !important;
    }

    /* Keep page content accessible above the fixed bar. */
    body.public-page {
        padding-bottom: calc(44px + env(safe-area-inset-bottom, 0px)) !important;
    }
}

/* Very small phones keep the SAME equal 50/50 layout */
@media (max-width: 360px) {

    .floating-dock,
    .floating-dock--right,
    .floating-dock--left {
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;

        width: 100vw !important;
        height: 42px !important;

        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        grid-template-rows: 42px !important;
        gap: 0 !important;
    }

    .floating-dock .floating-action--call,
    .floating-dock .floating-action--whatsapp {
        width: 100% !important;
        height: 42px !important;
        min-height: 42px !important;
        padding-inline: 10px !important;
    }

    .floating-action__mobile-label {
        font-size: 10.5px !important;
    }

    .floating-action__call-icon,
    .floating-action__whatsapp-icon {
        width: 16px !important;
        height: 16px !important;
    }

    body.public-page {
        padding-bottom: calc(42px + env(safe-area-inset-bottom, 0px)) !important;
    }
}
