/* public/visitor.css */

/* 聊天图标和窗口容器 */
#chat-icon {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #007bff;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 60px;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 9999;
}
#chat-window-container {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    height: 500px;
    background-color: #f7f9fb;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    z-index: 9999; 
    display: none; 
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
#chat-window-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* 顶部状态栏 */
#status-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 10px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    font-weight: 600;
    z-index: 50;
}

/* 注册区域 */
#register-form-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
#register-form {
    padding: 40px;
    border-radius: 12px;
    background: white;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
}
#register-form h3 { margin-top: 0; color: #333; }
#nickname-input { padding: 10px; margin: 10px 0; border: 1px solid #ddd; border-radius: 6px; width: 200px; }
#register-form button { 
    padding: 10px 20px; 
    background-color: #007bff; 
    color: white; 
    border: none; 
    border-radius: 6px; 
    cursor: pointer; 
    transition: background-color 0.2s;
}
#register-form button:hover { background-color: #0056b3; }

/* 消息列表和输入 */
#messages { 
    list-style-type: none; 
    margin: 0; 
    padding: 60px 20px 70px; 
    overflow-y: auto;
    flex-grow: 1; 
}

/* 聊天输入区域 */
#chat-input-form { 
    background: #fff; 
    padding: 10px; 
    position: absolute; 
    bottom: 0; 
    left: 0; 
    right: 0; 
    display: none; 
    box-sizing: border-box; 
    border-top: 1px solid #eee;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.05);
}
#chat-input { flex-grow: 1; padding: 10px; margin-right: 10px; border: 1px solid #ddd; border-radius: 20px; }
#chat-input-form > button { 
    background: #5cb85c; 
    color: white; 
    border: none; 
    padding: 10px 20px; 
    border-radius: 20px; 
    cursor: pointer; 
}

/* 消息气泡样式 */
#messages > li { 
    display: flex; 
    margin-bottom: 15px; 
    align-items: flex-end;
    max-width: 80%;
}
.msg-you { justify-content: flex-end; margin-left: auto; }
.msg-you .bubble { background-color: #007bff; color: white; border-radius: 15px 15px 0 15px; }

.msg-agent { justify-content: flex-start; }
.msg-agent .bubble { background-color: #e2e6ea; color: #333; border-radius: 15px 15px 15px 0; }

.msg-system { justify-content: center; margin: 15px auto; text-align: center; max-width: 100%; }
.msg-system .bubble { background-color: transparent; color: #999; font-size: 0.9em; font-style: italic; }

.bubble {
    padding: 10px 15px;
    max-width: 100%;
    word-wrap: break-word;
    line-height: 1.4;
    font-size: 0.95em;
}
.timestamp { font-size: 0.75em; color: #888; margin: 0 5px; }