/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 容器 - 固定在右下角 */
.chatbot-container {
    position: fixed;
    bottom: 24px; /* 对应 bottom-6（1rem=16px，6rem=96px？此处按原代码保持 bottom-6 换算为 24px） */
    right: 24px; /* 对应 right-6 */
    z-index: 50; /* 保持层级 */
}

/* 触发按钮 */
.chatbot-toggle {
    width: 56px; /* w-14（1rem=16px，14rem=224px？此处按视觉合理值调整为 56px） */
    height: 56px;
    background-color: #165DFF; /* 假设 primary 主色为该值，可根据实际调整 */
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.chatbot-toggle:hover {
    background-color: rgba(22, 93, 255, 0.9); /* 对应 hover:bg-primary/90 */
}

/* 聊天面板 */
.chatbot-panel {
    width: 320px; /* w-80（80*4px=320px，按 tailwind 基准） */
    background-color: white;
    border-radius: 12px; /* rounded-xl */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1); /* shadow-xl */
    overflow: hidden;
    position: absolute;
    bottom: 64px; /* 位于按钮上方 */
    right: 0;
    transform-origin: bottom right;
    transform: scale(0.9);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

/* 面板显示状态 */
.chatbot-panel.active {
    transform: scale(1);
    opacity: 1;
    visibility: visible;
}

/* 面板头部 */
.chatbot-header {
    background-color: #165DFF; /* 主色 */
    color: white;
    padding: 16px; /* p-4 */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header .font-bold {
    font-weight: 600;
    font-size: 16px;
}

.chatbot-close {
    cursor: pointer;
    transition: color 0.2s ease;
}

.chatbot-close:hover {
    color: rgba(255, 255, 255, 0.8); /* 对应 hover:text-white/80 */
}

/* 面板内容区 */
.chatbot-content {
    padding: 16px; /* p-4 */
}

/* 标签切换栏 */
.chatbot-tab {
    display: flex;
    border-bottom: 1px solid #e5e7eb; /* border-b */
    margin-bottom: 16px; /* mb-4 */
}

.chatbot-tab-item {
    flex: 1;
    padding: 8px 0; /* py-2 */
    text-align: center;
    cursor: pointer;
    font-size: 14px;
    color: #6b7280;
    position: relative;
    transition: color 0.2s ease;
}

.chatbot-tab-item.active {
    color: #165DFF; /* 主色 */
    font-weight: 500;
}

/* 激活标签下划线 */
.chatbot-tab-item.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #165DFF;
}

/* 标签内容区 */
.chatbot-tab-content {
    display: none;
}

.chatbot-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* 表单样式 */
.form-group {
    margin-bottom: 12px; /* mb-3 */
}

.form-group label {
    display: block;
    font-size: 14px; /* text-sm */
    font-weight: 500; /* font-medium */
    color: #374151; /* text-gray-700 */
    margin-bottom: 4px; /* mb-1 */
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 6px 12px; /* px-3 py-2 */
    border: 1px solid #d1d5db; /* border-gray-300 */
    border-radius: 6px; /* rounded-md */
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    ring: 2px solid #165DFF; /* focus:ring-2 focus:ring-primary */
    border-color: #165DFF;
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

/* 提交按钮 */
.form-group + button {
    width: 100%;
    padding: 8px 0; /* py-2 */
    background-color: #165DFF; /* bg-primary */
    color: white;
    font-weight: 500; /* font-medium */
    border-radius: 6px; /* rounded-md */
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.form-group + button:hover {
    background-color: rgba(22, 93, 255, 0.9); /* hover:bg-primary/90 */
}

/* 表单提示 */
.form-notification {
    font-size: 12px; /* text-xs */
    color: #6b7280; /* text-gray-500 */
    margin-top: 8px; /* mt-2 */
    text-align: center;
}

/* 提交成功提示 */
.form-success {
    text-align: center;
    padding: 20px 0;
}

/* 微信二维码区域 */
.wechat-qrcode {
    text-align: center;
}

.wechat-qrcode img {
    width: 192px; /* w-48（48*4px=192px） */
    height: 192px;
    margin: 0 auto 16px; /* mx-auto mb-4 */
    border: 1px solid #e5e7eb; /* border-gray-200 */
    padding: 8px; /* p-2 */
    border-radius: 4px;
}

.wechat-desc {
    font-size: 14px; /* text-sm */
    color: #6b7280; /* text-gray-600 */
}

.wechat-desc p + p {
    margin-top: 4px; /* mt-1 */
}

/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 隐藏类 */
.hidden {
    display: none;
}