
/* =========================================================
   WhatsApp - General Settings
   ========================================================= */

.esfw-whatsapp-settings-table {
    width: 100%;
    margin-top: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
}
/* =========================================================
   WhatsApp Settings - Responsive Container
   ========================================================= */

.esfw-whatsapp-settings-wrapper {
    container-type: inline-size;
}


/* Setting row */

.esfw-whatsapp-setting-row {
    display: grid;
    grid-template-columns: 52px 220px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
    padding: 22px 20px;
    border-bottom: 1px solid #edf0f4;
}

.esfw-whatsapp-setting-row:last-child {
    border-bottom: none;
}


/* Setting icon */

.esfw-whatsapp-setting-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 14px;
    background: #f4edff;
}

.esfw-whatsapp-setting-icon .dashicons {
    width: 24px;
    height: 24px;
    font-size: 24px;
    color: #7c3aed;
}


/* Setting label */

.esfw-whatsapp-setting-label {
    min-width: 0;
}

.esfw-whatsapp-setting-label label {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    color: #1f2937;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}
/* Input fields */

.esfw-whatsapp-setting-field {
    min-width: 0;
}

.esfw-whatsapp-setting-field input[type="text"],
.esfw-whatsapp-setting-field textarea {
    width: 100%;
    max-width: 100%;
    min-height: 48px;
    box-sizing: border-box;
    margin: 0;
    padding: 12px 15px;
    border: 1px solid #dfe3ea;
    border-radius: 10px;
    background: #ffffff;
    color: #283344;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}


/* Textarea */

.esfw-whatsapp-setting-field textarea {
    min-height: 72px;
    resize: vertical;
}


/* Input focus */

.esfw-whatsapp-setting-field input[type="text"]:focus,
.esfw-whatsapp-setting-field textarea:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.08);
    outline: none;
}


/* Placeholder */

.esfw-whatsapp-setting-field input::placeholder,
.esfw-whatsapp-setting-field textarea::placeholder {
    color: #9aa3b2;
}


/* Radio buttons */

.esfw-whatsapp-radio-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.esfw-whatsapp-radio-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 88px;
    min-height: 42px;
    padding: 0 16px;
    margin: 0;
    border: 1px solid #dfe3ea;
    border-radius: 22px;
    background: #ffffff;
    color: #374151;
    font-size: 13px;
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        color 0.2s ease;
}

.esfw-whatsapp-radio-option:hover {
    border-color: #a78bfa;
}


/* Radio input */

.esfw-whatsapp-radio-option input[type="radio"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #7c3aed;
}


/* Responsive */

@media screen and (max-width: 782px) {

    .esfw-whatsapp-setting-row {
        grid-template-columns: 52px 1fr;
        gap: 15px;
    }

    .esfw-whatsapp-setting-field {
        grid-column: 2;
    }

    .esfw-whatsapp-radio-group {
        flex-wrap: wrap;
    }

}
/* =========================================================
   WhatsApp - Country Code Dropdown
   ========================================================= */

.iti__search-input-wrapper {
    padding: 8px !important;
    border-bottom: 1px solid #eee9f5 !important;
    background: #ffffff !important;
}

.iti__search-input {
    width: 100% !important;
    height: 38px !important;
    box-sizing: border-box !important;

    padding: 8px 36px 8px 38px !important;

    border: 1px solid #ddd6fe !important;
    border-radius: 7px !important;

    background: #ffffff !important;
    color: #333333 !important;

    font-size: 13px !important;
    outline: none !important;

    box-shadow: none !important;
}

.iti__search-input:focus {
    border-color: #7c3aed !important;
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.10) !important;
}

.iti__search-input::placeholder {
    color: #9995a5 !important;
    opacity: 1 !important;
}

.iti__country {
    font-size: 13px !important;
}

.iti__country:hover,
.iti__country.iti__highlight {
    background-color: #f5f0ff !important;
}
/* WhatsApp phone input - match ElevateStore purple focus */

.esfw-whatsapp-setting-field .iti input[type="tel"]:focus {
    border-color: #8b5cf6 !important;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.08) !important;
    outline: none !important;
}
.esfw-whatsapp-setting-field .iti:focus-within {
    border-color: #8b5cf6 !important;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.08) !important;
    border-radius: 10px;
}
/* WhatsApp phone field */

.esfw-whatsapp-setting-field .iti {
    width: 100%;
}

.esfw-whatsapp-setting-field .iti input[type="tel"] {
    width: 100%;
    max-width: 100%;
    height: 48px;
    min-height: 48px;
    box-sizing: border-box;

    margin: 0;
    padding: 12px 15px 12px 90px;

    border: 1px solid #dfe3ea;
    border-radius: 10px;
    background: #ffffff;
    color: #283344;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: none;
    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}
.esfw-whatsapp-icon {
    width: 44px;
    height: 44px;
    display: block;
    object-fit: contain;
}
/* WhatsApp setting icon - light purple background with dark purple icon */
.esfw-whatsapp-setting-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 14px;
    background: #f4edff;
    color: #7c3aed;
}

