/**
 * @author       Zbigniew Stanejko <info@prestashop.cc>
 * @copyright    © 2012-2026 Zbigniew Stanejko, PrestaPremium. All rights reserved.
 * @license      This program is not free software. You may not sell or distribute it.
 * @link         https://prestapremium.com
 * ----------------------------------------------
 * @file         ppquickcontact.css
 * @updated      2026-02-17
 * @description  Front-end styles for the floating quick-contact widget
 * @version      1.0.0
 * ----------------------------------------------
 */

/* -----------------------------------------------
   Container – fixed position, stacks items vertically
   ----------------------------------------------- */
.ppquickcontact-container {
    position: fixed;
    bottom: var(--ppqc-offset, 20px);
    z-index: 99999;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 12px;
    /* Hidden by default – JS adds .ppquickcontact-visible after the delay */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

/* Visible state (set by JS) */
.ppquickcontact-container.ppquickcontact-visible {
    opacity: 1;
    visibility: visible;
}

/* Position variants */
.ppquickcontact-container.ppquickcontact-right {
    right: var(--ppqc-offset, 20px);
}

.ppquickcontact-container.ppquickcontact-left {
    left: var(--ppqc-offset, 20px);
}

/* -----------------------------------------------
   Trigger button (main floating circle)
   ----------------------------------------------- */
.ppquickcontact-trigger {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--ppqc-color, #25D366);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    padding: 0;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.ppquickcontact-trigger:hover,
.ppquickcontact-trigger:focus-visible {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.ppquickcontact-trigger:active {
    transform: scale(0.95);
}

.ppquickcontact-trigger svg {
    width: 28px;
    height: 28px;
    display: block;
}

/* -----------------------------------------------
   Trigger icon toggle (open ↔ close)
   ----------------------------------------------- */
.ppquickcontact-icon-close {
    display: none;
}

.ppquickcontact-container.ppquickcontact-open .ppquickcontact-icon-open {
    display: none;
}

.ppquickcontact-container.ppquickcontact-open .ppquickcontact-icon-close {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* -----------------------------------------------
   Expandable menu (multiple methods)
   ----------------------------------------------- */
.ppquickcontact-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.5) translateY(20px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.ppquickcontact-container.ppquickcontact-open .ppquickcontact-menu {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateY(0);
    pointer-events: all;
}

/* -----------------------------------------------
   Individual method items (inside menu)
   ----------------------------------------------- */
.ppquickcontact-item {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.ppquickcontact-item:hover,
.ppquickcontact-item:focus-visible {
    transform: scale(1.15);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.ppquickcontact-item:active {
    transform: scale(0.95);
}

.ppquickcontact-item svg {
    width: 24px;
    height: 24px;
    display: block;
}

/* Brand colours */
.ppquickcontact-item.ppquickcontact-whatsapp,
a.ppquickcontact-trigger.ppquickcontact-whatsapp {
    background-color: #25D366;
}

.ppquickcontact-item.ppquickcontact-telegram,
a.ppquickcontact-trigger.ppquickcontact-telegram {
    background-color: #0088cc;
}

.ppquickcontact-item.ppquickcontact-phone,
a.ppquickcontact-trigger.ppquickcontact-phone {
    background-color: #34B7F1;
}

/* -----------------------------------------------
   Mobile-only mode – hidden on desktop by default
   ----------------------------------------------- */
.ppquickcontact-container.ppquickcontact-mobile-only {
    display: none;
}

@media (max-width: 767px) {
    .ppquickcontact-container.ppquickcontact-mobile-only {
        display: flex;
    }

    /* Slightly smaller on mobile for less intrusion */
    .ppquickcontact-trigger {
        width: 50px;
        height: 50px;
    }

    .ppquickcontact-trigger svg {
        width: 24px;
        height: 24px;
    }

    .ppquickcontact-item {
        width: 44px;
        height: 44px;
    }

    .ppquickcontact-item svg {
        width: 22px;
        height: 22px;
    }
}

/* -----------------------------------------------
   Pulse animation on the trigger (subtle attention)
   ----------------------------------------------- */
@keyframes ppquickcontact-pulse {
    0%   { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }
    50%  { box-shadow: 0 4px 20px rgba(0, 0, 0, 0.30); }
    100% { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }
}

.ppquickcontact-container.ppquickcontact-visible:not(.ppquickcontact-open) .ppquickcontact-trigger {
    animation: ppquickcontact-pulse 2.5s ease-in-out 3;
}
