/* Sticky Bar Base Styles */
.bottom-sticky-bar1 {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #df8337;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 0;
    box-shadow: 0 -2px 15px rgba(119, 49, 0, 0.2);
    z-index: 1001;
    transition: transform 0.3s ease;
}

/* Hide "item/items" text from cart count - show only number */
.bottom-sticky-bar1 .wd-cart-number>span {
    display: none !important;
}

.bottom-sticky-bar1 .bar-item {
    text-align: center;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

/* WhatsApp Modal Styles */
#whatsapp-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

#whatsapp-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    position: fixed;
    bottom: 80px;
    left: 50%;
    width: 90%;
    max-width: 400px;
    background: #fff;
    border-radius: 20px;
    transform: translate(-50%, 100%);
    transition: transform 0.3s ease-out;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

.modal-container.active {
    transform: translate(-50%, 0);
}

.modal-header {
    padding: 20px;
    background: #df8337;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.modal-content {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.whatsapp-accounts-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.whatsapp-account {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.whatsapp-account:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.account-avatar {
    width: 48px;
    height: 48px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
}

.account-avatar i {
    font-size: 24px;
    color: #fff;
}

.account-info {
    flex: 1;
}

.account-name {
    font-weight: 600;
    font-size: 16px;
    color: #212529;
    margin-bottom: 4px;
}

.account-status {
    font-size: 14px;
    color: #25D366;
}

/* Modal Open State */
body.modal-open {
    overflow: hidden;
}

/* Responsive Styles */
@media (min-width: 768px) {
    .bottom-sticky-bar1 {
        display: none;
    }
}

@media (max-width: 480px) {
    .modal-content {
        max-height: 60vh;
    }

    .whatsapp-account {
        padding: 12px;
    }

    .account-avatar {
        width: 40px;
        height: 40px;
    }

    .account-avatar i {
        font-size: 20px;
    }

    .account-name {
        font-size: 14px;
    }

    .account-status {
        font-size: 12px;
    }
}

/* ==================== */
/* Floating Icon Styles */
/* ==================== */

.stickybar-floating-icon {
    position: fixed;
    z-index: 999998;
    transition: all 0.3s ease;
}

.stickybar-floating-left {
    left: 20px;
}

.stickybar-floating-right {
    right: 20px;
}

.floating-icon-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
}

.floating-icon-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

.floating-icon-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

/* Pulse Animation */
.floating-icon-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(37, 211, 102, 0.4);
    animation: floating-pulse 2s infinite;
    pointer-events: none;
}

@keyframes floating-pulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Device Visibility */
@media (min-width: 768px) {
    .stickybar-floating-mobile-only {
        display: none;
    }
}

@media (max-width: 767px) {
    .stickybar-floating-desktop-only {
        display: none;
    }

    .floating-icon-button {
        width: 50px;
        height: 50px;
    }

    .floating-icon-img {
        width: 30px;
        height: 30px;
    }
}

/* ========================= */
/* Floating Chat Popup Styles */
/* ========================= */

.floating-chat-popup {
    position: fixed;
    z-index: 999997;
    width: 320px;
    max-width: calc(100vw - 40px);
    border-radius: 16px;
    overflow: hidden;
    background: #2d2d2d;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
}

.floating-chat-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.floating-chat-left {
    left: 20px;
}

.floating-chat-right {
    right: 20px;
}

/* Chat Popup Header */
.chat-popup-header {
    background: linear-gradient(135deg, #dc3545 0%, #b02a37 100%);
    color: #fff;
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 15px;
}

.chat-popup-close {
    background: rgba(0, 0, 0, 0.2);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.chat-popup-close:hover {
    background: rgba(0, 0, 0, 0.4);
}

/* Chat Popup Body */
.chat-popup-body {
    background: #2d2d2d;
    padding: 25px 20px;
}

.chat-bubble {
    background: #4a4a4a;
    color: #fff;
    padding: 15px 18px;
    border-radius: 18px 18px 18px 4px;
    font-size: 14px;
    line-height: 1.5;
    max-width: 90%;
    position: relative;
}

.chat-bubble::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: -8px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 10px 10px 0;
    border-color: transparent #4a4a4a transparent transparent;
}

/* Chat Popup Footer */
.chat-popup-footer {
    background: #f5f5f5;
    padding: 15px 20px;
}

.terms-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 12px;
    color: #333;
    margin-bottom: 15px;
    cursor: pointer;
    line-height: 1.4;
}

.terms-checkbox-label input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: #dc3545;
    cursor: pointer;
}

.terms-checkbox-label a {
    color: #333;
    text-decoration: underline;
}

.terms-checkbox-label a:hover {
    color: #dc3545;
}

/* Open Chat Button */
.open-chat-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #e0e0e0;
    color: #333;
    text-decoration: none;
    padding: 14px 24px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    width: 100%;
}

.open-chat-button:hover {
    background: #25D366;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

/* ============================== */
/* Account List in Floating Chat  */
/* ============================== */

.chat-popup-accounts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.account-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.account-card:hover {
    border-color: #25d366;
    background: #f0fdf4;
}

.account-card:active {
    transform: scale(0.98);
}

.account-card.selected {
    border-color: #25d366;
    background: #e8f5e9;
    box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.2);
}

.account-card.selected::before {
    content: '✓';
    position: absolute;
    right: 10px;
    color: #25d366;
    font-weight: bold;
}

.account-card-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #25d366;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 16px;
}

.account-card-info {
    flex: 1;
}

.account-card-name {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.account-card-role {
    font-size: 12px;
    color: #666;
}

.account-card-send {
    color: #25d366;
    font-size: 18px;
}

/* Ripple Effect for Bar Items */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: ripple-animation 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}