/* =========================================================
   WhatsApp - Responsive Layout
   ========================================================= */

.esfw-whatsapp-settings-table {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.esfw-whatsapp-setting-row {
    min-width: 0;
}

.esfw-whatsapp-setting-label,
.esfw-whatsapp-setting-field {
    min-width: 0;
}

.esfw-whatsapp-setting-field {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.esfw-whatsapp-setting-field input,
.esfw-whatsapp-setting-field textarea,
.esfw-whatsapp-setting-field select {
    max-width: 100%;
    box-sizing: border-box;
}




/* Mobile */

@media screen and (max-width: 600px) {

    .esfw-whatsapp-setting-row {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 18px 16px;
    }

    .esfw-whatsapp-setting-icon,
    .esfw-whatsapp-setting-label,
    .esfw-whatsapp-setting-field {
        grid-column: 1;
    }

   

    .esfw-whatsapp-setting-field input[type="text"],
    .esfw-whatsapp-setting-field input[type="tel"],
    .esfw-whatsapp-setting-field textarea,
    .esfw-whatsapp-setting-field select {
        width: 100%;
        max-width: 100%;
    }

    .esfw-whatsapp-radio-group {
        flex-wrap: wrap;
    }

    .esfw-whatsapp-icon-preview {
        width: 100%;
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .esfw-whatsapp-icon {
        flex-shrink: 0;
    }

    .esfw-whatsapp-icon-info {
        min-width: 0;
    }

    .esfw-whatsapp-icon-info strong,
    .esfw-whatsapp-icon-info span {
        overflow-wrap: anywhere;
    }
}


/* Very Small Screens */

@media screen and (max-width: 400px) {

    .esfw-whatsapp-setting-row {
        padding: 16px 12px;
    }

    .esfw-whatsapp-icon-preview {
        align-items: flex-start;
    }
}
/* =========================================================
   WhatsApp - Floating Button
   ========================================================= */
 .esfw-whatsapp-widget {
    position: fixed;
    right: 25px;
    bottom: 25px;
    z-index: 99999;
}
.esfw-whatsapp-button {
    min-width: 58px;
    height: 48px;
    padding: 0 14px;

    border: none;
    border-radius: 24px;

    background: #25d366;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    cursor: pointer;

    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.20);

    white-space: nowrap;
    box-sizing: border-box;

    animation: esfw-whatsapp-entrance 0.75s
        cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.esfw-whatsapp-button-icon-only {
    width: 58px;
    min-width: 58px;
    height: 58px;
    padding: 0;

    border-radius: 50%;
    gap: 0;
}
.esfw-whatsapp-button-text {
    display: inline-block;

    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;

    white-space: nowrap;
}

.esfw-whatsapp-button img {
    width: 34px;
    height: 34px;
    display: block;
}
.esfw-whatsapp-button-text {
    display: inline-block;

    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;

    white-space: nowrap;
}

.esfw-whatsapp-button:hover {
    transform: scale(1.05);
}

.esfw-whatsapp-button:focus {
    outline: none;
}
.esfw-whatsapp-position-left {
    left: 25px;
    right: auto;
}

.esfw-whatsapp-position-right {
    right: 25px;
    left: auto;
}
@keyframes esfw-whatsapp-entrance {

    0% {
        opacity: 0;
        transform: translateY(35px) scale(0.65);
    }

    55% {
        opacity: 1;
        transform: translateY(-8px) scale(1.08);
    }

    75% {
        transform: translateY(3px) scale(0.98);
    }

    90% {
        transform: translateY(-2px) scale(1.02);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
/* =========================================================
   WhatsApp Mini Chat Window
   ========================================================= */
.esfw-whatsapp-chat-window {
    position: absolute;
    bottom: 78px;
    width: 380px;
    height: 500px;

    background: #efeae2;
    border-radius: 20px;
    overflow: hidden;

    display: flex;
    flex-direction: column;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translateY(22px) scale(0.94);
    transform-origin: bottom right;

    transition:
        opacity 0.28s ease,
        transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0.28s ease;

    z-index: 100000;
}

.esfw-whatsapp-chat-window.esfw-whatsapp-chat-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}


/* =========================================================
   Header
   ========================================================= */

.esfw-whatsapp-chat-header {
    min-height: 88px;
    padding: 18px 20px;

   background: #25D366;
    color: #ffffff;

    display: flex;
    align-items: center;
    justify-content: space-between;

    box-sizing: border-box;
}

.esfw-whatsapp-chat-brand {
    display: flex;
    align-items: center;
    gap: 13px;
}


/* WhatsApp Logo */

.esfw-whatsapp-chat-logo {
    width: 48px;
    height: 48px;

    flex: 0 0 48px;

    border-radius: 50%;

    background: #ffffff;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.18);
}

.esfw-whatsapp-chat-window.esfw-whatsapp-chat-active
.esfw-whatsapp-chat-logo {
    animation:
        esfw-whatsapp-logo-pop
        0.45s
        cubic-bezier(0.22, 1, 0.36, 1)
        both;
}

@keyframes esfw-whatsapp-logo-pop {

    0% {
        opacity: 0;
        transform: scale(0.65) rotate(-8deg);
    }

    70% {
        opacity: 1;
        transform: scale(1.08) rotate(2deg);
    }

    100% {
        opacity: 1;
        transform: scale(1) rotate(0);
    }
}

.esfw-whatsapp-chat-logo img {
    width: 29px;
    height: 29px;

    display: block;
}


/* =========================================================
   Header Text
   ========================================================= */

.esfw-whatsapp-chat-title {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.esfw-whatsapp-chat-title strong {
    margin: 0;

    font-size: 18px;
    line-height: 1.2;
    font-weight: 700;

    color: #ffffff;
}

.esfw-whatsapp-chat-title span {
    display: flex;
    align-items: center;
    gap: 6px;

    font-size: 12px;
    line-height: 1.3;

    color: rgba(255, 255, 255, 0.90);
}

.esfw-whatsapp-chat-title span i {
    width: 7px;
    height: 7px;

    display: inline-block;

    border-radius: 50%;

    background: #25d366;

    box-shadow:
        0 0 0 3px rgba(37, 211, 102, 0.16);
}


/* =========================================================
   Close Button
   ========================================================= */

.esfw-whatsapp-close-chat {
    width: 38px;
    height: 38px;

    padding: 0 !important;
    margin: 0;

    border: 1px solid rgba(255, 255, 255, 0.28) !important;
    border-radius: 50% !important;

    background: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 25px;
    line-height: 1;

    cursor: pointer;

    box-shadow: none !important;

    transition:
        background 0.2s ease,
        transform 0.25s ease;
}

.esfw-whatsapp-close-chat:hover,
.esfw-whatsapp-close-chat:focus {

    background: rgba(255, 255, 255, 0.18) !important;
    color: #ffffff !important;

    transform: rotate(90deg) scale(1.05);

    outline: none !important;
}

/* =========================================================
   Chat Body - WhatsApp Style Wallpaper
   ========================================================= */
.esfw-whatsapp-chat-body {
    flex: 1;
    padding: 28px 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background-color: #efeae2;
    background-image: url('../images/whatsapp/whatsapp-wallpaper.png');
    background-repeat: repeat;
    background-size: 300px 300px;
    background-position: center;
    overflow-y: auto;
}


/* =========================================================
   WhatsApp Message Bubble
   ========================================================= */

.esfw-whatsapp-welcome {
    width: 100%;

    padding: 13px 15px 10px;

    box-sizing: border-box;

    background: #ffffff;

    border-radius: 8px;

    box-shadow:
        0 1px 1px rgba(0, 0, 0, 0.08);

    position: relative;

    opacity: 0;
    transform: translateY(14px) scale(0.97);
}


/* Message appears after window opens */

.esfw-whatsapp-chat-window.esfw-whatsapp-chat-active
.esfw-whatsapp-welcome {

    animation:
        esfw-whatsapp-message-in
        0.45s
        0.35s
        cubic-bezier(0.22, 1, 0.36, 1)
        forwards;
}

@keyframes esfw-whatsapp-message-in {

    0% {
        opacity: 0;
        transform: translateY(14px) scale(0.97);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* WhatsApp message tail */

.esfw-whatsapp-welcome::after {
    content: "";

    position: absolute;

    left: -6px;
    top: 0;

    width: 12px;
    height: 12px;

    background: #ffffff;

    clip-path: polygon(
        100% 0,
        100% 100%,
        0 0
    );
}


/* =========================================================
   Welcome Label
   ========================================================= */

.esfw-whatsapp-welcome-label {

    display: block;

    margin-bottom: 7px;

    font-size: 14px;
    line-height: 1.4;

    font-weight: 700;

    color: #111b21;
}


/* =========================================================
   Message Text
   ========================================================= */

.esfw-whatsapp-welcome p {

    margin: 0 0 7px;

    font-size: 15px;
    line-height: 1.55;

    font-weight: 400;

    color: #111b21;
}


/* =========================================================
   Message Small Text
   ========================================================= */

.esfw-whatsapp-welcome small {

    display: block;

    font-size: 11px;
    line-height: 1.4;

    color: #667781;

    text-align: right;
}


/* =========================================================
   Footer
   ========================================================= */

.esfw-whatsapp-chat-footer {

    padding: 14px 20px 18px;

    background: #efeae2;

    box-sizing: border-box;
}


/* =========================================================
   Open Chat Button
   ========================================================= */

.esfw-whatsapp-open-chat-button {

    position: relative;

    width: 100%;

    min-height: 54px;

    padding: 0 20px !important;
    margin: 0;

    border: none !important;
    border-radius: 12px !important;

    background: #ffffff !important;
    color: #111827 !important;
    border: 1px solid #e5e7eb !important;


    display: flex;

    align-items: center;
    justify-content: space-between;

    font-size: 15px;
    line-height: 1.2;

    font-weight: 700;

    cursor: pointer;

    overflow: hidden;

    box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.10) !important;

    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease;
}


/* =========================================================
   Button Shine
   ========================================================= */

.esfw-whatsapp-open-chat-button::before {

    content: "";

    position: absolute;

    top: 0;
    left: -120%;

    width: 70%;
    height: 100%;

    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.16),
        transparent
    );

    transform: skewX(-20deg);

    transition: left 0.65s ease;

    pointer-events: none;
}

.esfw-whatsapp-open-chat-button:hover::before {
    left: 130%;
}


/* Button Hover */

.esfw-whatsapp-open-chat-button:hover,
.esfw-whatsapp-open-chat-button:focus,
.esfw-whatsapp-open-chat-button:active {

    background: #f8fafc !important;

    color: #111827 !important;

    border: 1px solid #d1d5db !important;

    outline: none !important;

    transform: translateY(-2px);

    box-shadow:
        0 8px 18px rgba(0, 0, 0, 0.10) !important;
}


/* =========================================================
   WhatsApp → Send Icon Animation
   ========================================================= */

.esfw-whatsapp-action-icon {
    position: relative;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;
  background: #dcfce7;

    overflow: hidden;

    transition:
        transform 0.25s ease,
        background 0.25s ease;
}

.esfw-whatsapp-action-whatsapp {
    width: 22px;
    height: 22px;

    display: block;

    opacity: 1;
    transform: scale(1) rotate(0);

    transition:
        opacity 0.25s ease,
        transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.esfw-whatsapp-action-send {
    position: absolute;

    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #ffffff;
    font-size: 18px;
    line-height: 1;

    opacity: 0;
    transform: translateX(-12px) rotate(-25deg) scale(0.65);

    transition:
        opacity 0.2s ease,
        transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Hover */

.esfw-whatsapp-open-chat-button:hover .esfw-whatsapp-action-icon {
    transform: scale(1.08);
  background: #25D366;
}

.esfw-whatsapp-open-chat-button:hover .esfw-whatsapp-action-whatsapp {
    opacity: 0;
    transform: scale(0.35) rotate(90deg);
}

.esfw-whatsapp-open-chat-button:hover .esfw-whatsapp-action-send {
    opacity: 1;
    transform: translateX(0) rotate(0) scale(1);
}
/* =========================================================
   Position - LEFT
   ========================================================= */

.esfw-whatsapp-position-left {
    left: 25px;
    right: auto;
}

.esfw-whatsapp-position-left
.esfw-whatsapp-chat-window {

    left: 0;
    right: auto;

    transform-origin: bottom left;
}


/* =========================================================
   Position - RIGHT
   ========================================================= */

.esfw-whatsapp-position-right {
    right: 25px;
    left: auto;
}

.esfw-whatsapp-position-right
.esfw-whatsapp-chat-window {

    right: 0;
    left: auto;

    transform-origin: bottom right;
}


/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 600px) {

    .esfw-whatsapp-chat-window {

        width: calc(100vw - 30px);

        height: min(
            530px,
            calc(100vh - 100px)
        );

        bottom: 72px;

        border-radius: 18px;
    }


    /* Left */

    .esfw-whatsapp-position-left
    .esfw-whatsapp-chat-window {

        left: -5px;
        right: auto;
    }


    /* Right */

    .esfw-whatsapp-position-right
    .esfw-whatsapp-chat-window {

        right: -5px;
        left: auto;
    }


    .esfw-whatsapp-chat-header {

        min-height: 82px;

        padding: 16px;
    }


    .esfw-whatsapp-chat-logo {

        width: 44px;
        height: 44px;

        flex-basis: 44px;
    }


    .esfw-whatsapp-chat-logo img {

        width: 27px;
        height: 27px;
    }


    .esfw-whatsapp-chat-title strong {

        font-size: 17px;
    }


    .esfw-whatsapp-chat-body {

        padding: 20px 16px;
    }


    .esfw-whatsapp-welcome {

        padding: 12px 14px 9px;
    }


    .esfw-whatsapp-welcome-label {

        font-size: 14px;
    }


    .esfw-whatsapp-welcome p {

        font-size: 14px;

        line-height: 1.55;
    }


    .esfw-whatsapp-welcome small {

        font-size: 10px;
    }


    .esfw-whatsapp-chat-footer {

        padding: 13px 16px 16px;
    }


    .esfw-whatsapp-open-chat-button {

        min-height: 52px;

        font-size: 14px;
    }
}


/* =========================================================
   Very Small Screens
   ========================================================= */

@media (max-width: 400px) {

    .esfw-whatsapp-chat-window {

        width: calc(100vw - 20px);
    }

    .esfw-whatsapp-position-left
    .esfw-whatsapp-chat-window {

        left: -5px;
    }

    .esfw-whatsapp-position-right
    .esfw-whatsapp-chat-window {

        right: -5px;
    }

    .esfw-whatsapp-chat-title strong {

        font-size: 16px;
    }

    .esfw-whatsapp-chat-title span {

        font-size: 11px;
    }

    .esfw-whatsapp-welcome p {

        font-size: 14px;
    }
}
/* =========================================================
   WhatsApp Message Variables
   ========================================================= */

.esfw-whatsapp-vars {

    display: block;

    margin-top: 6px;

    opacity: 0;
    visibility: hidden;
    transform: translateY(2px);

    max-height: 0;
    overflow: visible;

    transition:
        opacity 0.25s ease,
        transform 0.25s ease,
        max-height 0.25s ease,
        visibility 0.25s ease;

}

.esfw-whatsapp-setting-row:has(#esfw-whatsapp-default-message:focus) .esfw-whatsapp-vars {

    opacity: 1;
    visibility: visible;
    transform: translateY(0);

    max-height: 100px;

}

.esfw-whatsapp-vars-title {
    margin-bottom: 3px;
    font-size: 11px;
    line-height: 1.4;
    color: #555;
}

.esfw-whatsapp-variable-list {
    display: flex;
    flex-wrap: wrap;
    gap: 3px 6px;
    max-width: 150px;
}

.esfw-whatsapp-variable {
    font-size: 11px;
    line-height: 1.4;
    color: #7c3aed;
    text-decoration: none;
    cursor: pointer;
}

.esfw-whatsapp-variable:hover {
    text-decoration: underline;
}

/* =========================================================
   WhatsApp Conversation Messages
   ========================================================= */

.esfw-whatsapp-messages {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}


/* Message bubbles */

.esfw-whatsapp-message {
    align-self: flex-start;
    max-width: 88%;
    padding: 12px 14px;
    margin-bottom: 12px;

    background: #ffffff;
    border-radius: 8px;

    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.10);

    font-size: 14px;
    line-height: 1.5;
    color: #111b21;

    opacity: 0;
    transform: translateY(10px) scale(0.97);

    transition:
        opacity 0.35s ease,
        transform 0.35s ease;
}


/* Message becomes visible */

.esfw-whatsapp-message.esfw-whatsapp-message-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}


/* =========================================================
   Typing Indicator
   ========================================================= */

.esfw-whatsapp-typing {
    align-self: flex-start;

    width: 48px;
    height: 30px;

    padding: 0 10px;
    box-sizing: border-box;

    display: none;

    align-items: center;
    justify-content: center;

    gap: 4px;

    border-radius: 8px;
}


/* Typing indicator becomes visible */

.esfw-whatsapp-typing.esfw-whatsapp-typing-visible {
    display: flex;
}


/* Typing dots */

.esfw-whatsapp-typing span {
    width: 5px;
    height: 5px;

    border-radius: 50%;

    background: #667781;

    animation:
        esfw-whatsapp-typing-dot
        1.2s
        infinite
        ease-in-out;
}


.esfw-whatsapp-typing span:nth-child(2) {
    animation-delay: 0.15s;
}


.esfw-whatsapp-typing span:nth-child(3) {
    animation-delay: 0.30s;
}


/* Dot animation */

@keyframes esfw-whatsapp-typing-dot {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.45;
    }

    30% {
        transform: translateY(-3px);
        opacity: 1;
    }

}
/* =========================================================
   WhatsApp Opt-in Consent
   ========================================================= */
.esfw-whatsapp-optin {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin: 0 0 10px;
    padding: 0 2px;
    font-size: 11px;
    line-height: 1.45;
    color: #555;
    cursor: pointer;
}

.esfw-whatsapp-optin-checkbox {
    flex: 0 0 auto;
    width: 13px !important;
    height: 13px !important;
    min-width: 13px;
    margin: 2px 0 0 !important;
    padding: 0;
    cursor: pointer;
    accent-color: #128c7e;
}

.esfw-whatsapp-optin span {
    display: block;
    font-size: 11px;
    line-height: 1.45;
    color: #555;
}

/* Keep consent area compact on small screens */
@media (max-width: 480px) {

    .esfw-whatsapp-optin {
        font-size: 10px;
        line-height: 1.4;
    }

    .esfw-whatsapp-optin span {
        font-size: 10px;
        line-height: 1.4;
    }

}

/* Notification Bubble dependent fields */

.esfw-notification-setting {
    display: none;
}

.esfw-notification-setting.esfw-notification-visible {
    display: grid;
}
/* Auto Open dependent settings */

.esfw-auto-open-setting {
    display: none;
}

.esfw-auto-open-setting.esfw-auto-open-visible {
    display: grid;
}

/* =========================================================
   WhatsApp - Notification Bubble
   ========================================================= */

.esfw-whatsapp-notification-bubble {
    position: absolute;
    right: 0;
    bottom: 70px;

    max-width: 280px;
    min-width: 220px;

    padding: 14px 42px 14px 16px;

    background: #ffffff;
    color: #283344;

    border-radius: 14px;

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.15);

    font-size: 14px;
    line-height: 1.45;
    font-weight: 500;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translateY(10px) scale(0.96);

    transition:
        opacity 0.25s ease,
        transform 0.25s ease,
        visibility 0.25s ease;

    z-index: 99998;
}

/* Bubble visible */

.esfw-whatsapp-notification-bubble.esfw-notification-show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    transform: translateY(0) scale(1);
}

