/**
 * Chat Bot Widget Styles
 * Version 1.1 (Final with layout fixes)
 */

/* Chat Bot Widget Container */
.chat-bot-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.chat-bot-widget i {
    font-style: normal;
}

/* Chat Button */
.chat-bot-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 20px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    min-width: 200px;
}

.chat-bot-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

/* Chat Window */
.chat-bot-window {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    height: 500px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.9);
    transition: all 0.3s ease;
}

.chat-bot-window.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Chat Header */
.chat-bot-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 20px 20px 0 0;
}

.chat-bot-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
}

.chat-bot-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
    font-size: 16px;
}

/* Chat Messages */
.chat-bot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8f9fa;
}

/* Message Styles */
.chat-bot-message {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease;
}

.chat-bot-message.bot { align-items: flex-start; }
.chat-bot-message.user { align-items: flex-end; }

.chat-bot-message-content {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 18px;
    position: relative;
    word-wrap: break-word;
}

.chat-bot-message.bot .chat-bot-message-content {
    background: white;
    color: #333;
    border: 1px solid #e9ecef;
    border-radius: 18px 18px 18px 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.chat-bot-message.user .chat-bot-message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 18px 18px 4px 18px;
}

.chat-bot-message-text {
    font-size: 14px;
    line-height: 1.4;
    white-space: pre-line;
}

/* Button Options */
.chat-bot-buttons {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-bot-button-option {
    background: white;
    border: 2px solid #667eea;
    color: #667eea;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-align: left;
    line-height: 1.4;
    min-height: 44px;
}

.chat-bot-button-option:hover {
    background: #667eea;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.chat-bot-button-option.disabled {
    pointer-events: none;
    background-color: #f0f0f0 !important;
    color: #aaa !important;
    border-color: #ddd !important;
    box-shadow: none;
    transform: none;
}

.chat-bot-button-option.selected {
    background: #667eea !important;
    color: white !important;
    font-weight: 600;
    box-shadow: none;
    transform: none;
}


.service-button-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 10px;
}

.service-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    flex-grow: 1;
    flex-shrink: 1;
    min-width: 0;
}

.service-name span {
    white-space: normal;
    word-break: break-word;
}

.service-time {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    background-color: #f8f9fa;
    padding: 4px 8px;
    border-radius: 12px;
    color: #555;
    flex-shrink: 0;
}

.service-icon, .time-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
    flex-shrink: 0;
}

.service-time .time-icon {
    width: 14px;
    height: 14px;
}


/* Input Area */
.chat-bot-input {
    padding: 15px 20px;
    background: white;
    border-top: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-bot-input input {
    flex: 1;
    border: 1px solid #e9ecef;
    border-radius: 25px;
    padding: 10px 15px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

.chat-bot-input input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.chat-bot-input button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

/* Responsive Design */
@media (max-width: 480px) {
    .chat-bot-window {
        width: 100%;
        height: 100%;
        bottom: 0;
        right: 0;
        left: 0;
        top: 0;
        border-radius: 0;
    }
}

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