/* Chatbot CSS - Premium Glassmorphism Design */

:root {
    --chatbot-primary: #009ce4;
    --chatbot-header-gradient: linear-gradient(90deg, #009ce4 0%, #e8d02c 100%);
    --chatbot-bg: rgba(255, 255, 255, 0.95);
    --chatbot-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    --chatbot-radius: 20px;
    --chatbot-z-index: 999999;
}

.chatbot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: var(--chatbot-z-index);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Floating Toggle */
.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #009FDB;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transition: transform 0.3s, box-shadow 0.3s;
    font-size: 28px;
}

/* .chatbot-toggle {
    width: 65px;
    height: 65px;
    background-color: var(--chatbot-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0, 156, 228, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
} */

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 156, 228, 0.6);
}

.chatbot-toggle-dots {
    display: flex;
    gap: 3px;
}

.chatbot-toggle-dots span {
    width: 6px;
    height: 6px;
    background-color: white;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.chatbot-toggle-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.chatbot-toggle-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1.0);
    }
}

/* Chat Window */
.chatbot-window {
    position: fixed;
    bottom: 90px;
    right: 30px;
    width: 380px;
    max-width: calc(100vw - 60px);
    height: 550px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 999999;
    transition: all 0.3s ease;
}

.chatbot-window.hidden {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    pointer-events: none;
}

/* Header */
.chatbot-header {
    background: linear-gradient(135deg, #009FDB 0%, #FFD430 100%);
    /* Teal gradient */
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header-icon {
    font-size: 1.2rem;
}

.chatbot-header-title {
    font-weight: 500;
}

.chatbot-header-actions {
    display: flex;
    gap: 10px;
}

.chatbot-header-actions button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    margin-left: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 28px;
    transition: background 0.2s;
}

.chatbot-header-actions button:hover {
    background: rgba(255, 255, 255, 0.35);
}

/* Body */
.chatbot-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

.chatbot-screen {
    display: none;
}

.chatbot-screen.active {
    display: block;
}

/* Welcome Mode Header Overrides */


.chatbot-window.welcome-mode .chatbot-header-actions button {
    background: #f0f0f0 !important;
    color: #555 !important;
    border-radius: 50% !important;
    font-size: 14px !important;
    width: 32px !important;
    height: 32px !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-window.welcome-mode .chatbot-header-actions #chatbot-refresh,
.chatbot-window.welcome-mode .chatbot-header-actions #chatbot-minimize {
    display: none !important;
    /* Hide other actions on welcome screen like in image */
}

.chatbot-window.welcome-mode .chatbot-body {
    background: white !important;
}

/* Welcome Screen */
#chatbot-screen-welcome {
    text-align: center;
    padding: 10px 10px 30px;
}

.chatbot-welcome-logo img {
    max-width: 140px;
    margin-bottom: 25px;
    height: auto;
}

#chatbot-screen-welcome h3 {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 400;
    font-family: "Fira Sans", Sans-serif;
}

#chatbot-screen-welcome p {
    color: #666;
    margin-bottom: 30px;
}

.chatbot-form-group {
    text-align: left;
    margin-bottom: 20px;
}

.chatbot-form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
}

.chatbot-form-group label span {
    color: #ff4d4d;
}

.chatbot-form-group input {
    width: 100%;
    padding: 12px;
    border: none;
    border-bottom: 2px solid #eee;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
}

.chatbot-form-group input:focus {
    border-color: var(--chatbot-primary);
}

.chatbot-btn-primary {
    width: 100% !important;
    padding: 18px !important;
    background-color: #009FDB !important;
    /* Sky Blue match from latest image */
    color: white !important;
    border: none !important;
    border-radius: 0 !important;
    /* Sharp corners */
    font-size: 20px !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    /* Sans-serif like in latest image */
    cursor: pointer !important;
    transition: background 0.2s !important;
    margin-top: 10px !important;
}

.chatbot-btn-primary:hover {
    background-color: #008cc2;
}