/* Close button */

.esfw-whatsapp-notification-close {
    position: absolute;

    top: 7px;
    right: 8px;

    width: 24px;
    height: 24px;

    padding: 0;
    margin: 0;

    border: none;

    background: transparent;

    color: #7b8491;

    font-size: 20px;
    line-height: 24px;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
}

.esfw-whatsapp-notification-close:hover {
    color: #283344;
}

/* Left position */

.esfw-whatsapp-position-left
.esfw-whatsapp-notification-bubble {
    left: 0;
    right: auto;
}

/* Mobile */

@media screen and (max-width: 600px) {

    .esfw-whatsapp-notification-bubble {
        right: 0;
        bottom: 68px;

        max-width: calc(100vw - 70px);
        min-width: 200px;

        font-size: 13px;
    }

    .esfw-whatsapp-position-left
    .esfw-whatsapp-notification-bubble {
        left: 0;
        right: auto;
    }

}

/* =========================================================
   WhatsApp Live Preview
   ========================================================= */

.esfw-whatsapp-preview-card {
    overflow: visible;
}


/* =========================================================
   Preview Box
   ========================================================= */

.esfw-whatsapp-preview-box {
    margin-top: 14px;

    border: 1px solid #e5e7eb;
    border-radius: 10px;

    background: #ffffff;

    overflow: hidden;
}


