:root {
    --primary-color: #0A7E3E;
    --primary-hover: #096A34;
    --text-primary: #1A1A1A;
    --text-secondary: #666666;
    --border-color: #E5E5E5;
    --bg-white: #FFFFFF;
    --bg-gray: #F5F5F5;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    --radius: 16px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Trigger Button */
.chatbot-trigger {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-color);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    z-index: 999;
}

.chatbot-trigger:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

.chatbot-trigger:active {
    transform: scale(0.95);
}

/* Widget Container */
.chatbot-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 480px;
    max-width: calc(100vw - 48px);
    height: 750px;
    max-height: calc(100vh - 48px);
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: var(--transition);
    overflow: hidden;
}

.chatbot-widget.hidden {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95) translateY(20px);
}

/* Header */
.chatbot-header {
    background: var(--text-primary);
    color: white;
    padding: 20px;
    border-radius: var(--radius) var(--radius) 0 0;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.close-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

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

.header-title h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.header-title p {
    font-size: 12px;
    opacity: 0.7;
    margin: 2px 0 0;
}

/* Messages Container */
.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    padding-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.messages-container::-webkit-scrollbar-track {
    background: transparent;
}

.messages-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

/* Message Bubbles */
.message-wrapper {
    display: flex;
    gap: 12px;
    animation: slideIn 0.3s ease-out;
}

.message-wrapper.user-message {
    flex-direction: row-reverse;
}

.bot-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.message-content {
    max-width: 75%;
    background: var(--bg-gray);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
}

.user-message .message-content {
    background: var(--primary-color);
    color: white;
}

.message-content p {
    margin: 0 0 8px;
}

.message-content p:last-child {
    margin: 0;
}

.message-content a {
    color: var(--primary-color);
    text-decoration: none;
}

.user-message .message-content a {
    color: white;
    text-decoration: underline;
}

/* Venue Cards */
.venue-card {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin: 8px 0 16px 0;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}

.venue-card:last-child {
    margin-bottom: 24px;
}

.venue-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.venue-image {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-gray);
}

.venue-info {
    flex: 1;
    min-width: 0;
}

.venue-name {
    font-weight: 600;
    font-size: 14px;
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.venue-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--primary-color);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
}

.venue-location {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 4px 0;
}

.venue-credits {
    font-size: 12px;
    color: var(--text-primary);
    font-weight: 500;
}

/* Follow-up Questions */
.followup-container {
    padding: 12px 20px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-gray);
    transition: var(--transition);
    max-height: 200px;
    overflow-y: auto;
    flex-shrink: 0;
}

.followup-container.hidden {
    display: none;
}

.followup-title {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}

.followup-questions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.followup-container::-webkit-scrollbar {
    width: 6px;
}

.followup-container::-webkit-scrollbar-track {
    background: transparent;
}

.followup-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.followup-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-size: 13px;
    color: var(--text-primary);
    text-align: left;
}

.followup-btn:hover {
    border-color: var(--primary-color);
    background: rgba(10, 126, 62, 0.05);
}

.followup-btn svg {
    flex-shrink: 0;
    opacity: 0.6;
}

/* Input Container */
.input-container {
    display: flex;
    gap: 8px;
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    background: white;
}

.message-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    font-size: 14px;
    outline: none;
    transition: var(--transition);
    font-family: inherit;
}

.message-input:focus {
    border-color: var(--primary-color);
}

.message-input::placeholder {
    color: var(--text-secondary);
}

.send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.send-btn:hover {
    background: var(--primary-hover);
}

.send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Footer */
.chatbot-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-gray);
}

.chatbot-footer p {
    font-size: 11px;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.4;
}

.chatbot-footer a {
    color: var(--text-secondary);
    text-decoration: underline;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-secondary);
    animation: typing 1.4s infinite;
}

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

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

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

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 480px) {
    .chatbot-widget {
        bottom: 0;
        right: 0;
        width: 100vw;
        height: 100vh;
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
    }

    .chatbot-header {
        border-radius: 0;
    }

    .message-content {
        max-width: 80%;
    }
}

/* Loading State */
.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
