/* 基础重置：统一字体大小继承，避免主题干扰 */
.gfc-container * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 14px !important; /* 统一字体大小基准（电脑端14px，大字体标准） */
    line-height: 1.5 !important; /* 统一行高，确保可读性 */
}

/* 核心容器：固定在左下角，强制悬浮 */
.gfc-container {
    bottom: 30px !important;
    left: 30px !important;
    right: auto !important;
    top: auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
    position: fixed !important;
    z-index: 99999 !important;
}

/* 表单盒子：保持2/3宽度，紧凑布局 */
.gfc-form-box {
    width: 230px !important;
    background: #fff !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 18px rgba(0,0,0,0.15) !important;
    overflow: hidden !important;
    border: 1px solid #eee !important;
    transition: all 0.3s ease !important;
}

/* 表头样式：标题字体同步14px，压缩内边距适配大字体 */
.gfc-form-header {
    background: #f8f9fa !important;
    padding: 8px 12px !important; /* 微调内边距，避免标题拥挤 */
    border-bottom: 1px solid #eee !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.gfc-form-header h3 {
    color: #333 !important;
    font-weight: 600 !important;
    margin: 0 !important;
}

/* 关闭按钮：字体14px，保持协调 */
.gfc-close-btn {
    color: #999 !important;
    cursor: pointer !important;
    display: none !important;
    transition: color 0.3s !important;
    line-height: 1 !important;
}

.gfc-close-btn:hover {
    color: #dc3232 !important;
}

/* 表单样式：压缩内边距，适配大字体 */
.gfc-form {
    padding: 12px !important; /* 微调内边距，避免文字溢出 */
}

/* 表单项组：保持紧凑行距，适配大字体 */
.gfc-form-group {
    margin-bottom: 6px !important;
    padding: 0 !important;
}

.gfc-form-group label {
    display: block !important;
    margin-bottom: 3px !important; /* 微调标签间距，避免与输入框重叠 */
    color: #666 !important;
}

/* 输入框/文本域：字体14px，微调padding适配大字体 */
.gfc-form-group input,
.gfc-form-group textarea {
    width: 100% !important;
    padding: 6px 10px !important; /* 增加左右padding，避免文字贴边 */
    border: 1px solid #ddd !important;
    border-radius: 3px !important;
    transition: border-color 0.3s, box-shadow 0.3s !important;
    box-sizing: border-box !important;
}

/* 聚焦样式保持不变 */
.gfc-form-group input:focus,
.gfc-form-group textarea:focus {
    outline: none !important;
    border-color: #dc3232 !important;
    box-shadow: 0 0 0 2px rgba(220,50,50,0.1) !important;
}

/* 文本域：保持紧凑高度，适配大字体 */
.gfc-form-group textarea {
    min-height: 60px !important; /* 微调高度，避免大字体导致内容溢出 */
    resize: vertical !important;
}

/* 错误提示：字体14px，红色保持醒目 */
.gfc-error {
    display: block !important;
    margin-top: 2px !important;
    color: #dc3232 !important;
    height: 18px !important; /* 适配14px字体高度，避免表单跳动 */
}

/* 提交按钮：字体14px，微调padding适配大字体 */
.gfc-submit-btn {
    width: 100% !important;
    padding: 8px !important; /* 增加padding，避免按钮文字拥挤 */
    background: #dc3232 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 3px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: background 0.3s !important;
    margin-top: 4px !important;
}

.gfc-submit-btn:hover {
    background: #c02b2b !important;
}

.gfc-submit-btn:disabled {
    background: #999 !important;
    cursor: not-allowed !important;
}

/* 提交反馈：字体14px，保持醒目 */
.gfc-feedback {
    margin-top: 6px !important;
    text-align: center !important;
    height: 20px !important; /* 适配14px字体高度 */
}

.gfc-feedback.success {
    color: #23a657 !important;
}

.gfc-feedback.error {
    color: #dc3232 !important;
}

/* 手机端触发按钮：字体13px（手机端大字体标准），保持协调 */
.gfc-float-trigger {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background: #dc3232 !important;
    color: #fff !important;
    border: none !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(220,50,50,0.35) !important;
    transition: all 0.3s !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
    bottom: 30px !important;
    left: 30px !important;
    right: auto !important;
    top: auto !important;
}

.gfc-float-trigger:hover {
    transform: scale(1.08) !important;
    box-shadow: 0 5px 15px rgba(220,50,50,0.45) !important;
}

/* 电脑端（≥768px）：强制显示表单，字体14px */
@media (min-width: 768px) {
    .gfc-form-box {
        opacity: 1 !important;
        visibility: visible !important;
        height: auto !important;
    }
    .gfc-float-trigger,
    .gfc-close-btn {
        display: none !important;
    }
}

/* 手机端（<768px）：统一字体13px（手机端大字体标准），同步适配 */
@media (max-width: 767px) {
    .gfc-container * {
        font-size: 13px !important; /* 手机端统一13px，大字体且适配小屏幕 */
    }

    .gfc-container {
        bottom: 20px !important;
        left: 20px !important;
        gap: 6px !important;
    }

    .gfc-form-box {
        width: 190px !important;
        opacity: 0 !important;
        visibility: hidden !important;
        height: 0 !important;
        overflow: hidden !important;
    }

    .gfc-form-box.active {
        opacity: 1 !important;
        visibility: visible !important;
        height: auto !important;
        overflow: visible !important;
    }

    .gfc-float-trigger {
        display: flex !important;
        width: 45px !important;
        height: 45px !important;
        bottom: 20px !important;
        left: 20px !important;
    }

    .gfc-close-btn {
        display: block !important;
    }

    .gfc-form-header {
        padding: 7px 10px !important;
    }

    .gfc-form {
        padding: 10px !important;
    }

    .gfc-form-group {
        margin-bottom: 5px !important;
    }

    .gfc-form-group label {
        margin-bottom: 2px !important;
    }

    .gfc-form-group input,
    .gfc-form-group textarea {
        padding: 5px 9px !important;
    }

    .gfc-form-group textarea {
        min-height: 55px !important; /* 适配手机端13px字体，避免内容溢出 */
    }

    .gfc-submit-btn {
        padding: 7px !important;
    }

    .gfc-error {
        height: 16px !important;
    }

    .gfc-feedback {
        height: 18px !important;
    }
}

/* 超小屏手机适配（<320px）：保持13px字体，适配更小屏幕 */
@media (max-width: 319px) {
    .gfc-form-box {
        width: 160px !important;
    }
    .gfc-float-trigger {
        width: 40px !important;
        height: 40px !important;
    }
    .gfc-form-group textarea {
        min-height: 50px !important;
    }
}