/* =========================================================
   Preview Box Header
   ========================================================= */

.esfw-whatsapp-preview-box-header {
    min-height: 38px;

    padding: 0 10px;

    display: flex;
    align-items: center;

    gap: 7px;

    box-sizing: border-box;
}

.esfw-whatsapp-preview-status {
    width: 8px;
    height: 8px;

    flex: 0 0 8px;

    border-radius: 50%;

    background: #25d366;
}

.esfw-whatsapp-preview-box-header strong {
    color: #283344;

    font-size: 11px;
    line-height: 1.3;

    font-weight: 600;
}

.esfw-whatsapp-preview-label {
    margin-left: auto;

    padding: 4px 7px;

    border-radius: 10px;

    background: #f3e8ff;
    color: #7c3aed;

    font-size: 9px;
    line-height: 1;

    white-space: nowrap;
}


/* =========================================================
   Product Page Preview
   ========================================================= */

.esfw-whatsapp-preview-product {
    position: relative;

    height: 145px;

    margin: 0 10px 10px;
    padding: 12px;

    display: flex;
    align-items: center;

    gap: 10px;

    border: 1px solid #eef0f2;
    border-radius: 8px;

    background: #ffffff;

    box-sizing: border-box;
}


/* =========================================================
   Product Image Placeholder
   ========================================================= */

