/* ------------------------------------------------------------------
   Sticky call / WhatsApp contact buttons
   Markup: themes/2016/views/layouts/_contact_buttons.php
   Toggle: Helpers::CONTACT_BUTTONS_ENABLED

   Kept in its own file rather than styles.css, which is cache-busted by a
   hand-incremented version in main.php - putting these rules there would
   mean remembering to bump that number or returning visitors see unstyled
   buttons.
   ------------------------------------------------------------------ */

.nx-contact {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 1030; /* above page content, below Bootstrap modals (1040+) */
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

/* Spacing via margin rather than flex gap: gap has patchy support in older
   mobile browsers, and using both together double-spaced the buttons. */
.nx-contact > * + * {
    margin-top: 10px;
}

.nx-contact__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 46px;
    height: 46px;
    padding: 0;
    border-radius: 23px;
    color: #fff;
    text-decoration: none;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
    transition: transform .15s ease, box-shadow .15s ease;
}

.nx-contact__btn:hover,
.nx-contact__btn:focus {
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .38);
}

.nx-contact__btn:focus {
    outline: 3px solid #fff;
    outline-offset: 2px;
}

.nx-contact__icon {
    font-size: 22px;
    line-height: 1;
}

.nx-contact__btn--wa   { background: #25d366; }   /* WhatsApp brand green */
.nx-contact__btn--call { background: #9c39d6; }   /* Nexus purple */

/* Icons only at every size. The text stays in the markup but is never shown;
   the anchors carry aria-label, so screen readers are covered. */
.nx-contact__label {
    display: none;
}

/* ---- Small phones ------------------------------------------------ */
@media (max-width: 400px) {
    .nx-contact {
        right: 12px;
        bottom: 12px;
    }

    /* 44px is the minimum comfortable tap target - do not go below this. */
    .nx-contact__btn {
        width: 44px;
        height: 44px;
        border-radius: 22px;
    }

    .nx-contact__icon {
        font-size: 21px;
    }
}

/* ---- Respect reduced-motion preferences -------------------------- */
@media (prefers-reduced-motion: reduce) {
    .nx-contact__btn,
    .nx-contact__btn:hover,
    .nx-contact__btn:focus {
        transition: none;
        transform: none;
    }
}

/* ---- Never print these ------------------------------------------- */
@media print {
    .nx-contact {
        display: none !important;
    }
}