/* Main Menu / Topics */
.chatbot-topic-title {
    text-align: center;
    color: #888;
    margin: 20px 0;
    font-size: 14px;
}

.chatbot-topics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.chatbot-topic-btn {
    background: white;
    border: 1px solid #eee;
    border-radius: 15px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.chatbot-topic-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.chatbot-topic-btn.active {
    background-color: var(--chatbot-primary);
    border-color: var(--chatbot-primary);
    color: white;
}

.chatbot-topic-btn .emoji {
    font-size: 24px;
}

.chatbot-topic-btn .label {
    font-size: 14px;
    font-weight: 500;
}

/* Chat Messages */
.chatbot-messages {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.chatbot-msg {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.5;
}

.chatbot-msg-received {
    background: #f1f1f1;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.chatbot-msg-sent {
    background: var(--chatbot-primary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

/* Product Cards */
.chatbot-search-header {
    background: var(--chatbot-header-gradient);
    color: white;
    padding: 10px;
    text-align: center;
    border-radius: 10px;
    margin-bottom: 15px;
    font-weight: 600;
}

.chatbot-product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
    transition: transform 0.2s;
    display: block;
    text-decoration: none;
    color: inherit;
}

.chatbot-product-card:hover {
    transform: translateY(-3px);
}

.chatbot-product-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.chatbot-product-info {
    padding: 15px;
}

.chatbot-product-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 8px;
}

.chatbot-product-excerpt {
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.4;
}

.chatbot-product-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--chatbot-primary);
}

/* Footer Input */
.chatbot-footer {
    padding: 15px 20px;
    background: #fff;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.chatbot-input-container {
    display: flex !important;
    align-items: center !important;
    background: #f1f1f1 !important;
    border-radius: 25px !important;
    padding: 5px 5px 5px 20px !important;
    border: none !important;
}

.chatbot-input-container input {
    flex: 1 !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    padding: 8px 0 !important;
    font-size: 0.9rem !important;
    box-shadow: none !important;
}

.chatbot-send {
    background: #0099ff !important;
    border: none !important;
    color: white !important;
    width: 35px !important;
    height: 35px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background 0.2s !important;
    padding: 0 !important;
    min-width: 35px !important;
}

.chatbot-send:hover {
    background: #007acc;
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Typing Indicator */
.typing {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 12px 18px !important;
    width: fit-content;
    background: white !important;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    border-radius: 18px 18px 18px 4px !important;
    margin-bottom: 10px;
}

.typing span {
    width: 6px;
    height: 6px;
    background: #999;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
}

.typing span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing {

    0%,
    80%,
    100% {
        transform: scale(0.6);
        opacity: 0.4;
    }

    40% {
        transform: scale(1.1);
        opacity: 1;
    }
}

/* Contact Form Screen */
#chatbot-screen-contact {
    padding: 20px;
    background: #fdfdfd;
}

.chatbot-contact-header {
    text-align: center;
    margin-bottom: 20px;
}

.chatbot-contact-header h3 {
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 5px;
}

.chatbot-contact-header p {
    font-size: 0.9rem;
    color: #666;
}

.chatbot-contact-form-wrapper {
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* CF7 Overrides for chatbot */
.chatbot-contact-form-wrapper .wpcf7-form-control-wrap {
    margin-bottom: 12px;
    display: block;
}

.chatbot-contact-form-wrapper input,
.chatbot-contact-form-wrapper textarea {
    width: 100% !important;
    padding: 10px 12px !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    font-family: inherit !important;
    font-size: 0.9rem !important;
    box-sizing: border-box !important;
}

.chatbot-contact-form-wrapper .wpcf7-submit {
    width: 100% !important;
    padding: 12px !important;
    background: #0088cc !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background 0.2s !important;
}

.chatbot-contact-form-wrapper .wpcf7-submit:hover {
    background: #0077bb !important;
}

.trx_addons_scroll_to_top.show {
    bottom: 6em;
}