/* ==========================================================================
   Signx - Integrated Studios: Luxury Hover WhatsApp Widget & Redirection Engine
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Floating Container & Position Setup
   -------------------------------------------------------------------------- */
.signx-wa-container {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 9996;
    font-family: inherit;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

/* Back to top offset to prevent collision */
#back-to-top.show {
    bottom: 104px !important;
    right: 36px !important;
    z-index: 9994 !important;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

/* --------------------------------------------------------------------------
   2. Floating WhatsApp Trigger Button
   -------------------------------------------------------------------------- */
.signx-wa-btn-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.signx-wa-btn {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #ffffff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.42), 0 4px 10px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    text-decoration: none !important;
    position: relative;
    border: none;
    outline: none;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease;
    z-index: 3;
}

.signx-wa-btn:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 14px 30px rgba(37, 211, 102, 0.55), 0 6px 14px rgba(0, 0, 0, 0.22);
}

.signx-wa-btn svg,
.signx-wa-btn i {
    width: 32px;
    height: 32px;
    fill: #ffffff;
    font-size: 32px;
    line-height: 1;
    transition: transform 0.3s ease;
}

.signx-wa-btn:hover svg,
.signx-wa-btn:hover i {
    transform: scale(1.08) rotate(4deg);
}

/* Animated Radar Pulse */
.signx-wa-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: transparent;
    pointer-events: none;
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    animation: signxWaPulse 2.4s infinite cubic-bezier(0.66, 0, 0, 1);
    z-index: 1;
}

@keyframes signxWaPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.75);
    }
    70% {
        box-shadow: 0 0 0 18px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Green Live Online Dot */
.signx-wa-status-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background-color: #4ade80;
    border: 2.5px solid #ffffff;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.8);
    z-index: 4;
}

/* --------------------------------------------------------------------------
   3. Floating Quick Pill Tooltip
   -------------------------------------------------------------------------- */
.signx-wa-pill {
    position: absolute;
    right: 76px;
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    background: #0f131a;
    color: #f1f5f9;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 13.5px;
    font-weight: 500;
    letter-spacing: 0.2px;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(197, 168, 128, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 8px;
}

.signx-wa-pill::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px 0 6px 6px;
    border-style: solid;
    border-color: transparent transparent transparent #0f131a;
}

.signx-wa-container:hover .signx-wa-pill {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

.signx-wa-container.card-active .signx-wa-pill,
.signx-wa-container:hover.card-open .signx-wa-pill {
    opacity: 0 !important;
    visibility: hidden !important;
}

/* --------------------------------------------------------------------------
   4. Luxury Glassmorphic Chat Hover Card
   -------------------------------------------------------------------------- */
.signx-wa-card {
    position: absolute;
    bottom: 78px;
    right: 0;
    width: 360px;
    max-width: calc(100vw - 36px);
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25), 0 5px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.08);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px) scale(0.95);
    transform-origin: bottom right;
    transition: opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), 
                visibility 0.32s;
    pointer-events: none;
    z-index: 10;
}

/* Reveal card on hover or when triggered */
.signx-wa-container:hover .signx-wa-card,
.signx-wa-container.card-active .signx-wa-card {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* When dismissed explicitly by user */
.signx-wa-container.card-dismissed .signx-wa-card {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(16px) scale(0.95) !important;
    pointer-events: none !important;
}

/* Card Header */
.signx-wa-card-header {
    background: linear-gradient(135deg, #075E54 0%, #128C7E 100%);
    padding: 18px 20px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.signx-wa-brand-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.signx-wa-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.signx-wa-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.signx-wa-brand-text h5 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff !important;
    line-height: 1.25;
}

.signx-wa-status-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.88);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.signx-wa-status-text .dot {
    width: 7px;
    height: 7px;
    background-color: #25D366;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 6px #25D366;
}

.signx-wa-close-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #ffffff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s ease, transform 0.2s ease;
    outline: none;
}

.signx-wa-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Card Body */
.signx-wa-card-body {
    padding: 20px;
    background: #f8fafc;
    background-image: radial-gradient(rgba(0,0,0,0.03) 1px, transparent 1px);
    background-size: 12px 12px;
}

