/* ========== 客服模块样式（右下角悬浮版） ========== */

/* 蒙层（透明，不拦截点击） */
.chat__overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 10001;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.chat__overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 面板（右下角悬浮 + 留出工具栏空间） */
.chat__panel {
    position: fixed;
    right: 20px;
    bottom: 80px;
    background: var(--color-bg-white, #fff);
    border-radius: 12px;
    width: 380px;
    max-width: 90vw;
    height: 520px;
    max-height: 70vh;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    pointer-events: auto;
    margin-right: 60px;
}

/* 头部 */
.chat__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
    background: var(--color-brand-gold, #d4af37);
    color: #fff;
}

.chat__title {
    font-size: var(--font-size-xl, 20px);
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat__title svg {
    width: 22px;
    height: 22px;
    stroke: #fff;
    stroke-width: 2;
}

.chat__close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.chat__close:hover {
    background: rgba(255, 255, 255, 0.5);
}

.chat__close svg {
    width: 16px;
    height: 16px;
    stroke: #fff;
    stroke-width: 2;
}

/* 内容区 */
.chat__body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

/* 联系信息卡片 */
.chat__contact-info {
    background: #fafbfc;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat__contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: var(--font-size-base, 14px);
    color: var(--text-primary, #333);
}

.chat__contact-item svg {
    width: 18px;
    height: 18px;
    stroke: var(--color-brand-gold, #d4af37);
    stroke-width: 2;
    flex-shrink: 0;
}

.chat__contact-item a {
    color: var(--color-link, #1565c0);
    text-decoration: none;
}

.chat__contact-item a:hover {
    text-decoration: underline;
}

/* 留言表单 */
.chat__form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat__form-title {
    font-size: var(--font-size-lg, 16px);
    font-weight: 600;
    color: var(--text-primary, #333);
    margin: 0;
}

.chat__form-input,
.chat__form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: var(--font-size-base, 14px);
    font-family: inherit;
    resize: none;
    transition: border-color 0.2s;
}

.chat__form-input:focus,
.chat__form-textarea:focus {
    border-color: var(--color-brand-gold, #d4af37);
    outline: none;
}

.chat__form-textarea {
    min-height: 80px;
}

.chat__form-submit {
    padding: 12px;
    background: var(--color-brand-gold, #d4af37);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: var(--font-size-lg, 16px);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.chat__form-submit:hover {
    background: #c19d2f;
}

.chat__form-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* 成功提示 */
.chat__success {
    text-align: center;
    padding: 30px 20px;
    color: var(--color-success, #2e7d32);
    font-size: var(--font-size-lg, 16px);
}

.chat__success svg {
    width: 48px;
    height: 48px;
    stroke: var(--color-success, #2e7d32);
    stroke-width: 1.5;
    margin-bottom: 12px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .chat__panel {
        width: 96vw;
        max-height: 70vh;
        border-radius: 12px 12px 0 0;
        margin-right: 0;
    }
}