.esfw-whatsapp-product-image {
    position: relative;

    width: 62px;
    height: 76px;

    flex: 0 0 62px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 6px;

    background: #f3f4f6;

    box-sizing: border-box;

    overflow: hidden;
}


/* Image Icon */

.esfw-whatsapp-product-image-icon {
    position: relative;

    width: 28px;
    height: 23px;

    display: block;

    border: 2px solid #cbd5e1;
    border-radius: 4px;

    box-sizing: border-box;
}


/* Small Sun */

.esfw-whatsapp-product-image-icon::before {
    content: "";

    position: absolute;

    top: 3px;
    right: 3px;

    width: 6px;
    height: 6px;

    border-radius: 50%;

    background: #cbd5e1;
}


/* Mountain */

.esfw-whatsapp-product-image-icon span {
    position: absolute;

    left: 3px;
    bottom: 2px;

    width: 18px;
    height: 10px;

    background: #cbd5e1;

    clip-path: polygon(
        0 100%,
        35% 38%,
        53% 58%,
        70% 25%,
        100% 100%
    );
}


/* =========================================================
   Product Content
   ========================================================= */

.esfw-whatsapp-product-content {
    flex: 1;

    min-width: 0;

    padding-top: 1px;

    box-sizing: border-box;
}


/* Product Title */

