/* --- WhatsApp Chatbot Widget Styles --- */

/* Floating Button */
#wpp-chatbot-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 54px;
    height: 54px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
    cursor: pointer;
    z-index: 90;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    outline: none;
}

#wpp-chatbot-btn:hover {
    transform: scale(1.08) rotate(8deg);
    box-shadow: 0 12px 30px rgba(37, 211, 102, 0.6);
}

#wpp-chatbot-btn:active {
    transform: scale(0.95);
}

/* WhatsApp Icon SVG color */
#wpp-chatbot-btn svg {
    fill: currentColor;
    width: 28px;
    height: 28px;
}

/* Pulsing Notification Dot on Button */
#wpp-chatbot-btn-dot {
    position: absolute;
    top: 0;
    right: 0;
    width: 14px;
    height: 14px;
    background-color: #FF0090;
    border: 2px solid white;
    border-radius: 50%;
    animation: wpp-pulse-dot 2s infinite;
}

@keyframes wpp-pulse-dot {
    0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(255, 0, 144, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(255, 0, 144, 0); }
    100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(255, 0, 144, 0); }
}

#wpp-chatbot-tooltip {
    position: fixed;
    bottom: 90px;
    right: 24px;
    background: white;
    color: #1e293b;
    padding: 12px 16px;
    border-radius: 18px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1), 0 0 1px rgba(0,0,0,0.1);
    font-size: 13px;
    font-weight: 600;
    max-width: 260px;
    z-index: 85;
    opacity: 0;
    transform: translateY(15px) scale(0.9);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
    border: 1px solid rgba(255, 0, 144, 0.1);
}

#wpp-chatbot-tooltip.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Tooltip arrow */
#wpp-chatbot-tooltip::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 22px;
    width: 16px;
    height: 16px;
    background: white;
    transform: rotate(45deg);
    border-bottom: 1px solid rgba(255, 0, 144, 0.1);
    border-right: 1px solid rgba(255, 0, 144, 0.1);
    box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.02);
}

#wpp-chatbot-tooltip-close {
    position: absolute;
    top: 4px;
    right: 8px;
    font-size: 14px;
    color: #94a3b8;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
}

#wpp-chatbot-tooltip-close:hover {
    color: #FF0090;
}

#wpp-chatbot-container {
    position: fixed;
    bottom: 90px;
    right: 24px;
    width: 380px;
    height: 520px;
    max-height: calc(100vh - 120px);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 0, 144, 0.15);
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 95;
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.15);
    pointer-events: none;
}

#wpp-chatbot-container.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Mobile responsive layout */
@media (max-width: 480px) {
    #wpp-chatbot-container {
        width: calc(100% - 32px);
        height: 80vh;
        bottom: 80px;
        right: 16px;
    }
}

/* Chat Header */
.wpp-chat-header {
    background: linear-gradient(135deg, #1e0933 0%, #000000 100%);
    border-bottom: 1px solid rgba(255, 0, 144, 0.15);
    padding: 16px 20px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 2;
}

.wpp-chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wpp-chat-header-avatar {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.wpp-chat-header-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Status Indicator Dot */
.wpp-chat-header-status-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    background-color: #25D366;
    border: 2px solid white;
    border-radius: 50%;
    animation: wpp-green-pulse 2s infinite;
}

@keyframes wpp-green-pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 4px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.wpp-chat-header-text h4 {
    font-size: 15px;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
}

.wpp-chat-header-text p {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

.wpp-chat-close {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.2s ease;
}

.wpp-chat-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* Chat Messages Area */
.wpp-chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f8fafc;
    scroll-behavior: smooth;
}

/* Custom scrollbar for message area */
.wpp-chat-messages::-webkit-scrollbar {
    width: 6px;
}
.wpp-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}
.wpp-chat-messages::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}
.wpp-chat-messages::-webkit-scrollbar-thumb:hover {
    background: #cbd5e1;
}

/* Chat Bubbles */
.wpp-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 13px;
    line-height: 1.45;
    position: relative;
    animation: wpp-msg-pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.1) forwards;
    opacity: 0;
    transform: translateY(10px);
}

@keyframes wpp-msg-pop {
    to { opacity: 1; transform: translateY(0); }
}

.wpp-msg.bot {
    align-self: flex-start;
    background: white;
    color: #1e293b;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.wpp-msg.user {
    align-self: flex-end;
    background: #e8fcd8;
    color: #0f172a;
    border-bottom-right-radius: 4px;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.08);
}

.wpp-msg-time {
    display: block;
    font-size: 9px;
    color: #94a3b8;
    text-align: right;
    margin-top: 4px;
    font-weight: 500;
}

/* Quick Replies / Choices Container */
.wpp-chat-choices {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 14px 12px 14px;
    background: #f8fafc;
    max-height: 220px;
    overflow-y: auto;
    flex-shrink: 0;
}

/* Custom scrollbar for choices area */
.wpp-chat-choices::-webkit-scrollbar {
    width: 4px;
}
.wpp-chat-choices::-webkit-scrollbar-track {
    background: transparent;
}
.wpp-chat-choices::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}

.wpp-choice-btn {
    background: white;
    border: 1px solid rgba(255, 0, 144, 0.2);
    color: #1e293b;
    padding: 6px 12px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
    text-align: left;
    line-height: 1.35;
    width: 100%;
}

.wpp-choice-btn:hover {
    background: #FF0090;
    color: white;
    border-color: #FF0090;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(255, 0, 144, 0.15);
}

.wpp-choice-btn:active {
    transform: translateY(0);
}

/* Typing Indicator Animation */
.wpp-typing-bubble {
    align-self: flex-start;
    background: white;
    padding: 12px 18px;
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    display: flex;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid rgba(0, 0, 0, 0.03);
    animation: wpp-msg-pop 0.2s ease-out forwards;
}

.wpp-typing-dot {
    width: 6px;
    height: 6px;
    background: #94a3b8;
    border-radius: 50%;
    animation: wpp-typing-bounce 1.3s infinite ease-in-out;
}

.wpp-typing-dot:nth-child(2) { animation-delay: 0.15s; }
.wpp-typing-dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes wpp-typing-bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-6px); }
}

/* Chat Input Area */
.wpp-chat-input-container {
    padding: 12px 16px;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wpp-chat-input {
    flex: 1;
    border: 1px solid #cbd5e1;
    border-radius: 9999px;
    padding: 10px 16px;
    font-size: 13px;
    outline: none;
    transition: all 0.2s ease;
    font-family: inherit;
    color: #1e293b;
}

.wpp-chat-input:focus {
    border-color: #FF0090;
    box-shadow: 0 0 0 3px rgba(255, 0, 144, 0.1);
}

.wpp-chat-send {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF0090 0%, #C4006F 100%);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(255, 0, 144, 0.2);
    outline: none;
}

.wpp-chat-send:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 14px rgba(255, 0, 144, 0.3);
}

.wpp-chat-send:active {
    transform: scale(0.95);
}

.wpp-chat-send svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    margin-left: 2px; /* slight visual balance adjustment */
}

/* Big Button Redirect styled like WhatsApp link */
.wpp-redirect-container {
    padding: 8px 0;
    width: 100%;
}

.wpp-redirect-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #25D366;
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    transition: all 0.2s ease;
    text-align: center;
}

.wpp-redirect-btn:hover {
    background-color: #20ba59;
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.5);
    transform: translateY(-1px);
}

.wpp-redirect-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}
