/* AI 聊天组件样式 - 云顶会所 */
.ai-fab {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d4af37, #b8860b);
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.5);
    z-index: 9999;
    font-size: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}
.ai-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.7);
}
.ai-fab .pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #d4af37;
    opacity: 0.5;
    animation: ai-pulse 2s infinite;
}
@keyframes ai-pulse {
    0% { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(1.5); opacity: 0; }
}

.ai-chat-window {
    position: fixed;
    bottom: 160px;
    right: 20px;
    width: 360px;
    max-width: calc(100vw - 40px);
    height: 520px;
    max-height: calc(100vh - 200px);
    background: #1a1a1a;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #333;
}
.ai-chat-window.active {
    display: flex;
    animation: ai-slideUp 0.3s ease;
}
@keyframes ai-slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.ai-chat-header {
    background: linear-gradient(135deg, #d4af37, #b8860b);
    color: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.ai-chat-header .title {
    font-size: 16px;
    font-weight: bold;
}
.ai-chat-header .close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    padding: 0 4px;
}

.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ai-chat-messages::-webkit-scrollbar {
    width: 4px;
}
.ai-chat-messages::-webkit-scrollbar-thumb {
    background: #d4af37;
    border-radius: 2px;
}

.ai-msg {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.6;
    word-wrap: break-word;
}
.ai-msg.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #d4af37, #b8860b);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.ai-msg.bot {
    align-self: flex-start;
    background: #2a2a2a;
    color: #e0e0e0;
    border: 1px solid #333;
    border-bottom-left-radius: 4px;
}
.ai-msg.bot .tech-list {
    margin-top: 8px;
}

.ai-typing {
    align-self: flex-start;
    background: #2a2a2a;
    border: 1px solid #333;
    padding: 12px 16px;
    border-radius: 12px;
    display: flex;
    gap: 4px;
}
.ai-typing span {
    width: 8px;
    height: 8px;
    background: #d4af37;
    border-radius: 50%;
    animation: ai-bounce 1.4s infinite;
}
.ai-typing span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes ai-bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-8px); }
}

/* 技师卡片 */
.ai-tech-card {
    background: #222;
    border: 1px solid #444;
    border-radius: 12px;
    padding: 12px;
    margin-top: 10px;
    display: flex;
    gap: 12px;
    cursor: pointer;
    transition: border-color 0.2s;
}
.ai-tech-card:hover {
    border-color: #d4af37;
}
.ai-tech-card img {
    width: 60px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}
.ai-tech-card .info {
    flex: 1;
    min-width: 0;
}
.ai-tech-card .name {
    color: #d4af37;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 4px;
}
.ai-tech-card .meta {
    color: #999;
    font-size: 12px;
    line-height: 1.5;
}
.ai-tech-card .status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    margin-top: 4px;
}
.ai-tech-card .status.online {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}
.ai-tech-card .status.offline {
    background: rgba(158, 158, 158, 0.2);
    color: #9e9e9e;
}

/* 快捷问题 */
.ai-quick-questions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 16px;
    border-top: 1px solid #333;
}
.ai-quick-questions button {
    background: #2a2a2a;
    color: #d4af37;
    border: 1px solid #444;
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}
.ai-quick-questions button:hover {
    background: #d4af37;
    color: #fff;
    border-color: #d4af37;
}

.ai-chat-input {
    display: flex;
    padding: 12px;
    gap: 8px;
    border-top: 1px solid #333;
    background: #1a1a1a;
}
.ai-chat-input input {
    flex: 1;
    padding: 10px 14px;
    border-radius: 20px;
    border: 1px solid #444;
    background: #2a2a2a;
    color: #fff;
    font-size: 14px;
    outline: none;
}
.ai-chat-input input:focus {
    border-color: #d4af37;
}
.ai-chat-input button {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d4af37, #b8860b);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ai-chat-input button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    .ai-chat-window {
        right: 10px;
        left: 10px;
        width: auto;
        bottom: 80px;
        height: 60vh;
    }
}

/* 技师推荐语 */
.ai-tech-card .intro {
    color: #d4af37;
    font-size: 11px;
    line-height: 1.4;
    margin-top: 3px;
    opacity: 0.9;
}

/* 语音按钮 */
.ai-chat-input .mic-btn.recording {
    background: linear-gradient(135deg, #e53935, #b71c1c);
    animation: ai-mic-pulse 1s infinite;
}
@keyframes ai-mic-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* ========== 预约弹窗 ========== */
.ai-booking-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.ai-booking-modal.active {
    display: flex;
}
.ai-booking-box {
    background: #1a1a1a;
    border: 1px solid #d4af37;
    border-radius: 16px;
    width: 400px;
    max-width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: ai-slideUp 0.3s ease;
}
.ai-booking-header {
    background: linear-gradient(135deg, #d4af37, #b8860b);
    color: #fff;
    padding: 14px 16px;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
}
.ai-booking-header .booking-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}
.ai-booking-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ai-booking-body label {
    color: #d4af37;
    font-size: 13px;
    margin-top: 8px;
}
.ai-booking-body label i {
    color: #e53935;
    font-style: normal;
}
.ai-booking-body input[type="text"],
.ai-booking-body input[type="tel"],
.ai-booking-body select,
.ai-booking-body textarea {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #444;
    background: #2a2a2a;
    color: #fff;
    font-size: 14px;
    outline: none;
    width: 100%;
    box-sizing: border-box;
}
.ai-booking-body input:focus,
.ai-booking-body select:focus,
.ai-booking-body textarea:focus {
    border-color: #d4af37;
}
.service-type-row {
    display: flex;
    gap: 16px;
}
.service-type-row .radio-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #e0e0e0;
    font-size: 14px;
    cursor: pointer;
    margin-top: 0;
}
.service-type-row input[type="radio"] {
    accent-color: #d4af37;
    width: 16px;
    height: 16px;
}
.booking-tip {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    color: #cbb26a;
    font-size: 12px;
    line-height: 1.6;
    padding: 10px 12px;
    margin-top: 10px;
}
.booking-submit {
    margin-top: 14px;
    padding: 12px;
    border-radius: 24px;
    border: none;
    background: linear-gradient(135deg, #d4af37, #b8860b);
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}
.booking-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