.esfw-whatsapp-product-content > span {
    display: block;

    height: 7px;

    margin-bottom: 7px;

    border-radius: 4px;

    background: #eef1f5;
}

.esfw-whatsapp-product-content > span:nth-child(1) {
    width: 82%;
}

.esfw-whatsapp-product-content > span:nth-child(2) {
    width: 62%;
}

/* =========================================================
   Fake Price
   ========================================================= */

.esfw-whatsapp-product-price {
    width: 42px;
    height: 7px;

    margin-top: 8px;

    border-radius: 4px;

    background: #d9dee6;
}


/* =========================================================
   Fake Add To Cart
   ========================================================= */

.esfw-whatsapp-product-button {
    width: 52px;
    height: 18px;

    margin-top: 10px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 4px;

    background: #cbd5e1;

    color: #ffffff;

    font-size: 7px;
    font-weight: 600;

    line-height: 1;

    box-sizing: border-box;
}


/* =========================================================
   Floating WhatsApp Preview
   ========================================================= */

.esfw-whatsapp-preview-floating {
    position: absolute;

    right: 7px;
    bottom: 9px;

    display: flex;
    align-items: center;

    z-index: 5;
}


/* Left Position */

.esfw-whatsapp-preview-position-left {
    left: 7px;
    right: auto;
}


