
/* =========================================
   SENSTECH FLOATING ACTIONS
   WhatsApp + Back to Top
========================================= */


/* =========================================
   1. BACK TO TOP
========================================= */

.back-to-top {
    position: fixed !important;
    right: 24px !important;
    bottom: 158px !important;
    z-index: 1090 !important;

    display: flex !important;
    align-items: center;
    justify-content: center;

    width: 52px;
    height: 52px;
    padding: 0;

    color: #FFFFFF !important;
    background: #0F6A4A !important;
    border: none !important;
    border-radius: 50% !important;

    font-size: 18px;
    cursor: pointer;

    box-shadow: 0 8px 24px rgba(15, 106, 74, 0.25);

    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none;

    transform: translateY(10px);

    transition:
        opacity 0.25s ease,
        visibility 0.25s ease,
        transform 0.25s ease,
        background-color 0.2s ease;
}

.back-to-top.is-visible {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto;
    transform: translateY(0);
}

.back-to-top:hover {
    color: #FFFFFF !important;
    background: #0B543B !important;
    border-radius: 50% !important;
}

.back-to-top:focus-visible {
    outline: 3px solid #A3E635;
    outline-offset: 4px;
}


/* =========================================
   2. WHATSAPP WIDGET CONTAINER
========================================= */

.senstech-wa {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1080;

    width: min(490px, calc(100vw - 32px));
    font-family: "Inter", sans-serif;
}


/* =========================================
   3. WHATSAPP NOTIFICATION CARD
========================================= */

.senstech-wa__card {
    position: relative;

    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) 82px;
    align-items: center;
    gap: 13px;

    padding: 14px;

    color: #1C2922;
    background: #FFFFFF;

    border: 1px solid #D9E2DC;
    border-radius: 16px;

    /* Keep outer corners rounded, including on hover */
    overflow: hidden;
    isolation: isolate;

    box-shadow: 0 12px 35px rgba(17, 38, 27, 0.18);

    transition:
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.senstech-wa__card:hover {
    border-color: #D9E2DC;
    border-radius: 16px;
    box-shadow: 0 14px 38px rgba(17, 38, 27, 0.20);
}

/* Close hides the notification card */

.senstech-wa__card.is-hidden {
    display: none !important;
}


/* =========================================
   4. WHATSAPP ICON
========================================= */

.senstech-wa__icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 52px;
    height: 52px;
    flex-shrink: 0;

    color: #FFFFFF !important;
    background: #25D366;

    border: none;
    border-radius: 50% !important;

    font-size: 29px;
    line-height: 1;
    text-decoration: none;

    transition:
        transform 0.2s ease,
        background-color 0.2s ease;
}

.senstech-wa__icon:hover {
    color: #FFFFFF !important;
    background: #1DB954;
    border-radius: 50% !important;
    transform: scale(1.05);
}

.senstech-wa__icon:focus-visible {
    outline: 2px solid #0F6A4A;
    outline-offset: 3px;
}


/* =========================================
   5. NOTIFICATION CONTENT
========================================= */

.senstech-wa__content {
    min-width: 0;
}

.senstech-wa__content strong {
    display: block;
    margin: 0 0 5px;

    color: #17231C !important;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
}

.senstech-wa__content p {
    margin: 0;

    color: #4B5B51 !important;
    font-family: "Inter", sans-serif;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
}


/* =========================================
   6. CHAT / CLOSE ACTIONS
========================================= */

.senstech-wa__actions {
    display: flex;
    flex-direction: column;
    align-self: stretch;

    min-width: 82px;
    margin: -14px -14px -14px 0;

    border-left: 1px solid #DCE4DE;

    /* Clip hover backgrounds inside the card */
    overflow: hidden;
    border-radius: 0;
}

.senstech-wa__reply,
.senstech-wa__close {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;

    width: 100%;
    min-height: 48px;
    padding: 8px 10px;

    color: #1C2922 !important;
    background: transparent;

    border: none !important;
    border-radius: 0 !important;

    font-family: "Inter", sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;

    cursor: pointer;

    transition:
        color 0.2s ease,
        background-color 0.2s ease;
}

