/*
 * 2026 ALCALINK E-COMMERCE & SEO, S.L.L.
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/osl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 *
 * @author    ALCALINK E-COMMERCE & SEO, S.L.L. <info@alcalink.com>
 * @copyright 2026 ALCALINK E-COMMERCE & SEO, S.L.L.
 * @license   http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 *
 * Registered Trademark & Property of ALCALINK E-COMMERCE & SEO, S.L.L.
 */

/* ─── CSS Custom Properties ─── */

.alcawhatsapp-hook {
    --alcawhatsapp-width: 250px;
    --alcawhatsapp-height: 30px;
    --alcawhatsapp-icon-size: 14px;
    --alcawhatsapp-img-width: 30px;
    --alcawhatsapp-img-height: 30px;
    --alcawhatsapp-color-icon: #0cb000;
    --alcawhatsapp-color-tlf: #666666;
    --alcawhatsapp-color-txt: #666666;
    --alcawhatsapp-font-size: 14px;
}

/* ─── WCAG Accessibility Base ─── */

.alcawhatsapp-hook button:focus-visible,
.alcawhatsapp-hook a:focus-visible,
.alcawhatsapp-hook [tabindex]:focus-visible,
#alcawhatsapp_all button:focus-visible,
#alcawhatsapp_all a:focus-visible,
#alcawhatsapp_all [tabindex]:focus-visible {
    outline: 2px solid #0cb000;
    outline-offset: 2px;
}

.alcawhatsapp-hook .alcaw_mobile_button,
#alcawhatsapp_all .alcaw_mobile_button {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ─── Screen reader only ─── */

.alcawhatsapp-sr-only,
#alcawhatsapp_all .alcawhatsapp-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ═══════════════════════════════════════════════════════════════
   HOOK LAYOUTS — pos_nav, pos_footer, pos_dleftcol, etc.
   ═══════════════════════════════════════════════════════════════ */

.alcawhatsapp-hook {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
    font-family: inherit;
    line-height: 1.4;
}

.alcawhatsapp-hook__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.alcawhatsapp-hook__logo--icon {
    color: var(--alcawhatsapp-color-icon);
    font-size: var(--alcawhatsapp-icon-size);
    line-height: 1;
}

.alcawhatsapp-hook__logo--image {
    width: var(--alcawhatsapp-img-width);
    height: var(--alcawhatsapp-img-height);
    object-fit: contain;
}

.alcawhatsapp-hook__body {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    min-width: 0;
}

.alcawhatsapp-hook__text {
    color: var(--alcawhatsapp-color-txt);
    font-size: var(--alcawhatsapp-font-size);
    display: block;
}

.alcawhatsapp-hook__link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: var(--alcawhatsapp-color-tlf);
    font-size: var(--alcawhatsapp-font-size);
    transition: opacity 0.2s ease;
}

.alcawhatsapp-hook__link:hover,
.alcawhatsapp-hook__link:focus-visible {
    opacity: 0.8;
    text-decoration: none;
}

.alcawhatsapp-hook__phone {
    color: var(--alcawhatsapp-color-tlf);
    font-size: var(--alcawhatsapp-font-size);
}

.alcawhatsapp-hook__button {
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    font-family: inherit;
}

.alcawhatsapp-hook__desktop-link {
    display: inline-flex;
    align-items: center;
}

/* ─── Visibility helpers (BEM-style, scoped) ─── */

.alcawhatsapp-show-md-up {
    display: none;
}

.alcawhatsapp-show-sm-down {
    display: inline-flex;
    align-items: center;
}

@media (min-width: 992px) {
    .alcawhatsapp-show-md-up {
        display: inline-flex;
        align-items: center;
    }

    .alcawhatsapp-show-sm-down {
        display: none;
    }
}

/* ─── Mobile steps buttons ─── */

.alcaw_mobile_buttons {
    margin-bottom: 12px;
    clear: both;
}

.alcaw_mobile_buttons__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #fff !important;
    background: #25d366 !important;
    padding: 10px 16px;
    border-radius: 4px;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s ease;
}

