/* Chatbot Widget Styles */
.pg-chatbot-widget {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9999;
    font-family: 'Inter', 'Poppins', sans-serif;
}

/* Toggle Button */
.pg-chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #0F55DC;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(15, 85, 220, 0.4);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pg-chatbot-toggle:hover {
    transform: scale(1.1);
    background: #0c111d;
    box-shadow: 0 6px 25px rgba(15, 85, 220, 0.6);
}

.pg-chatbot-badge {
    display: none !important;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Chatbot Window */
.pg-chatbot-window {
    position: absolute;
    bottom: 80px;
    left: 0;
    width: 450px;
    height: 600px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

.pg-chatbot-window.active {
    display: flex;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Chatbot Header */
.pg-chatbot-header {
    background: #0F55DC;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fff;
}

.pg-chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pg-chatbot-avatar {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.pg-chatbot-header-text h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.pg-chatbot-status {
    font-size: 12px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 5px;
    color: #fff;
}

.pg-chatbot-status::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    display: inline-block;
}

.pg-chatbot-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.pg-chatbot-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Chatbot Body */
.pg-chatbot-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.pg-chatbot-body::-webkit-scrollbar {
    width: 6px;
}

.pg-chatbot-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.pg-chatbot-body::-webkit-scrollbar-thumb {
    background: #0F55DC;
    border-radius: 3px;
}

/* Message Styles */
.pg-chatbot-message {
    display: flex;
    gap: 10px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.pg-chatbot-message.bot {
    align-items: flex-start;
}

.pg-chatbot-message.user {
    flex-direction: row-reverse;
    align-items: flex-start;
}

.pg-chatbot-message-content {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 18px;
    line-height: 1.5;
    font-size: 14px;
}

.pg-chatbot-message-content .pg-chatbot-form-fields {
    max-width: 100%;
    width: 100%;
}

.pg-chatbot-message.bot .pg-chatbot-message-content {
    background: #fff;
    color: #333;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pg-chatbot-message.user .pg-chatbot-message-content {
    background: #0F55DC;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.pg-chatbot-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.pg-chatbot-message.bot .pg-chatbot-message-avatar {
    background: #0F55DC;
    color: #fff;
}

.pg-chatbot-message.user .pg-chatbot-message-avatar {
    background: #e5e7eb;
    color: #333;
}

/* Button Options */
.pg-chatbot-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.pg-chatbot-button {
    background: #fff;
    border: 2px solid #e5e7eb;
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
    font-size: 14px;
    color: #333;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.pg-chatbot-button:hover {
    border-color: #0F55DC;
    background: #f0f4ff;
    transform: translateX(5px);
}

.pg-chatbot-button i {
    font-size: 18px;
    color: #0F55DC;
}

/* Input Area */
.pg-chatbot-input-area {
    padding: 15px;
    background: #fff;
    border-top: 1px solid #e5e7eb;
}

.pg-chatbot-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.pg-chatbot-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

.pg-chatbot-input:focus {
    border-color: #0F55DC;
}

.pg-chatbot-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #0F55DC;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.pg-chatbot-send:hover {
    background: #0c111d;
    transform: scale(1.1);
}

/* Form Fields */
.pg-chatbot-form-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pg-chatbot-form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pg-chatbot-form-field label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
}

.pg-chatbot-form-field input,
.pg-chatbot-form-field select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.pg-chatbot-form-field input:focus,
.pg-chatbot-form-field select:focus {
    border-color: #0F55DC;
}

/* Responsive */
@media (max-width: 768px) {
    .pg-chatbot-window {
        width: calc(100vw - 40px);
        max-width: 400px;
        left: 20px;
        right: 20px;
    }

    .pg-chatbot-message-content {
        max-width: 85%;
    }

    .pg-chatbot-header {
        padding: 15px;
    }

    .pg-chatbot-header-text h4 {
        font-size: 14px;
    }

    .pg-chatbot-body {
        padding: 15px;
    }

    .pg-chatbot-input-area {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .pg-chatbot-widget {
        bottom: 15px;
        left: 15px;
        right: auto;
    }

    .pg-chatbot-window {
        width: calc(100vw - 30px);
        max-width: none;
        height: calc(100vh - 80px);
        max-height: 600px;
        bottom: 75px;
        left: 15px;
        right: 15px;
        border-radius: 15px;
    }

    .pg-chatbot-toggle {
        width: 55px;
        height: 55px;
        font-size: 20px;
    }

    .pg-chatbot-header {
        padding: 12px 15px;
    }

    .pg-chatbot-header-text h4 {
        font-size: 14px;
    }

    .pg-chatbot-status {
        font-size: 11px;
    }

    .pg-chatbot-avatar {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .pg-chatbot-body {
        padding: 12px;
        gap: 12px;
    }

    .pg-chatbot-message-content {
        max-width: 90%;
        padding: 10px 14px;
        font-size: 13px;
    }

    .pg-chatbot-message-avatar {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .pg-chatbot-button {
        padding: 10px 14px;
        font-size: 13px;
    }

    .pg-chatbot-input-area {
        padding: 10px;
    }

    .pg-chatbot-input {
        padding: 10px 12px;
        font-size: 13px;
    }

    .pg-chatbot-send {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .pg-chatbot-form-field label {
        font-size: 11px;
    }

    .pg-chatbot-form-field input,
    .pg-chatbot-form-field select {
        padding: 8px 12px;
        font-size: 13px;
    }
}

@media (max-width: 360px) {
    .pg-chatbot-window {
        width: calc(100vw - 20px);
        left: 10px;
        right: 10px;
        bottom: 70px;
    }

    .pg-chatbot-toggle {
        width: 50px;
        height: 50px;
        font-size: 18px;
    }

    .pg-chatbot-message-content {
        max-width: 95%;
        font-size: 12px;
    }
}

/* Loading Animation */
.pg-chatbot-typing {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
}

.pg-chatbot-typing span {
    width: 8px;
    height: 8px;
    background: #999;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.pg-chatbot-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.pg-chatbot-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

