/* Elit Tobacco Shop – Floating WhatsApp & Rule-Based Chatbot Widget */

.floating-actions-group {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.floating-buttons-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Chatbot Launcher Button (Peach #FED7B8, transparent logo, red '1' badge, no text) */
.chat-launcher-btn {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #FED7B8;
    border: none;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 24px rgba(254, 215, 184, 0.35);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chat-launcher-btn:hover {
    transform: scale(1.06);
    box-shadow: 0 0 30px rgba(254, 215, 184, 0.55);
}

.chat-badge-pill {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #dc2626;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    border: 2px solid #2A0A0D;
    z-index: 2;
    pointer-events: none;
}

.chat-launcher-logo {
    height: 28px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) contrast(200);
    pointer-events: none;
}

/* Official WhatsApp Floating Button (#25D366 circle + pulse ping) */
.wa-launcher-btn {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    color: #ffffff;
    text-decoration: none;
}

.wa-launcher-btn:hover {
    transform: scale(1.06);
    box-shadow: 0 12px 28px rgba(37, 211, 102, 0.6);
}

.wa-launcher-svg {
    width: 28px;
    height: 28px;
    fill: #ffffff;
}

.wa-ping-indicator {
    position: absolute;
    top: -3px;
    right: -3px;
    display: flex;
    width: 12px;
    height: 12px;
}

.wa-ping-animate {
    position: absolute;
    display: inline-flex;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #25D366;
    opacity: 0.75;
    animation: waPingAnimation 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.wa-ping-dot {
    position: relative;
    display: inline-flex;
    border-radius: 50%;
    width: 12px;
    height: 12px;
    background-color: #ffffff;
    border: 2px solid #25D366;
}

@keyframes waPingAnimation {
    75%, 100% {
        transform: scale(2.2);
        opacity: 0;
    }
}

/* Chat Panel */
.chat-panel {
    width: 360px;
    background: #2A0A0D;
    border: 1px solid rgba(254, 215, 184, 0.45);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(42, 10, 13, 0.85);
}

.chat-panel[hidden] {
    display: none !important;
}

.chat-header {
    padding: 12px 16px;
    background: #59171B;
    border-bottom: 1px solid rgba(254, 215, 184, 0.18);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.chat-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #FED7B8;
    display: inline-block;
}

.chat-title {
    margin: 0;
    font-family: "Cinzel", Georgia, serif;
    font-size: 14px;
    font-weight: 700;
    color: #FED7B8;
    line-height: 1.2;
}

.chat-badge {
    display: block;
    font-size: 11px;
    color: #C9A18F;
    margin-top: 2px;
}

.chat-chips {
    padding: 10px 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    border-bottom: 1px solid rgba(254, 215, 184, 0.18);
    background: rgba(42, 10, 13, 0.65);
}

.chat-chip {
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid rgba(254, 215, 184, 0.3);
    background: rgba(254, 215, 184, 0.06);
    color: #FED7B8;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.chat-chip:hover {
    background: #FED7B8;
    color: #59171B;
}

.chat-messages {
    flex: 1;
    height: 260px;
    max-height: 280px;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-msg {
    max-width: 85%;
    padding: 10px 13px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.5;
    word-break: break-word;
}

.chat-msg p {
    margin: 0;
}

.chat-msg.is-bot {
    align-self: flex-start;
    background: rgba(89, 23, 27, 0.75);
    color: #F5E3D3;
    border: 1px solid rgba(254, 215, 184, 0.18);
}

.chat-msg.is-user {
    align-self: flex-end;
    background: #FED7B8;
    color: #59171B;
    font-weight: 500;
}

.chat-wa-cta {
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 4px;
    background: #25D366;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    transition: filter 0.2s ease;
}

.chat-wa-cta:hover {
    filter: brightness(1.08);
}

.chat-wa-cta svg {
    width: 14px;
    height: 14px;
    fill: #ffffff;
}

.chat-form {
    padding: 10px 12px;
    border-top: 1px solid rgba(254, 215, 184, 0.18);
    display: flex;
    gap: 8px;
    background: #2A0A0D;
}

.chat-form input {
    flex: 1;
    min-width: 0;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid rgba(254, 215, 184, 0.3);
    background: rgba(254, 215, 184, 0.06);
    color: #FED7B8;
    font-size: 12px;
    outline: none;
    min-height: 38px;
}

.chat-form input::placeholder {
    color: #C9A18F;
}

.chat-send-btn {
    width: 38px;
    height: 38px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FED7B8;
    color: #59171B;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.2s ease;
}

.chat-send-btn:hover {
    background: #E8B896;
}

@media (max-width: 767px) {
    .floating-actions-group {
        right: 12px;
        bottom: 12px;
    }

    .chat-panel {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: 80px;
        width: calc(100vw - 24px);
        max-height: 70vh;
    }
}