.alcaw_mobile_buttons__link:hover,
.alcaw_mobile_buttons__link:focus-visible {
    background: #128c7e !important;
    text-decoration: none !important;
}

.alcaw_mobile_button {
    padding: 0;
    border: none;
    background: transparent;
    outline: none;
    cursor: pointer;
}

/* ─── Per-hook overrides ─── */

.alcawhatsapp-hook--pos_nav {
    margin-top: 0;
    margin-bottom: 8px;
}

.alcawhatsapp-hook--pos_nav .alcawhatsapp-hook__icon {
    margin-right: 4px;
}

.alcawhatsapp-hook--pos_footer {
    margin-top: 16px;
    margin-bottom: 16px;
}

.alcawhatsapp-hook--pos_dtop {
    margin-top: 8px;
    margin-bottom: 8px;
}

.alcawhatsapp-hook--pos_dleftcol,
.alcawhatsapp-hook--pos_drightcol {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.alcawhatsapp-hook--pos_dleftcol .alcawhatsapp-hook__body,
.alcawhatsapp-hook--pos_drightcol .alcawhatsapp-hook__body {
    flex-direction: column;
    align-items: flex-start;
}

.alcawhatsapp-hook--pos_dleftpro,
.alcawhatsapp-hook--pos_drightpro {
    margin-top: 10px;
    margin-bottom: 10px;
}

/* ═══════════════════════════════════════════════════════════════
   FLOAT VERSION — only .alcawhatsapp_aux, NOT hooks
   ═══════════════════════════════════════════════════════════════ */

#alcawhatsapp_all.alcawhatsapp_aux.all,
#alcawhatsapp_all.alcawhatsapp_aux.onlydesktop {
    display: block;
    position: fixed;
    text-decoration: none;
    z-index: 9999;
    bottom: 10px;
}

#alcawhatsapp_all.alcawhatsapp_aux.derecha {
    right: 5px;
}

#alcawhatsapp_all.alcawhatsapp_aux.izquierda {
    left: 5px;
}

#alcawhatsapp_all.alcawhatsapp_aux.all .alcawhatsapp_content,
#alcawhatsapp_all.alcawhatsapp_aux.onlydesktop .alcawhatsapp_content {
    text-align: center;
    vertical-align: middle;
    margin-bottom: 0;
}

#alcawhatsapp_all.alcawhatsapp_aux.onlymobile {
    display: none;
}

/* ─── Sonar animation ─── */

#alcawhatsapp_all .alcawhatsapp_content .sonar:before {
    background: transparent;
    border: 4px solid #4fc862;
    content: "";
    height: 91px;
    left: -15px;
    filter: alpha(opacity=0);
    opacity: 0;
    position: absolute;
    top: -18px;
    width: 91px;
    z-index: 1;
    border-radius: 50%;
    -webkit-animation: sonar 1s ease-out infinite;
    -moz-animation: sonar 1s ease-out infinite;
    animation: sonar 1s ease-out infinite;
}

@-webkit-keyframes sonar {
    from { -webkit-transform: scale(0); opacity: 1; }
    to { -webkit-transform: scale(1); opacity: 0; }
}

@-moz-keyframes sonar {
    from { -moz-transform: scale(0); opacity: 1; }
    to { -moz-transform: scale(1); opacity: 0; }
}

@keyframes sonar {
    from { transform: scale(0); opacity: 1; }
    to { transform: scale(1); opacity: 0; }
}

/* ─── Float responsive ─── */

@media screen and (min-width: 768px) {
    #alcawhatsapp_all.alcawhatsapp_aux.mobileon {
        display: none;
    }
}

@media screen and (max-width: 768px) {
    #alcawhatsapp_all.alcawhatsapp_aux.onlymobile {
        display: block;
        position: fixed;
        text-decoration: none;
        z-index: 9999;
        bottom: 10px;
    }

    #alcawhatsapp_all.alcawhatsapp_aux.onlydesktop {
        display: none;
    }

    #alcawhatsapp_all .alcawhatsapp_content {
        text-align: center;
        vertical-align: middle;
        margin-bottom: 0;
    }
}