.signx-wa-bubble {
    background: #ffffff;
    padding: 14px 16px;
    border-radius: 14px;
    border-top-left-radius: 4px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 16px;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.signx-wa-bubble p {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.5;
    color: #334155;
}

.signx-wa-bubble-time {
    font-size: 11px;
    color: #94a3b8;
    text-align: right;
    margin-top: 6px;
}

/* Quick Inquiry Action Chips */
.signx-wa-chips-label {
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    margin-bottom: 10px;
}

.signx-wa-chips {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.signx-wa-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 13px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    color: #1e293b;
    font-size: 12.5px;
    font-weight: 500;
    text-decoration: none !important;
    transition: all 0.22s ease;
    cursor: pointer;
}

.signx-wa-chip:hover {
    background: #f1f5f9;
    border-color: #25D366;
    color: #075E54;
    transform: translateX(3px);
}

.signx-wa-chip i.arrow {
    font-size: 12px;
    color: #94a3b8;
    transition: transform 0.2s ease, color 0.2s ease;
}

.signx-wa-chip:hover i.arrow {
    color: #25D366;
    transform: translateX(2px);
}

/* Primary Direct CTA Button */
.signx-wa-card-footer {
    padding: 0 20px 20px 20px;
    background: #f8fafc;
}

.signx-wa-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 18px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.2px;
    border-radius: 12px;
    text-decoration: none !important;
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.35);
    transition: all 0.25s ease;
}

.signx-wa-cta-btn:hover {
    background: linear-gradient(135deg, #1ebd5d 0%, #0e7065 100%);
    box-shadow: 0 8px 22px rgba(37, 211, 102, 0.5);
    transform: translateY(-1px);
    color: #ffffff !important;
}

.signx-wa-cta-btn svg {
    width: 19px;
    height: 19px;
    fill: #ffffff;
}

/* --------------------------------------------------------------------------
   5. Dark Scheme Integration (Theme Synchronized)
   -------------------------------------------------------------------------- */
.dark-scheme .signx-wa-pill {
    background: #161b24;
    color: #f1f5f9;
    border-color: rgba(197, 168, 128, 0.4);
}

.dark-scheme .signx-wa-pill::after {
    border-color: transparent transparent transparent #161b24;
}

.dark-scheme .signx-wa-card {
    background: #151921;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.55), 0 5px 15px rgba(0, 0, 0, 0.3);
}

.dark-scheme .signx-wa-card-body,
.dark-scheme .signx-wa-card-footer {
    background: #11141b;
    background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
}

.dark-scheme .signx-wa-bubble {
    background: #1a202c;
    border-color: rgba(255, 255, 255, 0.08);
}

.dark-scheme .signx-wa-bubble p {
    color: #e2e8f0;
}

.dark-scheme .signx-wa-bubble-time {
    color: #64748b;
}

.dark-scheme .signx-wa-chips-label {
    color: #94a3b8;
}

.dark-scheme .signx-wa-chip {
    background: #1a202c;
    border-color: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
}

.dark-scheme .signx-wa-chip:hover {
    background: #232b3b;
    border-color: #25D366;
    color: #4ade80;
}

.dark-scheme .signx-wa-chip i.arrow {
    color: #64748b;
}

.dark-scheme .signx-wa-chip:hover i.arrow {
    color: #4ade80;
}

/* --------------------------------------------------------------------------
   6. Mobile Responsive Adjustments
   -------------------------------------------------------------------------- */
@media (max-width: 576px) {
    .signx-wa-container {
        bottom: 20px;
        right: 18px;
    }

    .signx-wa-btn {
        width: 54px;
        height: 54px;
    }

    .signx-wa-btn svg,
    .signx-wa-btn i {
        width: 28px;
        height: 28px;
        font-size: 28px;
    }

    .signx-wa-pill {
        display: none !important;
    }

    .signx-wa-card {
        bottom: 68px;
        width: calc(100vw - 36px);
        right: 0;
    }

    #back-to-top.show {
        bottom: 86px !important;
        right: 22px !important;
    }
}
