/* ==========================================================================
   Gimsh Floating WhatsApp Consultation Widget
   ========================================================================== */

/* Main Container */
.gimsh-wa-widget {
    position: fixed;
    z-index: 999999;
    font-family: inherit;
    -webkit-font-smoothing: antialiased;
    box-sizing: border-box;
}

.gimsh-wa-widget *,
.gimsh-wa-widget *::before,
.gimsh-wa-widget *::after {
    box-sizing: border-box;
}

/* Global HTML & Body base protection to eliminate bottom white gap under footer */
html {
    background-color: #384028 !important;
}

body:not(.single-product) {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* Hide widget completely on single product page */
.single-product .gimsh-wa-widget,
body.single-product #gimsh-wa-widget {
    display: none !important;
}

/* Position: Left side on Desktop & Mobile */
.gimsh-wa-widget,
.gimsh-wa-widget.gimsh-wa-pos-left,
.gimsh-wa-widget.gimsh-wa-pos-right {
    left: 15px !important;
    right: auto !important;
    bottom: 15px !important;
    max-width: calc(100vw - 30px) !important;
}

/* --------------------------------------------------------------------------
   Desktop Pill Button (Image 1)
   -------------------------------------------------------------------------- */
.gimsh-wa-desktop-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: #1fae5a;
    color: #ffffff !important;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 10px 22px;
    border-radius: 999px;
    box-shadow: 0 4px 18px rgba(31, 174, 90, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
}

.gimsh-wa-desktop-pill:hover {
    background-color: #19944c;
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(25, 148, 76, 0.5);
}

.gimsh-wa-desktop-pill:active {
    transform: translateY(0);
}

.gimsh-wa-pill-text {
    color: #ffffff;
    white-space: nowrap;
    letter-spacing: -0.2px;
}

.gimsh-wa-pill-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 20px;
    line-height: 1;
}

.gimsh-wa-pill-icon i {
    font-size: 20px;
    line-height: 1;
    color: #ffffff;
}

/* Hide Mobile circle on Desktop */
.gimsh-wa-mobile-circle {
    display: none;
}

/* --------------------------------------------------------------------------
   Popup Card / Modal (Desktop & Mobile)
   -------------------------------------------------------------------------- */
.gimsh-wa-card {
    position: absolute;
    bottom: calc(100% + 14px);
    width: 330px;
    max-width: min(320px, calc(100vw - 36px));
    background: #fffdf9;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5dccd;
    z-index: 10;
    animation: gimshWaFadeUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes gimshWaFadeUp {
    0% {
        opacity: 0;
        transform: translateY(12px) scale(0.97);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Align popup card relative to button position */
.gimsh-wa-pos-right .gimsh-wa-card {
    right: 0;
    left: auto;
    text-align: right;
}

.gimsh-wa-pos-left .gimsh-wa-card {
    left: 0;
    right: auto;
    text-align: right;
}

/* Close button */
.gimsh-wa-close-btn {
    position: absolute;
    top: 14px;
    background: transparent;
    border: none;
    font-size: 22px;
    line-height: 1;
    color: #888888;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 50%;
    transition: color 0.15s ease, background 0.15s ease;
}

.gimsh-wa-pos-right .gimsh-wa-close-btn {
    left: 14px;
    right: auto;
}

.gimsh-wa-pos-left .gimsh-wa-close-btn {
    right: 14px;
    left: auto;
}

.gimsh-wa-close-btn:hover {
    color: #222222;
    background: #f4f4f4;
}

/* Card Content Typography */
.gimsh-wa-title {
    margin: 0 0 8px 0 !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    color: #222222 !important;
    line-height: 1.3 !important;
}

.gimsh-wa-desc {
    margin: 0 0 16px 0 !important;
    font-size: 14px !important;
    line-height: 1.55 !important;
    color: #555555 !important;
}

.gimsh-wa-number-row {
    margin: 0 0 18px 0;
    font-size: 14px;
    color: #666666;
    display: flex;
    align-items: center;
    gap: 6px;
}

.gimsh-wa-pos-right .gimsh-wa-number-row {
    justify-content: flex-start;
}

.gimsh-wa-pos-left .gimsh-wa-number-row {
    justify-content: flex-start;
}

.gimsh-wa-number-label {
    font-weight: 500;
}

.gimsh-wa-number-val {
    font-weight: 700;
    color: #222222;
}

/* Green Action Button inside Card */
.gimsh-wa-action-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    width: 100% !important;
    background-color: #1fae5a !important;
    color: #ffffff !important;
    text-decoration: none !important;
    padding: 8px 12px !important;
    border-radius: 9px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    box-shadow: 0 4px 14px rgba(31, 174, 90, 0.35) !important;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease !important;
}

.gimsh-wa-action-btn:hover {
    background-color: #19944c !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 18px rgba(25, 148, 76, 0.45) !important;
}

.gimsh-wa-action-btn .gimsh-wa-icon-fa {
    font-size: 20px;
    line-height: 1;
    color: #ffffff;
}

/* --------------------------------------------------------------------------
   Mobile View (Image 2: <= 768px)
   -------------------------------------------------------------------------- */
/* Mobile View (Image 2: <= 768px) */
@media (max-width: 768px) {
    /* Hide Desktop Pill */
    .gimsh-wa-desktop-pill {
        display: none !important;
    }

    /* Adjust position for mobile: exactly align with the scroll-to-top button on the right */
    .gimsh-wa-widget,
    .gimsh-wa-widget.gimsh-wa-pos-left,
    .gimsh-wa-widget.gimsh-wa-pos-right {
        left: 15px !important;
        right: auto !important;
        bottom: 15px !important;
        max-width: calc(100vw - 30px) !important;
    }

    /* Show Circular Trigger Button (Image 2) - matched to 50px */
    .gimsh-wa-mobile-circle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        background-color: #1fae5a;
        color: #ffffff;
        border: none;
        outline: none;
        cursor: pointer;
        box-shadow: 0 4px 18px rgba(31, 174, 90, 0.45);
        transition: transform 0.2s ease, box-shadow 0.2s ease;
        padding: 0;
        font-size: 26px;
        line-height: 1;
    }

    .gimsh-wa-mobile-circle:active {
        transform: scale(0.92);
    }

    .gimsh-wa-mobile-circle i {
        font-size: 28px;
        line-height: 1;
        color: #ffffff;
    }

    /* Mobile popup card positioning */
    .gimsh-wa-card,
    .gimsh-wa-pos-left .gimsh-wa-card,
    .gimsh-wa-pos-right .gimsh-wa-card {
        left: 0 !important;
        right: auto !important;
        bottom: calc(100% + 12px) !important;
        width: 290px !important;
        max-width: calc(100vw - 40px) !important;
        padding: 20px 18px 18px 18px !important;
        border-radius: 18px !important;
        box-sizing: border-box !important;
    }
}
