:root {
    --secondary-color: #0e7a99;
    --text-dark: #0C0C0C;
    --text-light: #fff;
    --border-color: rgba(12, 12, 12, 0.1);
    --bg-light: #f5f5f5;
}

#chatbot-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    font-family: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif;
    z-index: 9999;
}

.chatbot-bubble {
    width: 60px;
    height: 60px;
    background: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    position: relative;
}

.chatbot-bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(14, 122, 153, 0.25);
}

.chatbot-bubble.active {
    background: var(--secondary-color);
    opacity: 0.9;
}

.chatbot-icon {
    width: 32px;
    height: 32px;
    color: var(--text-light);
    stroke: currentColor;
}

.chatbot-label {
    position: absolute;
    bottom: -30px;
    right: 0;
    background: var(--text-dark);
    color: var(--text-light);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.chatbot-bubble:hover .chatbot-label {
    opacity: 1;
}

.chatbot-container {
    position: fixed;
    bottom: 80px;
    right: 20px;
    left: auto;
    width: 380px;
    max-height: 600px;
    background: var(--text-light);
    border-radius: 12px;
    box-shadow: 0 5px 40px rgba(0, 0, 0, 0.16);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

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

@media (max-width: 768px) {
    .chatbot-container {
        width: calc(100vw - 32px);
        max-width: 360px;
        bottom: 80px;
        right: 16px;
        left: auto;
        max-height: calc(100vh - 120px);
    }
}

.chatbot-header {
    background: var(--secondary-color);
    color: var(--text-light);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.chatbot-title h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-light);
}

.chatbot-title p {
    margin: 4px 0 0 0;
    font-size: 13px;
    opacity: 0.9;
}

.chatbot-close {
    background: transparent;
    border: none;
    color: var(--text-light);
    width: 24px;
    height: 24px;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.chatbot-close:hover {
    transform: rotate(90deg);
}

.chatbot-close svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--bg-light);
}

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

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

.chatbot-messages::-webkit-scrollbar-thumb {
    background: rgba(12, 12, 12, 0.2);
    border-radius: 3px;
}

.message-item {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

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

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

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

.message-content {
    max-width: 80%;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}

.message-bot .message-content {
    background: rgba(12, 12, 12, 0.08);
    color: var(--text-dark);
    border-bottom-left-radius: 2px;
}

.message-user .message-content {
    background: var(--secondary-color);
    color: var(--text-light);
    border-bottom-right-radius: 2px;
}

.chatbot-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 16px;
    background: var(--text-light);
    border-top: 1px solid rgba(12, 12, 12, 0.1);
}

.option-btn {
    padding: 10px 14px;
    background: rgba(14, 122, 153, 0.08);
    border: 1px solid rgba(14, 122, 153, 0.15);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
}

.option-btn:hover {
    background: var(--secondary-color);
    color: var(--text-light);
    border-color: var(--secondary-color);
    transform: translateX(-2px);
}

.option-btn:active {
    transform: scale(0.95);
}

.chatbot-form {
    padding: 16px;
    background: var(--text-light);
    border-top: 1px solid rgba(12, 12, 12, 0.1);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(12, 12, 12, 0.15);
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(14, 122, 153, 0.1);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group.mb-3 {
    margin-bottom: 12px;
}

.btn-send {
    width: 100%;
    padding: 10px 14px;
    background: var(--secondary-color);
    color: var(--text-light);
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
}

.btn-send:hover {
    background: #0a5f7d;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 122, 153, 0.3);
}

.btn-send:active {
    transform: translateY(0);
}

.mt-2 {
    margin-top: 8px;
}

.mb-3 {
    margin-bottom: 12px;
}

@media (max-width: 480px) {
    #chatbot-widget {
        bottom: 16px;
        right: 16px;
    }

    .chatbot-container {
        width: calc(100vw - 32px);
        max-height: calc(100vh - 90px);
        bottom: 70px;
        right: 16px;
        left: auto;
    }

    .chatbot-bubble {
        width: 54px;
        height: 54px;
    }

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

    .message-content {
        max-width: 85%;
    }
    
    .chatbot-messages {
        padding: 12px;
    }
    
    .chatbot-options,
    .chatbot-form {
        padding: 12px;
    }
    
    .option-btn {
        padding: 9px 12px;
        font-size: 12px;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 9px 10px;
        font-size: 12px;
    }
}