/* Separator between Chat and Close */

.senstech-wa__reply {
    border-bottom: 1px solid #E2E8E3 !important;
}

/* Hover does not create square outer corners */

.senstech-wa__reply:hover,
.senstech-wa__close:hover {
    color: #0F6A4A !important;
    background: #F0F7F2 !important;
    border-radius: 0 !important;
}

/* Keyboard accessibility */

.senstech-wa__reply:focus-visible,
.senstech-wa__close:focus-visible {
    z-index: 2;
    outline: 2px solid #0F6A4A;
    outline-offset: -3px;
}


/* =========================================
   7. COMPACT WHATSAPP BUBBLE
   Visible after notification is closed
========================================= */

.senstech-wa__bubble {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;

    width: fit-content;
    max-width: 100%;
    margin-left: auto;
    padding: 13px 19px;

    color: #FFFFFF !important;
    background: #25D366;

    border: none;
    border-radius: 999px !important;

    font-family: "Inter", sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;

    box-shadow: 0 8px 24px rgba(20, 80, 45, 0.20);

    transition:
        background-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

/* The bubble is the next sibling of the notification */

.senstech-wa__card.is-hidden + .senstech-wa__bubble {
    display: flex;
}

.senstech-wa__bubble i {
    font-size: 22px;
    line-height: 1;
}

.senstech-wa__bubble:hover {
    color: #FFFFFF !important;
    background: #1DB954 !important;
    border-radius: 999px !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(20, 80, 45, 0.24);
}

.senstech-wa__bubble:focus-visible {
    outline: 3px solid #A3E635;
    outline-offset: 4px;
}


/* =========================================
   8. MOBILE RESPONSIVE
========================================= */

@media (max-width: 575.98px) {

    .senstech-wa {
        right: 12px;
        bottom: 12px;
        width: calc(100vw - 24px);
    }

    .senstech-wa__card {
        grid-template-columns: 44px minmax(0, 1fr) 68px;
        gap: 9px;

        padding: 10px;
        border-radius: 13px;
    }

    .senstech-wa__card:hover {
        border-radius: 13px;
    }

    .senstech-wa__icon {
        width: 43px;
        height: 43px;
        font-size: 25px;
    }

    .senstech-wa__content strong {
        margin-bottom: 3px;
        font-size: 13px;
    }

    .senstech-wa__content p {
        font-size: 11.5px;
        line-height: 1.4;
    }

    .senstech-wa__actions {
        min-width: 68px;
        margin: -10px -10px -10px 0;
    }

    .senstech-wa__reply,
    .senstech-wa__close {
        min-height: 44px;
        padding: 6px;
        font-size: 12px;
    }

    .senstech-wa__bubble {
        padding: 12px 17px;
        font-size: 13px;
    }

    .back-to-top {
        right: 16px !important;
        bottom: 126px !important;

        width: 46px;
        height: 46px;
        font-size: 16px;
    }
}


/* =========================================
   9. VERY SMALL SCREENS
========================================= */

@media (max-width: 370px) {

    .senstech-wa__card {
        grid-template-columns: 39px minmax(0, 1fr) 60px;
        gap: 7px;
        padding: 8px;
        border-radius: 12px;
    }

    .senstech-wa__card:hover {
        border-radius: 12px;
    }

    .senstech-wa__icon {
        width: 38px;
        height: 38px;
        font-size: 23px;
    }

    .senstech-wa__content strong {
        font-size: 12px;
    }

    .senstech-wa__content p {
        font-size: 11px;
    }

    .senstech-wa__actions {
        min-width: 60px;
        margin: -8px -8px -8px 0;
    }

    .senstech-wa__reply,
    .senstech-wa__close {
        min-height: 42px;
        padding: 5px;
        font-size: 11px;
    }
}


/* =========================================
   10. REDUCED MOTION
========================================= */

@media (prefers-reduced-motion: reduce) {

    .back-to-top,
    .senstech-wa__card,
    .senstech-wa__icon,
    .senstech-wa__reply,
    .senstech-wa__close,
    .senstech-wa__bubble {
        transition: none !important;
    }
}