/* Right Position */

.esfw-whatsapp-preview-position-right {
    right: 7px;
    left: auto;
}


/* =========================================================
   Floating Button
   ========================================================= */
.esfw-whatsapp-preview-floating-content {
    min-width: 42px;
    min-height: 34px;
    width: max-content;
    max-width: none;
    padding: 0 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border-radius: 18px;
    background: #25d366;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
    box-sizing: border-box;
    overflow: visible;
}

/* WhatsApp Icon */

.esfw-whatsapp-preview-floating-content img {
    width: 18px;
    height: 18px;

    max-width: 18px;
    max-height: 18px;

    flex: 0 0 18px;

    display: block;

    object-fit: contain;
}


/* Button Text */

#esfw-whatsapp-preview-text {
    min-width: 0;

    color: #ffffff;

    font-size: 9px;
    line-height: 1.2;

    font-weight: 600;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* =========================================================
   Icon Only State
   ========================================================= */

.esfw-whatsapp-preview-icon-only
.esfw-whatsapp-preview-floating-content {
    width: 38px;
    height: 38px;

    min-width: 38px;
    min-height: 38px;

    padding: 0;

    border-radius: 50%;

    gap: 0;
}

.esfw-whatsapp-preview-icon-only
.esfw-whatsapp-preview-floating-content img {
    width: 20px;
    height: 20px;

    max-width: 20px;
    max-height: 20px;
}

.esfw-whatsapp-preview-icon-only #esfw-whatsapp-preview-text {
    display: none;
}


/* =========================================================
   Tooltip
   ========================================================= */

.esfw-whatsapp-preview-tooltip {
    position: absolute;

    right: 0;
    bottom: calc(100% + 7px);

    width: max-content;
    max-width: 115px;

    padding: 5px 7px;

    border: 1px solid #e5e7eb;
    border-radius: 6px;

    background: #ffffff;

    color: #374151;

    font-size: 8px;
    line-height: 1.3;

    text-align: center;

    box-shadow:
        0 3px 10px rgba(0, 0, 0, 0.10);

    white-space: normal;

    z-index: 20;

    box-sizing: border-box;
}


/* Tooltip Arrow */

.esfw-whatsapp-preview-tooltip::after {
    content: "";

    position: absolute;

    right: 10px;
    bottom: -4px;

    width: 7px;
    height: 7px;

    background: #ffffff;

    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;

    transform: rotate(45deg);
}


/* Left Tooltip */

.esfw-whatsapp-preview-position-left
.esfw-whatsapp-preview-tooltip {
    left: 0;
    right: auto;
}


/* =========================================================
   Chat Window Preview
   ========================================================= */

.esfw-whatsapp-preview-chat {
    height: 230px;

    margin: 0 10px 10px;

    border: 1px solid #e5e7eb;
    border-radius: 8px;

    overflow: hidden;

    background: #efeae2;

    display: flex;
    flex-direction: column;
}

/* Chat Header */

.esfw-whatsapp-preview-chat-header {
    min-height: 34px;

    padding: 0 9px;

    display: flex;
    align-items: center;

    gap: 6px;

    background: #25d366;
    color: #ffffff;

    box-sizing: border-box;
}

.esfw-whatsapp-preview-chat-header img {
    width: 18px;
    height: 18px;

    max-width: 18px;
    max-height: 18px;

    object-fit: contain;
}

.esfw-whatsapp-preview-chat-header strong {
    font-size: 10px;
    line-height: 1.2;
}

.esfw-whatsapp-preview-chat-close {
    margin-left: auto;

    font-size: 17px;
    line-height: 1;

    font-weight: 300;
}


/* Chat Body */

.esfw-whatsapp-preview-chat-body {
    flex: 1;

    padding: 13px 10px;

    background:
        repeating-linear-gradient(
            45deg,
            rgba(255,255,255,0.15) 0,
            rgba(255,255,255,0.15) 1px,
            transparent 1px,
            transparent 8px
        );

    overflow: hidden;
}


/* Message */

.esfw-whatsapp-preview-message {
    position: relative;

    width: 82%;

    padding: 8px 8px 5px;

    border-radius: 7px;

    background: #ffffff;

    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.08);

    box-sizing: border-box;
}

#esfw-whatsapp-preview-chat-message {
    display: block;

    color: #283344;

    font-size: 9px;
    line-height: 1.35;
}

.esfw-whatsapp-preview-message small {
    display: block;

    margin-top: 4px;

    color: #7b8491;

    font-size: 7px;

    text-align: right;

}


/* Chat Footer */

.esfw-whatsapp-preview-chat-footer {
    min-height: 38px;

    padding: 5px 6px;

    display: flex;
    align-items: center;

    gap: 5px;

    background: #f8fafc;

    border-top: 1px solid #e5e7eb;

    box-sizing: border-box;
    flex-direction: column;
    align-items: stretch;
}
/* Opt-in Checkbox */

