/**
 * PG WhatsApp Button - Frontend Styles
 */

.pgwa-button {
    position: fixed;
    z-index: 999998;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    background-color: #25D366;
    color: white !important;
    text-decoration: none !important;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    outline: none;
}

.pgwa-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
    color: white !important;
    text-decoration: none !important;
}

.pgwa-button:focus,
.pgwa-button:active,
.pgwa-button:visited {
    color: white !important;
    text-decoration: none !important;
}

.pgwa-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pgwa-icon {
    width: 28px;
    height: 28px;
    fill: white;
    flex-shrink: 0;
}

.pgwa-button-text {
    color: white;
    white-space: nowrap;
}

/* Icon-only button (round) */
.pgwa-button.pgwa-icon-only {
    width: 60px;
    height: 60px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
}

/* === POSITIONS === */
.pgwa-position-bottom-right {
    bottom: 25px;
    right: 25px;
}

.pgwa-position-bottom-left {
    bottom: 25px;
    left: 25px;
}

.pgwa-position-top-right {
    top: 100px;
    right: 25px;
}

.pgwa-position-top-left {
    top: 100px;
    left: 25px;
}

/* === ANIMATIONS === */
.pgwa-animation-pulse .pgwa-icon-wrap {
    animation: pgwaPulse 2s infinite;
}

@keyframes pgwaPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

.pgwa-animation-shake {
    animation: pgwaShake 3s infinite;
}

@keyframes pgwaShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50% { transform: translateX(-4px); }
    20%, 40%, 60% { transform: translateX(4px); }
    70% { transform: translateX(0); }
}

.pgwa-animation-bounce {
    animation: pgwaBounce 2s infinite;
}

@keyframes pgwaBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.pgwa-animation-ring .pgwa-icon {
    animation: pgwaRing 2s infinite;
    transform-origin: 50% 0;
}

@keyframes pgwaRing {
    0%, 100% { transform: rotate(0); }
    10%, 30%, 50% { transform: rotate(-15deg); }
    20%, 40%, 60% { transform: rotate(15deg); }
    70% { transform: rotate(0); }
}

/* === TOOLTIP === */
.pgwa-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #222;
    color: white;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    margin-bottom: 10px;
    pointer-events: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.pgwa-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #222 transparent transparent transparent;
}

.pgwa-button:hover .pgwa-tooltip {
    opacity: 1;
    visibility: visible;
    margin-bottom: 15px;
}

/* Tooltip position for top buttons */
.pgwa-position-top-right .pgwa-tooltip,
.pgwa-position-top-left .pgwa-tooltip {
    bottom: auto;
    top: 100%;
    margin-bottom: 0;
    margin-top: 10px;
}

.pgwa-position-top-right .pgwa-tooltip::after,
.pgwa-position-top-left .pgwa-tooltip::after {
    top: auto;
    bottom: 100%;
    border-color: transparent transparent #222 transparent;
}

.pgwa-position-top-right .pgwa-button:hover .pgwa-tooltip,
.pgwa-position-top-left .pgwa-button:hover .pgwa-tooltip {
    margin-top: 15px;
}

/* === MOBILE === */
@media (max-width: 768px) {
    .pgwa-button {
        padding: 12px 18px;
        font-size: 14px;
    }
    
    .pgwa-button.pgwa-icon-only {
        width: 55px;
        height: 55px;
    }
    
    .pgwa-icon {
        width: 26px;
        height: 26px;
    }
    
    .pgwa-position-bottom-right,
    .pgwa-position-bottom-left {
        bottom: 20px;
    }
    
    .pgwa-position-bottom-right,
    .pgwa-position-top-right {
        right: 15px;
    }
    
    .pgwa-position-bottom-left,
    .pgwa-position-top-left {
        left: 15px;
    }
}

/* Hide tooltip on mobile */
@media (max-width: 768px) {
    .pgwa-tooltip {
        display: none;
    }
}

/* Print styles - hide button when printing */
@media print {
    .pgwa-button {
        display: none !important;
    }
}
