/* ========== 客服组件通用样式 ========== */
.lee-cs-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99999;
}

/* ========== 右侧悬浮按钮样式 ========== */
.lee-cs-toggle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #ff7f50;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s, box-shadow 0.3s;
}

.lee-cs-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.lee-cs-toggle-btn svg {
    width: 28px;
    height: 28px;
}

/* ========== 弹出表单样式 ========== */
.lee-cs-popup {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 400px;
    max-height: 90vh;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: none;
    flex-direction: column;
}

.lee-cs-popup.active {
    display: flex;
    animation: slideUp 0.3s ease-out;
}

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

/* ========== 表单头部样式 ========== */
.lee-cs-header {
    background: linear-gradient(135deg, #d4a869 0%, #c49a5e 100%);
    padding: 25px 20px;
    text-align: center;
    position: relative;
}

.lee-cs-header h3 {
    color: #fff;
    font-size: 22px;
    margin: 0 0 8px 0;
    font-weight: 600;
}

.lee-cs-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    margin: 0;
    line-height: 1.4;
}

.lee-cs-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.lee-cs-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lee-cs-close-btn svg {
    width: 20px;
    height: 20px;
}

/* ========== 表单内容样式 ========== */
.lee-cs-form {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
    background: #f9fafb;
}

.lee-cs-field {
    margin-bottom: 18px;
}

.lee-cs-field label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.lee-cs-field label span {
    color: #ef4444;
}

.lee-cs-field input,
.lee-cs-field textarea {
    width: 100% !important;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.lee-cs-field input:focus,
.lee-cs-field textarea:focus {
    outline: none;
    border-color: #d4a869;
    box-shadow: 0 0 0 3px rgba(212, 168, 105, 0.1);
}

.lee-cs-field textarea {
    resize: vertical;
    min-height: 100px;
}

.lee-cs-message {
    margin: 15px 0;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 14px;
    display: none;
}

.lee-cs-message.success {
    display: block;
    background: #d1fae5;
    color: #065f46;
}

.lee-cs-message.error {
    display: block;
    background: #fee2e2;
    color: #991b1b;
}

.lee-cs-submit-btn {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #d4a869 0%, #c49a5e 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.lee-cs-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212, 168, 105, 0.3);
}

.lee-cs-submit-btn:active {
    transform: translateY(0);
}

.lee-cs-submit-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ========== 遮罩层样式 ========== */
.lee-cs-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99998;
    display: none;
}

.lee-cs-overlay.active {
    display: block;
}

/* ========== 平板端响应式 (≤768px) ========== */
@media (max-width: 768px) {
    .lee-cs-widget {
        bottom: 15px;
        right: 15px;
    }

    .lee-cs-toggle-btn {
        width: 54px;
        height: 54px;
    }

    .lee-cs-popup {
        width: 350px;
        bottom: 70px;
    }
}

/* ========== 手机端响应式 (≤480px) ========== */
/* 手机端表单铺满屏幕 */
@media (max-width: 480px) {
    .lee-cs-widget {
        bottom: 10px;
        right: 10px;
    }

    .lee-cs-popup {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-height: none;
        border-radius: 0;
        animation: fadeIn 0.3s ease-out;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }
        to {
            opacity: 1;
        }
    }

    .lee-cs-header {
        padding: 30px 20px 25px;
    }

    .lee-cs-form {
        padding: 20px;
    }
}
