#chatbot-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#chatbot-bubble-text {
    margin-bottom: 0.5rem;
    background: #ffffff;
    color: #202124;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 999px;
    padding: 0.375rem 0.625rem;
    font-size: 0.75rem;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    pointer-events: none;
    white-space: nowrap;
}

#chatbot-bubble {
    background: linear-gradient(135deg, #1a73e8, #4285f4);
    color: white;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 20px rgba(26, 115, 232, 0.3);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    outline: none;
}

#chatbot-bubble .chatbot-bubble-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

#chatbot-bubble:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(26, 115, 232, 0.4);
}

#chatbot-bubble:active {
    transform: scale(0.95);
}

#chatbot-box {
    position: fixed;
    bottom: 6rem;
    right: 1.5rem;
    width: min(22rem, 85vw);
    height: min(32rem, 75vh);
    background: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.hidden {
    display: none !important;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

#chatbot-header {
    background: linear-gradient(135deg, #1a73e8, #4285f4);
    color: white;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: 0.2px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#chatbot-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 1.125rem;
    cursor: pointer;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

#chatbot-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

#chatbot-messages {
    flex: 1;
    padding: 1.25rem;
    overflow-y: auto;
    background: #fafbfc;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

#chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

#chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

#chatbot-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.message-wrapper {
    display: flex;
    margin-bottom: 4px;
}

.message-wrapper.user {
    justify-content: flex-end;
}

.message-wrapper.bot {
    justify-content: flex-start;
    align-items: flex-start;
    flex-direction: column;
}

.message-content-row {
    display: flex;
    align-items: flex-start;
    width: 100%;
}

.avatar {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    margin-right: 0.5rem;
    flex-shrink: 0;
    object-fit: cover;
}

.chat-message {
    max-width: 80%;
    padding: 0.75rem 1rem;
    border-radius: 1.25rem;
    line-height: 1.5;
    word-wrap: break-word;
    white-space: pre-wrap;
    font-size: 0.875rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
}

.chat-message.user {
    background: linear-gradient(135deg, #1a73e8, #4285f4);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.chat-message.bot {
    background: #ffffff;
    color: #202124;
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.chat-message-text {
    margin-bottom: 0.625rem;
}

.message-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.message-options-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chatbot-option-button {
    border: 1px solid rgba(26, 115, 232, 0.3);
    background: rgba(26, 115, 232, 0.08);
    color: #1a73e8;
    border-radius: 999px;
    padding: 0.4rem 0.75rem;
    font-size: 0.8125rem;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.chatbot-option-button:hover {
    background: #1a73e8;
    color: #ffffff;
    border-color: #1a73e8;
}

.message-options-toggle {
    align-self: flex-start;
    border: none;
    background: transparent;
    color: #1a73e8;
    font-size: 0.75rem;
    line-height: 1.2;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

#chatbot-input-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-top: 1px solid #e8eaed;
    background: #ffffff;
    padding: 0.75rem;
}

#chatbot-input {
    flex: 1;
    border: 1px solid #dadce0 !important;
    border-radius: 999px !important;
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
    outline: none;
    background: #ffffff !important;
    color: #202124;
    font-family: inherit;
    box-shadow: none !important;
    appearance: none;
    -webkit-appearance: none;
}

#chatbot-input::placeholder {
    color: #9aa0a6;
}

#chatbot-input:focus {
    border-color: #1a73e8 !important;
}

#chatbot-send {
    background: #1a73e8;
    color: white;
    border: none !important;
    width: 2.75rem;
    min-width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    cursor: pointer;
    font-size: 1rem;
    border-radius: 50% !important;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none !important;
    appearance: none;
    -webkit-appearance: none;
}

#chatbot-send:hover {
    background: #1557b0;
}

#chatbot-send:disabled {
    background: #dadce0;
    cursor: not-allowed;
}

/* Footer */
#chatbot-footer {
    background: #f8f9fa;
    padding: 0.625rem 1rem;
    text-align: center;
    border-top: 1px solid #e8eaed;
    font-size: 0.75rem;
    color: #5f6368;
}

#chatbot-footer a {
    color: #1a73e8;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

#chatbot-footer a:hover {
    color: #1557b0;
    text-decoration: underline;
}

