/* Chatbot Widget Styles */

.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    font-family: 'Arial', sans-serif;
}

/* Chat Button */
.chatbot-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #ff5722;
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
    position: relative;
}

.chatbot-button:hover {
    background-color: #e64a19;
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.chatbot-button.active {
    background-color: #e64a19;
}

.chatbot-button .chat-icon {
    width: 30px;
    height: 30px;
}

/* Notification Badge */
.chatbot-button .notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ff0000;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Chat Window */
.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 600px;
    max-height: 80vh;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

.chatbot-window.active {
    display: flex;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Chat Header */
.chatbot-header {
    background: linear-gradient(135deg, #ff5722 0%, #e64a19 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 12px 12px 0 0;
}

.chatbot-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
}

.chatbot-header .status {
    font-size: 12px;
    opacity: 0.9;
    margin-top: 4px;
}

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

.chatbot-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Chat Messages Area */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background-color: #f5f5f5;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Message Bubbles */
.chatbot-message {
    display: flex;
    margin-bottom: 12px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chatbot-message.user {
    justify-content: flex-end;
}

.chatbot-message.bot {
    justify-content: flex-start;
}

.message-bubble {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 18px;
    word-wrap: break-word;
    line-height: 1.4;
}

.chatbot-message.user .message-bubble {
    background-color: #ff5722;
    color: white;
    border-bottom-right-radius: 4px;
}

.chatbot-message.bot .message-bubble {
    background-color: white;
    color: #333;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Typing Indicator */
.chatbot-typing {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
}

.chatbot-typing span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #999;
    animation: typing 1.4s infinite;
}

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

.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;
    }
}

/* Quick Action Buttons */
.chatbot-quick-actions {
    padding: 12px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    background-color: #f9f9f9;
    border-top: 1px solid #e0e0e0;
}

.quick-action-btn {
    padding: 8px 12px;
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    color: #333;
    transition: all 0.2s;
    white-space: nowrap;
}

.quick-action-btn:hover {
    background-color: #ff5722;
    color: white;
    border-color: #ff5722;
}

/* Chat Input Area */
.chatbot-input-area {
    padding: 16px 20px;
    background-color: white;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 8px;
    align-items: center;
}

.chatbot-input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 24px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.chatbot-input:focus {
    border-color: #ff5722;
}

.chatbot-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #ff5722;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.chatbot-send:hover {
    background-color: #e64a19;
}

.chatbot-send:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Service Cards in Messages */
.service-card {
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    margin-top: 8px;
}

.service-card h4 {
    margin: 0 0 8px 0;
    color: #ff5722;
    font-size: 16px;
}

.service-card .price {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin: 8px 0;
}

.service-card .description {
    font-size: 14px;
    color: #666;
    margin: 8px 0;
}

.service-card .book-btn {
    margin-top: 8px;
    padding: 8px 16px;
    background-color: #ff5722;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    width: 100%;
}

.service-card .book-btn:hover {
    background-color: #e64a19;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .chatbot-window {
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        bottom: 0;
        right: 0;
        left: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .chatbot-container {
        bottom: 15px;
        right: 15px;
        left: auto;
    }

    .chatbot-button {
        width: 56px;
        height: 56px;
        font-size: 22px;
    }

    .chatbot-button .chat-icon {
        width: 28px;
        height: 28px;
    }

    /* Header adjustments for mobile */
    .chatbot-header {
        padding: 14px 16px;
        min-height: 60px;
    }

    .chatbot-header h3 {
        font-size: 16px;
    }

    .chatbot-header .status {
        font-size: 11px;
        margin-top: 2px;
    }

    .chatbot-close {
        width: 44px;
        height: 44px;
        font-size: 28px;
        min-width: 44px;
        min-height: 44px;
    }

    /* Messages area - better padding and spacing */
    .chatbot-messages {
        padding: 16px 12px;
        gap: 10px;
    }

    /* Message bubbles - better sizing for mobile */
    .message-bubble {
        max-width: 85%;
        padding: 14px 18px;
        font-size: 15px;
        line-height: 1.5;
        border-radius: 20px;
    }

    .chatbot-message {
        margin-bottom: 10px;
    }

    /* Quick action buttons - larger touch targets */
    .chatbot-quick-actions {
        padding: 12px 16px;
        gap: 10px;
    }

    .quick-action-btn {
        padding: 12px 16px;
        font-size: 14px;
        min-height: 44px;
        border-radius: 22px;
    }

    /* Input area - better sizing and prevent zoom on iOS */
    .chatbot-input-area {
        padding: 12px 16px;
        min-height: 70px;
    }

    .chatbot-input {
        padding: 14px 18px;
        font-size: 16px; /* Prevents zoom on iOS */
        border-radius: 28px;
        min-height: 44px;
    }

    .chatbot-send {
        width: 48px;
        height: 48px;
        min-width: 48px;
        min-height: 48px;
    }

    .chatbot-send svg {
        width: 22px;
        height: 22px;
    }

    /* Service cards - better mobile sizing */
    .service-card {
        padding: 16px;
        margin-top: 10px;
    }

    .service-card h4 {
        font-size: 17px;
        margin-bottom: 10px;
    }

    .service-card .price {
        font-size: 22px;
        margin: 10px 0;
    }

    .service-card .description {
        font-size: 15px;
        margin: 10px 0;
        line-height: 1.5;
    }

    .service-card .book-btn {
        padding: 14px 20px;
        font-size: 16px;
        min-height: 48px;
        border-radius: 6px;
    }

    /* Welcome message */
    .welcome-message {
        padding: 16px;
    }

    .welcome-message h4 {
        font-size: 18px;
    }
}

/* Extra small devices (phones in portrait, 320px and up) */
@media (max-width: 480px) {
    .chatbot-container {
        bottom: 12px;
        right: 12px;
    }

    .chatbot-button {
        width: 52px;
        height: 52px;
    }

    .chatbot-header {
        padding: 12px 14px;
    }

    .chatbot-header h3 {
        font-size: 15px;
    }

    .chatbot-messages {
        padding: 14px 10px;
    }

    .message-bubble {
        max-width: 90%;
        padding: 12px 16px;
        font-size: 14px;
    }

    .chatbot-input-area {
        padding: 10px 14px;
    }

    .chatbot-input {
        padding: 12px 16px;
        font-size: 16px;
    }

    .quick-action-btn {
        padding: 10px 14px;
        font-size: 13px;
    }
}

/* Welcome Message */
.welcome-message {
    text-align: center;
    padding: 20px;
    color: #666;
}

.welcome-message h4 {
    color: #ff5722;
    margin-bottom: 8px;
}