.esfw-whatsapp-preview-optin input[type="checkbox"] {
    width: 11px;
    height: 11px;

    margin: 0;

    flex: 0 0 11px;
}
/* Chat Button */

.esfw-whatsapp-preview-chat-button {
    width: 100%;
    min-height: 34px;

    padding: 7px 10px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border: 1px solid #e5e7eb;
    border-radius: 7px;

    background: #ffffff;
    color: #1f2937;

    font-size: 11px;
    font-weight: 600;

    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);

    cursor: default;
    box-sizing: border-box;
}

.esfw-whatsapp-preview-chat-button-icon {
    width: 22px;
    height: 22px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #25d366;
    color: #ffffff;

    font-size: 12px;
    line-height: 1;
}

.esfw-whatsapp-preview-chat-button:hover,
.esfw-whatsapp-preview-chat-button:focus {
    background: #ffffff;
    color: #1f2937;
    border-color: #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    outline: none;
}
/* Chat Button */

.esfw-whatsapp-preview-chat-action {
    padding: 6px;
    background: #f8fafc;
    box-sizing: border-box;
}

.esfw-whatsapp-preview-chat-action button {
    width: 100%;
    min-height: 34px;

    border: 0;
    border-radius: 7px;

    background: #25d366;
    color: #ffffff;

    font-size: 11px;
    font-weight: 600;

    cursor: default;

    box-shadow: none;
}


/* Input */

.esfw-whatsapp-preview-input {
    flex: 1;

    min-width: 0;

    height: 27px;

    padding: 0 8px;

    display: flex;
    align-items: center;

    border: 1px solid #e5e7eb;
    border-radius: 14px;

    background: #ffffff;

    color: #9ca3af;

    font-size: 8px;

    white-space: nowrap;
}


/* Send */

.esfw-whatsapp-preview-send {
    width: 27px;
    height: 27px;

    flex: 0 0 27px;

    border-radius: 50%;

    display: flex !important;
    align-items: center;
    justify-content: center;

    background: #25d366 !important;
    color: #ffffff !important;

    font-size: 12px;

    box-sizing: border-box;

    opacity: 1 !important;
    visibility: visible !important;
    animation: none !important;
}


/* =========================================================
   Preview Settings
   ========================================================= */

.esfw-whatsapp-preview-settings {
    margin-top: 14px;

    padding: 10px;

    border: 1px solid #e5e7eb;
    border-radius: 8px;

    background: #ffffff;
}

.esfw-whatsapp-preview-settings-title {
    margin-bottom: 8px;

    color: #283344;

    font-size: 11px;
    line-height: 1.3;

    font-weight: 600;
}

.esfw-whatsapp-preview-setting {
    display: grid;

    grid-template-columns: 1fr 1.2fr;

    gap: 8px;

    padding: 5px 0;

    border-bottom: 1px solid #f1f3f5;

    font-size: 9px;
    line-height: 1.35;
}

.esfw-whatsapp-preview-setting:last-child {
    border-bottom: none;
}

.esfw-whatsapp-preview-setting span {
    color: #6b7280;
}

.esfw-whatsapp-preview-setting strong {
    color: #40577d;

    font-weight: 500;

    overflow-wrap: anywhere;
}


/* =========================================================
   Preview Responsive
   ========================================================= */

@media screen and (max-width: 600px) {

    .esfw-whatsapp-preview-product {
        height: 140px;

        padding: 10px;

        gap: 8px;
    }

    .esfw-whatsapp-product-image {
        width: 56px;
        height: 68px;

        flex-basis: 56px;
    }

    .esfw-whatsapp-preview-chat {
        height: 185px;
    }

    .esfw-whatsapp-preview-label {
        display: none;
    }

}



/* =========================================================
   WhatsApp Settings - Narrow Content Responsive Layout
   ========================================================= */

@container (max-width: 700px) {

    .esfw-whatsapp-setting-row {
        grid-template-columns: 52px minmax(0, 1fr);
        grid-template-rows: auto auto;
        gap: 8px 16px;
    }

    .esfw-whatsapp-setting-icon {
        grid-column: 1;
        grid-row: 1 / 3;
    }

    .esfw-whatsapp-setting-label {
        grid-column: 2;
        grid-row: 1;
        min-width: 0;
    }

    .esfw-whatsapp-setting-field {
        grid-column: 2;
        grid-row: 2;
        width: 100%;
        min-width: 0;
    }

    .esfw-whatsapp-setting-field input,
    .esfw-whatsapp-setting-field input[type="tel"],
    .esfw-whatsapp-setting-field textarea,
    .esfw-whatsapp-setting-field select {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .esfw-whatsapp-setting-field .iti {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .esfw-whatsapp-setting-field .iti input[type="tel"] {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }
}
/* Opt-in Text Preview */

.esfw-whatsapp-preview-optin {
    margin-top: 8px;

    padding: 5px 8px;

    color: #6b7280;

    font-size: 9px;

    line-height: 1.4;

    text-align: left;

    box-sizing: border-box;
}