/* Typing Animation */
.typing {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.75rem 1rem;
    background: #ffffff;
    border-radius: 1.25rem;
    max-width: 70%;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.dot {
    width: 0.375rem;
    height: 0.375rem;
    background: #1a73e8;
    border-radius: 50%;
    animation: blink 1.4s infinite ease-in-out;
}

.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes blink {
    0%, 60%, 100% { opacity: 0.4; transform: scale(0.8); }
    30% { opacity: 1; transform: scale(1); }
}

/* Booking button */
.chatbot-booking-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: linear-gradient(135deg, #1a73e8, #4285f4);
    color: #ffffff;
    border: none;
    border-radius: 999px;
    padding: 0.5rem 1.125rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    margin: 0.375rem 0;
    transition: opacity 0.2s ease, transform 0.15s ease;
    font-family: inherit;
}

.chatbot-booking-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Feedback widget */
.chatbot-feedback-widget {
    margin-top: 0.25rem;
    margin-bottom: 0.125rem;
    padding-left: 2.75rem;
    padding-right: 0.5rem;
}

.message-wrapper.bot:not(:has(.avatar)) .chatbot-feedback-widget {
    padding-left: 0;
}

.chatbot-feedback-label {
    margin: 0 0 0.375rem;
    font-size: 0.75rem;
    color: #5f6368;
    line-height: 1.3;
}

.chatbot-feedback-actions {
    display: flex;
    gap: 0.375rem;
}

.chatbot-feedback-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid #dadce0;
    border-radius: 999px;
    background: #ffffff;
    cursor: pointer;
    font-size: 0.9375rem;
    line-height: 1;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    padding: 0;
}

.chatbot-feedback-btn:hover:not(:disabled) {
    border-color: #1a73e8;
    transform: translateY(-1px);
}

.chatbot-feedback-btn:disabled {
    cursor: default;
}

.chatbot-feedback-btn.selected-positive {
    background: #e6f4ea;
    border-color: #34a853;
}

.chatbot-feedback-btn.selected-negative {
    background: #f1f3f4;
    border-color: #9aa0a6;
}

/* Lead capture form */
.chatbot-lead-form {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    margin-top: 0.25rem;
}

.chatbot-lead-form-label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #3c4043;
}

.chatbot-lead-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.chatbot-lead-form input,
.chatbot-lead-form select {
    width: 100%;
    border: 1px solid #dadce0;
    border-radius: 0.5rem;
    padding: 0.5rem 0.625rem;
    font-size: 0.8125rem;
    font-family: inherit;
    color: #202124;
    background: #ffffff;
    box-sizing: border-box;
}

.chatbot-lead-form input:focus,
.chatbot-lead-form select:focus {
    outline: none;
    border-color: #1a73e8;
}

.chatbot-lead-form input:disabled,
.chatbot-lead-form select:disabled {
    background: #f8f9fa;
    color: #80868b;
}

.chatbot-lead-form-submit {
    align-self: flex-start;
    border: none;
    border-radius: 999px;
    background: #1a73e8;
    color: #ffffff;
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
    font-family: inherit;
}

.chatbot-lead-form-submit:hover:not(:disabled) {
    background: #1557b0;
}

.chatbot-lead-form-submit:disabled {
    cursor: not-allowed;
}

.chatbot-lead-form-error {
    font-size: 0.75rem;
    color: #d93025;
    line-height: 1.3;
}

.chatbot-lead-form-success {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: #188038;
    font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 1366px) {
    #chatbot-box {
        width: min(80vw, 20rem);
        height: min(65vh, 28rem);
        bottom: 5rem;
        right: 1.25rem;
        left: auto;
        max-width: 20rem;
    }
    
    #chatbot-bubble {
        bottom: 1.25rem;
        right: 1.25rem;
        width: 3.25rem;
        height: 3.25rem;
        font-size: 1.25rem;
    }
    
    #chatbot-header {
        padding: 1rem 1.125rem;
        font-size: 0.9rem;
    }
    
    #chatbot-close {
        width: 1.625rem;
        height: 1.625rem;
        font-size: 0.95rem;
    }
    
    #chatbot-messages {
        padding: 1rem;
        gap: 0.625rem;
    }
    
    .chat-message {
        max-width: 85%;
        font-size: 0.8125rem;
        padding: 0.625rem 0.875rem;
    }
    
    .avatar {
        width: 1.875rem;
        height: 1.875rem;
        margin-right: 0.375rem;
    }
    
    #chatbot-input {
        padding: 0.875rem 1.125rem;
        font-size: 0.95rem;
    }
    
    #chatbot-send {
        padding: 0 0.95rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 1024px) {
    #chatbot-box {
        width: min(82vw, 18rem);
        height: min(68vh, 26rem);
        bottom: 4.5rem;
        right: 1.125rem;
        left: auto;
        max-width: 18rem;
    }
    
    #chatbot-bubble {
        bottom: 1.125rem;
        right: 1.125rem;
        width: 3rem;
        height: 3rem;
        font-size: 1.2rem;
    }
    
    #chatbot-header {
        padding: 0.9rem 1rem;
        font-size: 0.875rem;
    }
    
    #chatbot-close {
        width: 1.5rem;
        height: 1.5rem;
        font-size: 0.9rem;
    }
    
    #chatbot-messages {
        padding: 0.9rem;
        gap: 0.5625rem;
    }
    
    .chat-message {
        max-width: 85%;
        font-size: 0.8rem;
        padding: 0.5625rem 0.8125rem;
    }
    
    .avatar {
        width: 1.75rem;
        height: 1.75rem;
        margin-right: 0.35rem;
    }
    
    #chatbot-input {
        padding: 0.8125rem 1rem;
        font-size: 0.925rem;
    }
    
    #chatbot-send {
        padding: 0 0.9rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 768px) {
    #chatbot-box {
        width: min(85vw, 16rem);
        height: min(70vh, 24rem);
        bottom: 4.25rem;
        right: 1rem;
        left: auto;
        max-width: 16rem;
    }
    
    #chatbot-bubble {
        bottom: 1rem;
        right: 1rem;
        width: 2.75rem;
        height: 2.75rem;
        font-size: 1.125rem;
    }
    
    #chatbot-header {
        padding: 0.8125rem 0.9375rem;
        font-size: 0.8125rem;
    }
    
    #chatbot-close {
        width: 1.375rem;
        height: 1.375rem;
        font-size: 0.8125rem;
    }
    
    #chatbot-messages {
        padding: 0.8125rem;
        gap: 0.5rem;
    }
    
    .chat-message {
        max-width: 87%;
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
    }
    
    .avatar {
        width: 1.625rem;
        height: 1.625rem;
        margin-right: 0.3125rem;
    }
    
    #chatbot-input {
        padding: 0.75rem 0.9375rem;
        font-size: 0.9rem;
    }
    
    #chatbot-send {
        padding: 0 0.8125rem;
        font-size: 0.8125rem;
    }
}

@media (max-width: 768px) {
    .chatbot-feedback-widget {
        padding-left: 2.125rem;
    }

    .chatbot-lead-form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    #chatbot-container {
        bottom: 0.9375rem;
        right: 0.9375rem;
    }
    
    #chatbot-box {
        width: min(85vw, 20rem);
        height: min(70vh, 30rem);
        bottom: 4.6875rem;
        right: 0.9375rem;
        left: auto;
        max-width: 20rem;
        border-radius: 0.75rem;
    }
    
    #chatbot-bubble {
        bottom: 0.9375rem;
        right: 0.9375rem;
        width: 3.25rem;
        height: 3.25rem;
        font-size: 1.25rem;
    }
    
    #chatbot-header {
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
    }
    
    #chatbot-close {
        width: 1.5rem;
        height: 1.5rem;
        font-size: 0.875rem;
    }
    
    #chatbot-messages {
        padding: 0.75rem;
        gap: 0.5rem;
    }
    
    .chat-message {
        max-width: 90%;
        font-size: 0.8125rem;
        padding: 0.5rem 0.75rem;
    }
    
    .avatar {
        width: 1.75rem;
        height: 1.75rem;
        margin-right: 0.375rem;
    }
    
    #chatbot-input {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    #chatbot-send {
        padding: 0 0.875rem;
        font-size: 0.875rem;
    }
    
    .typing {
        padding: 0.625rem 0.875rem;
    }
}
