/* 水果预告圈样式 */
.ygq-publisher-container {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 20px;
}


.ygq-publisher-content {
    padding: 12px 15px;
}

.ygq-publisher-textarea {
    position: relative;
    margin-bottom: 12px;
}

.ygq-publisher-textarea textarea {
    width: 100%;
    height: 120px;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    resize: none;
    transition: border-color 0.3s;
}

.ygq-publisher-textarea textarea:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.char-count {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 12px;
    color: #999;
}

.ygq-media-uploader {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.ygq-upload-image-btn, .ygq-upload-video-btn {
    flex: 1;
    background-color: #f5f5f5;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.ygq-upload-image-btn:hover, .ygq-upload-video-btn:hover {
    background-color: #e0e0e0;
}

.ygq-image-preview-container, .ygq-video-preview-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 10px;
}

.ygq-image-preview-item {
    position: relative;
    padding-bottom: 100%;
    height: 0;
    border-radius: 6px;
    overflow: hidden;
}

.ygq-image-preview-item img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ygq-image-preview-item .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background-color: rgba(0,0,0,0.5);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
}

.ygq-video-preview-item {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    border-radius: 6px;
    overflow: hidden;
    background-color: #000;
}

.ygq-video-preview-item video {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ygq-video-preview-item .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background-color: rgba(0,0,0,0.5);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
}

.ygq-upload-progress-container {
    margin: 10px 0;
}

.ygq-upload-progress-bar {
    height: 4px;
    background-color: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
}

.ygq-upload-progress-bar::after {
    content: '';
    display: block;
    height: 100%;
    width: 0;
    background-color: #667eea;
    transition: width 0.3s;
}

.ygq-upload-progress-text {
    text-align: right;
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.ygq-publisher-footer {
    padding: 10px 15px;
    border-top: 1px solid #f0f0f0;
    text-align: right;
}

.ygq-publish-btn {
    background-color: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.ygq-publish-btn:hover {
    background-color: #5568d3;
}

.ygq-publish-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* 帖子列表样式 */
.ygq-posts-container {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 20px;
}

.ygq-post-item {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    overflow: visible; /* 确保下拉框可以显示在帖子外部 */
}

.ygq-post-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.ygq-post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 10px;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-weight: bold;
}

.ygq-post-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ygq-post-user {
    font-weight: bold;
    color: #667eea;
}

.ygq-post-time {
    font-size: 12px;
    color: #999;
    margin-left: 5px;
}

.ygq-post-content {
    margin-bottom: 10px;
    line-height: 1.5;
    word-break: break-word;
}

.ygq-post-images {
    /*display: grid;*/
    /*grid-template-columns: repeat(3, 1fr);*/
    /*gap: 5px;*/
    /*margin-bottom: 10px;*/
}

.ygq-post-image {
    /*position: relative;*/
    /*padding-bottom: 100%;*/
    /*height: 0;*/
    /*border-radius: 6px;*/
    /*overflow: hidden;*/
}

.ygq-post-image img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ygq-post-video {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    border-radius: 6px;
    overflow: hidden;
    background-color: #000;
    margin-bottom: 10px;
}

.ygq-post-video video {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ygq-post-actions {
    display: flex;
    gap: 15px;
    color: #999;
    font-size: 14px;
}

.ygq-post-action {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.ygq-post-action:hover {
    color: #667eea;
}

.ygq-post-action.like.active {
    color: #ff5050;
}

.ygq-post-action.like.loading {
    opacity: 0.7;
    pointer-events: none;
}

.ygq-post-action.like.loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: ygq-spin 0.8s linear infinite;
    margin-left: 4px;
}


.ygq-loading-indicator {
    padding: 15px;
    text-align: center;
    color: #999;
}

.ygq-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0,0,0,0.1);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: ygq-spin 1s linear infinite;
    margin-right: 5px;
}

@keyframes ygq-spin {
    to { transform: rotate(360deg); }
}

.ygq-no-more-posts {
    padding: 15px;
    text-align: center;
    color: #999;
}

/* 初始发布按钮样式 */
.ygq-publisher-container .ygq-publisher-init {
    padding: 10px;
    text-align: center;
}

.ygq-init-publish-btn {
    width: 100%;
    max-width: 300px;
    background-color: #f0f0f0;
    border: none;
    border-radius: 20px;
    padding: 10px 15px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.ygq-init-publish-btn:hover {
    background-color: #e0e0e0;
    transform: translateY(-1px);
}

.ygq-init-publish-btn::before {
    content: "+";
    font-weight: bold;
    font-size: 16px;
}

/* 发布器表单样式 */
.ygq-publisher-form {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 20px;
    animation: ygq-form-expand 0.3s ease;
}

@keyframes ygq-form-expand {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.ygq-publisher-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
}

.ygq-header-left, .ygq-header-right {
    flex: 1;
}

.ygq-header-left {
    text-align: left;
}

.ygq-header-right {
    text-align: right;
}

.ygq-cancel-btn {
    background: none;
    border: none;
    color: #999;
    font-size: 14px;
    cursor: pointer;
}

.ygq-cancel-btn:hover {
    color: #666;
}

.common-mask-content img {
    max-width: 100%;
    max-height: 80vh;
    display: block;
    margin: 0 auto;
    cursor: zoom-out;
}

/* 防止图片被用户选中 */
.ygq-post-image img {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* 添加点击效果 */
.ygq-post-image img {
    transition: transform 0.2s;
}

.ygq-post-image img:active {
    transform: scale(0.95);
}

/* 视频封面样式 */
.video-thumbnail-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    border-radius: 6px;
    overflow: hidden;
    z-index: 10; /* 确保封面在视频上方 */
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 关键：保持比例并填充整个容器 */
    border-radius: 6px;
    display: block;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    color: white;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 11;
    transition: all 0.3s ease;
    pointer-events: none;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.play-button:hover {
    background-color: rgba(0, 0, 0, 0.9);
    transform: translate(-50%, -50%) scale(1.1);
}

/* 移动端全屏优化 */
@media (max-width: 768px) {
    .play-button {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .video-js-container {
        border-radius: 4px;
    }
}

/* 小屏幕手机优化 */
@media (max-width: 480px) {
    .play-button {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
}

/* Video.js 容器样式 */
/* 通用视频容器 - 可适应不同比例 */
.video-js-container {
    position: relative;
    height: 0;
    overflow: hidden;
    border-radius: 6px;
    background-color: #000;
    margin-bottom: 10px;
    cursor: pointer;
}

/* 默认横屏比例 */
.video-js-container[data-ratio="16-9"] {
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
}

/* 竖屏比例 */
.video-js-container[data-ratio="9-16"] {
    padding-bottom: 177.78%; /* 9:16 aspect ratio (16/9 = 1.7778) */
}

.video-js {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
}


/* 自定义全屏按钮 */
.vjs-fullscreen-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    z-index: 10;
    cursor: pointer;
    opacity: 0.7;
}

.vjs-fullscreen-btn:hover {
    opacity: 1;
}

/* 全屏模式下的视频样式 */
.video-js.vjs-fullscreen {
    border-radius: 0;
}

.video-js .vjs-tech {
    border-radius: 0;
}

/* iOS微信结束提示 */
.ios-wechat-end-tips {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 0;
    font-size: 14px;
    z-index: 10;
    border-radius: 20px;
    margin: 0 10px;
}

/* 修复iOS上的播放器问题 */
.vjs-tech {
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* 自定义播放器控制栏 */
/*.vjs-control-bar {*/
/*    position: absolute !important;*/
/*    top: 0 !important;*/
/*    left: 0 !important;*/
/*    width: 100% !important;*/
/*    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%) !important;*/
/*    padding: 5px 10px !important;*/
/*    box-sizing: border-box !important;*/
/*    height: 45px !important;*/
/*    min-height: 30px !important;*/
/*    z-index: 1000 !important;*/
/*}*/


/* 隐藏原生播放按钮，使用Video.js的按钮 */
.video-thumbnail-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    border-radius: 6px;
    overflow: hidden;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

/* 隐藏Video.js默认的大播放按钮 */
.vjs-big-play-button {
    display: none !important;
}

/* 确保控制栏在全屏模式下可见 */
.video-js .vjs-control-bar {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.8) 100%) !important;
    padding: 5px 10px !important;
    box-sizing: border-box !important;
    height: 45px !important;
    min-height: 30px !important;
    z-index: 1000 !important;
    display: flex !important;
    align-items: center !important;
}



.vjs-big-play-button {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 3em !important;
    height: 2em !important;
    line-height: 2em !important;
    border-radius: 0.5em !important;
    font-size: 2.5em !important;
}

/* 搜索功能样式 */
.ygq-search-container {
    padding: 10px 15px;
    background-color: #fff;
    border-bottom: 1px solid #f0f0f0;
}

.ygq-search-box {
    display: flex;
    margin-bottom: 8px;
    /* 确保内部元素垂直居中 */
    align-items: center;
}

.ygq-search-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 20px 0 0 20px;
    font-size: 14px;
    outline: none;
    /* 关键修复：设置明确高度并确保盒模型一致 */
    height: 36px;
    box-sizing: border-box;
    margin: 0;
    line-height: normal;
}

.ygq-search-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.ygq-search-btn {
    background-color: #667eea;
    color: white;
    border: none;
    border-radius: 0 20px 20px 0;
    width: 40px;
    height: 36px; /* 关键修复：与输入框高度一致 */
    cursor: pointer;
    transition: background-color 0.3s;
    /* 关键修复：移除默认按钮样式 */
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    line-height: 1;
}

.ygq-search-btn:hover {
    background-color: #5568d3;
}

.ygq-search-filters {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 5px;
    -webkit-overflow-scrolling: touch;
}

.ygq-filter-btn {
    background-color: #f5f5f5;
    border: none;
    border-radius: 15px;
    padding: 5px 12px;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.ygq-filter-btn.active {
    background-color: #667eea;
    color: white;
}

.ygq-filter-btn:hover {
    background-color: #e0e0e0;
}

/* 搜索结果提示样式 */
.ygq-search-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #f0f9eb;
    color: #333;
    font-size: 13px;
    border-bottom: 1px solid #e6f7ee;
    animation: slideDown 0.3s ease;
}

.search-result-text {
    flex: 1;
    font-weight: 500;
}

.clear-search-btn {
    background: none;
    border: none;
    color: #666;
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.clear-search-btn:hover {
    background-color: rgba(0,0,0,0.1);
    color: #333;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 搜索高亮样式 - 修复版 */
.search-highlight {
    background-color: #ffeb3b !important;
    padding: 2px 4px !important;
    border-radius: 3px !important;
    font-weight: bold !important;
    color: #333 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3) !important;
    animation: highlightPulse 0.5s ease-in-out !important;
}

/* 高亮动画效果 */
@keyframes highlightPulse {
    0% {
        background-color: #ffff00;
        transform: scale(1);
    }
    50% {
        background-color: #ffeb3b;
        transform: scale(1.05);
    }
    100% {
        background-color: #ffeb3b;
        transform: scale(1);
    }
}

/* 确保高亮在暗色背景下也可见 */
.ygq-post-content .search-highlight {
    background-color: #ffeb3b !important;
    color: #000 !important;
}

/* 修复可能的样式冲突 */
.ygq-post-content mark.search-highlight {
    background-color: #ffeb3b !important;
    color: #333 !important;
    border: none !important;
}

/* 报价搜索匹配提示 */
.quotation-match-hint {
    display: inline-block;
    background-color: #667eea;
    color: white;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
    vertical-align: middle;
}

/* 移动端搜索优化 */
@media (max-width: 768px) {
    .ygq-search-result {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .clear-search-btn {
        padding: 3px 6px;
        font-size: 14px;
    }
}

/* 管理员操作区域 */
.ygq-post-header {
    position: relative; /* 关键：使子元素可以相对于此容器定位 */
    display: flex;
    /*justify-content: space-between;*/
    align-items: center;
    margin-bottom: 10px;
}

/* 管理员删除按钮样式 */
.ygq-admin-actions {
    position: absolute;
    right: 0;
    top: 0;
    z-index: 10;
    display: flex;
    gap: 8px;
}

.ygq-invite-supplier-btn {
    background-color: #ff9800;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s;
    min-width: 90px;
    text-align: center;
}

.ygq-invite-supplier-btn:hover {
    background-color: #e68a00;
}

/* 新增删除按钮样式 */
.ygq-delete-post-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 60px;
    text-align: center;
    position: relative;
}

.ygq-delete-post-btn:hover {
    background-color: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.3);
}

.ygq-delete-post-btn:active {
    transform: translateY(0);
}

.ygq-delete-post-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.ygq-delete-post-btn.loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: ygq-spin 0.8s linear infinite;
    margin-left: 4px;
}

/* 删除确认弹窗样式 */
.ygq-delete-confirm-modal {
    text-align: center;
    padding: 20px;
}

.ygq-delete-confirm-title {
    color: #dc3545;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
}

.ygq-delete-confirm-content {
    background: #fff5f5;
    border: 1px solid #feb2b2;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: left;
}

.ygq-delete-post-info {
    margin-bottom: 10px;
}

.ygq-delete-post-id {
    color: #666;
    font-size: 14px;
}

.ygq-delete-post-content {
    color: #333;
    font-size: 14px;
    line-height: 1.4;
    max-height: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.ygq-delete-confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.ygq-delete-cancel-btn {
    flex: 1;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px 16px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ygq-delete-cancel-btn:hover {
    background: #e9ecef;
    border-color: #ccc;
}

.ygq-delete-confirm-btn {
    flex: 1;
    background: #dc3545;
    border: none;
    border-radius: 6px;
    padding: 10px 16px;
    font-size: 14px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ygq-delete-confirm-btn:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.ygq-delete-confirm-btn:active {
    transform: translateY(0);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .ygq-admin-actions {
        position: static;
        margin-top: 8px;
        justify-content: flex-end;
    }
    
    .ygq-invite-supplier-btn,
    .ygq-delete-post-btn {
        min-width: 70px;
        font-size: 11px;
        padding: 4px 6px;
    }
    
    .ygq-delete-confirm-actions {
        flex-direction: column;
    }
    
    .ygq-delete-cancel-btn,
    .ygq-delete-confirm-btn {
        width: 100%;
    }
}

.ygq-copy-baojia-url-btn {
    background-color: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.ygq-copy-baojia-url-btn:hover {
    background-color: #5568d3;
}


/* 报价区域样式 - 新设计 */
.ygq-post-quotation {
    flex: 1;
    min-width: 0;
    max-width: 320px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.03) 0%, rgba(118, 75, 162, 0.06) 100%);
    border: 2px solid #667eea;
    border-radius: 12px;
    padding: 0px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    position: relative;
    overflow: visible !important; /* 关键：允许下拉框溢出 */
}


/*.ygq-post-quotation::before {*/
/*    content: '';*/
/*    position: absolute;*/
/*    top: 0;*/
/*    left: 0;*/
/*    right: 0;*/
/*    height: 3px;*/
/*    background: linear-gradient(90deg, #667eea, #5568d3);*/
/*}*/

.quotation-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quotation-selector {
    width: 100%;
    position: relative;
}

.quotation-dropdown {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  background-color: #f8f9fa;
  font-size: 16px;
  font-weight: 600;
  color: #2d3748;
  cursor: pointer;
  transition: all 0.3s ease;
  /* 隐藏默认箭头 */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  /* 自定义箭头 */
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2307c160' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
  padding-right: 44px; /* 为箭头留出空间 */
}

.quotation-dropdown:hover {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.quotation-dropdown:focus {
  border-color: #667eea;
  outline: none;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

/* 下拉选项列表样式 (需要JavaScript配合) */
.quotation-dropdown-options {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  max-height: 200px;
  overflow-y: auto;
}

.quotation-option {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s ease;
}

.quotation-option:hover {
  background-color: #f0f9eb;
  color: #667eea;
}

.quotation-option:last-child {
  border-bottom: none;
}

/* 售罄选项的样式 */
.quotation-option.sold-out {
  color: #999;
  background-color: #f5f5f5;
  cursor: not-allowed;
}

.quotation-prices {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: white;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #f8f9fa;
}

.price-item:last-child {
    border-bottom: none;
}

.price-label {
    font-size: 15px;
    font-weight: 600;
    color: #4a5568;
    display: flex;
    align-items: center;
    gap: 6px;
}

.price-label::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #667eea;
}

.price-value {
    font-size: 18px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    min-width: 80px;
    text-align: center;
}

.retail-price {
    color: #dc3545;
    background: linear-gradient(135deg, #fff5f5, #fed7d7);
    border: 1px solid #feb2b2;
}

.supply-price {
    color: #667eea;
    background: linear-gradient(135deg, #f0fff4, #c6f6d5);
    border: 1px solid #9ae6b4;
}

/* 价格标签特殊样式 */
.price-label.retail-label::before {
    background: #dc3545;
}

.price-label.supply-label::before {
    background: #667eea;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .ygq-post-footer {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .ygq-post-quotation {
        max-width: none;
        order: -1;
        margin-bottom: 8px;
    }
    
    .quotation-section {
        gap: 12px;
    }
    
    .quotation-dropdown {
        padding: 14px 16px;
        font-size: 16px;
    }
    
    .price-label {
        font-size: 16px;
    }
    
    .price-value {
        font-size: 20px;
        min-width: 90px;
    }
}

/* 小屏幕手机优化 */
@media (max-width: 480px) {
    .ygq-post-quotation {
        padding: 10px;
        border-width: 1px;
    }
    
    .quotation-prices {
        padding: 10px;
        flex-direction: column;
    }
    
    .price-item {
        flex-direction: row;
        align-items: center;
    }
    
    .price-label {
        font-size: 15px;
    }
    
    .price-value {
        font-size: 18px;
        min-width: 85px;
    }
}

/* 报价加载和错误状态 */
.quotation-loading {
    text-align: center;
    color: #6c757d;
    font-size: 14px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.quotation-error {
    text-align: center;
    color: #dc3545;
    font-size: 14px;
    padding: 16px;
    background: #f8d7da;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
    font-weight: 500;
}


/* 售罄开关容器 */
.sold-out-toggle-container {
    margin: 12px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

/* 售罄开关样式 */
.sold-out-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    gap: 8px;
}

.sold-out-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background-color: #ccc;
    border-radius: 24px;
    transition: background-color 0.3s ease;
}

.sold-out-slider:before {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.sold-out-checkbox:checked + .sold-out-slider {
    background-color: #dc3545;
}

.sold-out-checkbox:checked + .sold-out-slider:before {
    transform: translateX(20px);
}

.sold-out-text {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

/* 售罄开关激活状态 */
.sold-out-toggle.active .sold-out-text {
    color: #dc3545;
    font-weight: 600;
}

/* 售罄开关加载状态 */
.sold-out-toggle.loading .sold-out-slider {
    opacity: 0.6;
    cursor: not-allowed;
}

.sold-out-toggle.loading .sold-out-slider:before {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* 售罄提示消息 */
.sold-out-notice {
    margin-top: 10px;
    padding: 12px;
    background: linear-gradient(135deg, #fff5f5, #fed7d7);
    border: 1px solid #feb2b2;
    border-radius: 8px;
    text-align: center;
}

.sold-out-message {
    color: #dc3545;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.sold-out-message:before {
    content: "⚠️";
    font-size: 16px;
}

/* 下拉选项中售罄状态的样式 */
.quotation-dropdown option[data-sold-out="true"] {
    color: #dc3545;
    background-color: #fff5f5;
}

.quotation-dropdown option[data-sold-out="true"]:disabled {
    color: #999;
    background-color: #f8f9fa;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .sold-out-toggle-container {
        margin: 10px 0;
        padding: 8px;
    }
    
    .sold-out-slider {
        width: 40px;
        height: 22px;
    }
    
    .sold-out-slider:before {
        width: 18px;
        height: 18px;
    }
    
    .sold-out-checkbox:checked + .sold-out-slider:before {
        transform: translateX(18px);
    }
    
    .sold-out-notice {
        padding: 10px;
    }
    
    .sold-out-message {
        font-size: 13px;
    }
}

/* 地区选择器样式优化 */
.region-selectors select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
    padding-right: 25px;
}

.region-selectors select:disabled {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

/* 移动端优化 */
@media (max-width: 480px) {
    .region-selectors {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .region-selectors select {
        padding: 12px;
        font-size: 16px; /* 防止iOS缩放 */
    }
}

/* Swiper 图片查看器样式 */
.swiper-image-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 100002;
    display: none;
}

.swiper-image-viewer.active {
    display: block;
}

.swiper-image-viewer .swiper {
    width: 100%;
    height: 100%;
}

.swiper-image-viewer .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.swiper-image-viewer .swiper-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    user-select: none;
    -webkit-user-select: none;
}

/* 关闭按钮 */
.swiper-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    z-index: 100003;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    font-weight: 300;
}

.swiper-close-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.6);
}

/* 导航按钮 */
.swiper-button-next,
.swiper-button-prev {
    color: white !important;
    background: rgba(0, 0, 0, 0.5);
    width: 44px !important;
    height: 44px !important;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 20px !important;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

/* 分页器 */
.swiper-pagination {
    bottom: 20px !important;
}

.swiper-pagination-bullet {
    background: white !important;
    opacity: 0.5 !important;
}

.swiper-pagination-bullet-active {
    opacity: 1 !important;
    background: #667eea !important;
}

/* 缩放提示 */
.swiper-zoom-tips {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    backdrop-filter: blur(10px);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.swiper-image-viewer:hover .swiper-zoom-tips {
    opacity: 1;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .swiper-close-btn {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
    
    .swiper-button-next,
    .swiper-button-prev {
        width: 36px !important;
        height: 36px !important;
    }
    
    .swiper-button-next:after,
    .swiper-button-prev:after {
        font-size: 16px !important;
    }
}


/* 客服系统样式 */

/* 客服系统遮罩层 */
.cs-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10100; /* 保持最高层级 */
    display: none;
    backdrop-filter: blur(2px);
    animation: csOverlayFadeIn 0.3s ease;
}

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

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


.customer-service-container {
    display: block !important;
    position: fixed;
    bottom: 100px;
    right: 30px;
    z-index: 10090; /* 降低层级，在遮罩层下方 */
}

.cs-button-container {
    position: relative;
}

/* 悬浮按钮 */
.cs-floating-btn {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea, #5568d3);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative; /* 关键：为角标提供定位上下文 */
    overflow: visible;  /* 关键：确保角标不被裁剪 */
}

.cs-floating-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    z-index: 10092; /* 确保在悬浮按钮之上 */
    line-height: 1;
    animation: badgePop 0.3s ease;
}

/* 角标弹出动画 */
@keyframes badgePop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    70% {
        transform: scale(1.2);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 角标数量变化动画 */
.cs-floating-badge.update {
    animation: badgeUpdate 0.5s ease;
}

@keyframes badgeUpdate {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(1);
    }
}

/* 悬浮按钮悬停效果优化 */
.cs-floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
}

.cs-floating-btn:active {
    transform: scale(0.95);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .cs-floating-btn {
        width: 56px;
        height: 56px;
    }
    
    .cs-floating-badge {
        width: 20px;
        height: 20px;
        font-size: 11px;
        top: -4px;
        right: -4px;
    }
}

/* 小屏幕手机优化 */
@media (max-width: 480px) {
    .cs-floating-btn {
        width: 52px;
        height: 52px;
    }
    
    .cs-floating-badge {
        width: 18px;
        height: 18px;
        font-size: 10px;
        top: -3px;
        right: -3px;
    }
}

.cs-floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
}

.cs-floating-btn:active {
    transform: scale(0.95);
}

.cs-icon {
    width: 24px;
    height: 24px;
}

/* 客服聊天模态框 */
.cs-chat-modal {
    display: none !important;
    position: fixed;
    bottom: 120px;
    right: 30px;
    width: 380px;
    height: 580px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: none;
    flex-direction: column;
    z-index: 10101; /* 模态框在遮罩层之上 */
    overflow: hidden;
    animation: csModalSlideIn 0.3s ease;
}

.cs-chat-modal.active {
  display: flex !important;
}

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

/* 模态框头部 */
.cs-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea, #5568d3);
    color: white;
    flex-shrink: 0;
}

.cs-header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cs-modal-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

/* 历史记录按钮样式 */
.cs-history-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    padding: 6px 12px;
    color: white;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.cs-history-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.cs-history-icon {
    width: 14px;
    height: 14px;
}

/* 历史记录选择器模态框 */
.cs-history-modal {
    text-align: center;
    padding: 20px;
    max-width: 400px;
    position: relative;
    z-index: 10153 !important; /* 最高层级 */
}

/* 确保历史记录弹窗内容可见 */
.cs-history-modal * {
    position: relative;
    z-index: inherit;
}

.cs-history-title {
    color: #667eea;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

.cs-date-selector {
    margin-bottom: 20px;
}

.cs-date-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    text-align: center;
    transition: border-color 0.3s ease;
    background: white;
}

.cs-date-input:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.cs-date-hint {
    font-size: 12px;
    color: #666;
    margin-top: 8px;
    text-align: center;
}

.cs-history-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.cs-history-cancel {
    flex: 1;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px 16px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cs-history-cancel:hover {
    background: #e9ecef;
    border-color: #ccc;
}

.cs-history-confirm {
    flex: 1;
    background: #667eea;
    border: none;
    border-radius: 6px;
    padding: 10px 16px;
    font-size: 14px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cs-history-confirm:hover {
    background: #5568d3;
    transform: translateY(-1px);
}

.cs-history-confirm:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* 历史记录列表样式 */
.cs-history-list {
    max-height: 300px;
    overflow-y: auto;
    margin: 15px 0;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #f8f9fa;
}

.cs-history-item {
    padding: 12px 15px;
    border-bottom: 1px solid #e9ecef;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.cs-history-item:last-child {
    border-bottom: none;
}

.cs-history-item:hover {
    background: #e9ecef;
}

.cs-history-item.active {
    background: #667eea;
    color: white;
}

.cs-history-date {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.cs-history-preview {
    font-size: 12px;
    color: #666;
    opacity: 0.8;
}

.cs-history-item.active .cs-history-preview {
    color: rgba(255, 255, 255, 0.9);
}

/* 无历史记录状态 */
.cs-history-empty {
    padding: 40px 20px;
    text-align: center;
    color: #999;
}

.cs-history-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.cs-history-empty-text {
    font-size: 14px;
    margin-bottom: 8px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .cs-header-left {
        gap: 10px;
    }
    
    .cs-history-btn {
        padding: 5px 10px;
        font-size: 11px;
    }
    
    .cs-history-icon {
        width: 12px;
        height: 12px;
    }
    
    .cs-history-modal {
        padding: 15px;
    }
    
    .cs-history-actions {
        flex-direction: column;
    }
}

.cs-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s;
}

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

/* 消息容器 */
.cs-messages-container {
    flex: 1; /* 占据剩余所有空间 */
    padding: 12px 16px; /* 减少内边距 */
    overflow-y: auto;
    background: #f8f9fa;
    min-height: 0; /* 重要：允许flex子元素收缩 */
}

.cs-message {
    display: flex;
    margin-bottom: 12px; /* 减少间距 */
    animation: csMessageSlideIn 0.3s ease;
}

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

.cs-user-message {
    justify-content: flex-end;
}

.cs-agent-message {
    justify-content: flex-start;
}

/* 头像优化 */
.cs-avatar {
    width: 28px; /* 缩小头像 */
    height: 28px;
    border-radius: 50%;
    background: #667eea;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px; /* 缩小字体 */
    font-weight: bold;
    margin-right: 6px; /* 减少间距 */
    flex-shrink: 0;
}

.cs-user-message .cs-avatar {
    background: #007bff;
    margin-right: 0;
    margin-left: 6px;
}

.cs-message-content {
    display: block; /* 改为block布局而不是flex */
    max-width: 75%;
    background: white;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

/* 用户消息的特殊处理 */
.cs-user-message .cs-message-content {
    background: #007bff;
    color: white;
}

.cs-user-message .cs-message-time {
    color: rgba(255, 255, 255, 0.8);
}


.cs-user-message .cs-message-text {
    order: 0;
}

.cs-user-message .cs-cart-view-btn-container {
    order: 1;
}

/* 消息文本样式 */
.cs-message-text {
    margin-bottom: 12px; /* 增加下边距，为按钮留出空间 */
    line-height: 1.4;
    word-wrap: break-word;
    font-size: 14px;
}


.cs-message-time {
    font-size: 10px;
    color: #999;
    text-align: right;
    margin-top: 8px; /* 确保时间与按钮有适当间距 */
}



/* 快速操作区域 */
.cs-quick-actions {
    padding: 10px 16px; /* 减少内边距 */
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 70px; /* 限制最大高度 */
    overflow-y: auto;
    flex-shrink: 0; /* 防止被压缩 */
}

/* 购物车按钮样式优化 */
.cs-quick-btn {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    padding: 5px 10px;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative; /* 所有快速按钮都添加相对定位 */
    overflow: visible;  /* 确保角标不会被裁剪 */
}

.cs-quick-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-1px);
}

/* 输入区域 */
.cs-input-container {
    padding: 12px 16px; /* 减少内边距 */
    background: white;
    border-top: 1px solid #e9ecef;
    flex-shrink: 0; /* 防止被压缩 */
}

.cs-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 8px;
}

.cs-message-input {
    flex: 1;
    border: none;
    background: none;
    resize: none;
    outline: none;
    font-size: 14px;
    line-height: 1.4;
    max-height: 120px;
    min-height: 20px;
    font-family: inherit;
}

.cs-message-input::placeholder {
    color: #999;
}

.cs-send-btn {
    background: #667eea;
    border: none;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.cs-send-btn:hover:not(:disabled) {
    background: #5568d3;
    transform: scale(1.05);
}

.cs-send-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.cs-send-icon {
    width: 18px;
    height: 18px;
}

/* 欢迎消息样式 */
.cs-welcome-message {
    text-align: left;
    margin-bottom: 16px;
}

/* 加载状态 */
.cs-loading {
    display: flex;
    justify-content: center;
    padding: 8px;
}

.cs-typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #999;
    font-size: 12px;
}

.cs-typing-dots {
    display: flex;
    gap: 2px;
}

.cs-typing-dot {
    width: 4px;
    height: 4px;
    background: #999;
    border-radius: 50%;
    animation: csTyping 1.4s infinite ease-in-out;
}

.cs-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.cs-typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes csTyping {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .customer-service-container {
        bottom: 80px;
        right: 20px;
        z-index: 10090; /* 保持一致的层级 */
    }
    
    .ttb-back-to-top {
        bottom: 20px;
        right: 20px;
        z-index: 10090;
    }
    
    .cs-modal-overlay {
        backdrop-filter: none; /* 移动端性能优化 */
    }
    
    .cs-chat-modal {
        width: calc(100vw - 40px);
        height: 75vh; /* 使用视口高度百分比 */
        bottom: 100px;
        right: 20px;
        left: 20px;
        z-index: 10100; /* 模态框仍然在顶层 */
    }
    
    .cs-messages-container {
        padding: 10px 12px;
    }
    
    .cs-message-content {
        max-width: 80%; /* 移动端增加宽度 */
    }
    
    .cs-quick-actions {
        max-height: 60px;
        padding: 8px 12px;
    }
    
    .cs-input-container {
        padding: 10px 12px;
    }
    
    .cs-floating-btn {
        width: 56px;
        height: 56px;
    }
    
    .cs-icon {
        width: 22px;
        height: 22px;
    }
    
    .cs-message-content {
        max-width: 85%;
    }
    
    .cs-quick-actions {
        max-height: 60px;
    }
    
    .cs-quick-btn {
        font-size: 11px;
        padding: 4px 10px;
    }
}

/* 小屏幕手机优化 */
@media (max-width: 480px) {
    .customer-service-container {
        bottom: 70px;
        right: 15px;
        z-index: 10090;
    }
    
    .ttb-back-to-top {
        bottom: 15px;
        right: 15px;
        z-index: 10090;
    }
    
    
    .cs-chat-modal {
        width: calc(100vw - 30px);
        height: 80vh; /* 小屏幕使用更高比例 */
        bottom: 80px;
        right: 15px;
        left: 15px;
    }
    
    .cs-modal-header {
        padding: 10px 15px;
    }
    
    .cs-messages-container {
        padding: 8px 10px;
    }
    
    .cs-quick-actions {
        max-height: 55px;
        padding: 6px 10px;
    }
    
    .cs-input-container {
        padding: 8px 10px;
    }
    
    .cs-message {
        margin-bottom: 10px;
    }
    
    .cs-message-content {
        padding: 8px;
        max-width: 85%;
    }
    
   
    
}

/* 确保不与返回顶部按钮重叠 */
.ttb-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 10090; /* 与客服按钮相同的层级 */
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.ttb-back-to-top.show {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .ttb-back-to-top {
        bottom: 20px !important;
    }
}


/* 客服消息中的图片样式 */
.cs-message-image {
    margin: 8px 0;
    text-align: center;
}

.cs-qrcode-image {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.cs-qrcode-image:hover {
    transform: scale(1.02);
}

/* 移动端图片优化 */
@media (max-width: 768px) {
    .cs-qrcode-image {
        max-width: 160px;
        max-height: 160px;
    }
}

@media (max-width: 480px) {
    .cs-qrcode-image {
        max-width: 140px;
        max-height: 140px;
    }
}


/* 快速操作按钮点击反馈样式 */
.cs-quick-btn-active {
    background: #667eea !important;
    color: white !important;
    border-color: #667eea !important;
    transform: scale(0.95);
    transition: all 0.3s ease;
}

.cs-quick-btn:active {
    transform: scale(0.95);
}

/* 快速操作按钮加载状态 */
.cs-quick-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* 快速操作按钮悬停效果优化 */
.cs-quick-btn {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    padding: 5px 10px;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
   
}

.cs-quick-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-1px);
}

.cs-quick-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.cs-quick-btn:active::after {
    width: 100px;
    height: 100px;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .cs-quick-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .cs-quick-btn-active {
        transform: scale(0.92);
    }
}

/* 客服消息中的表单样式 */
.cs-shipping-form-container {
    margin: 10px 0; /* 减少外边距 */
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px; /* 减少内边距 */
    border: 1px solid #e9ecef;
}


.cs-shipping-form {
    display: flex;
    flex-direction: column;
    gap: 10px; /* 减少间距 */
}

.cs-form-group {
    display: flex;
    flex-direction: column;
    gap: 4px; /* 减少间距 */
}

.cs-form-group label {
    font-size: 13px; /* 缩小标签字体 */
    font-weight: 600;
    color: #333;
    margin-bottom: 1px;
}

.cs-form-group input,
.cs-form-group select,
.cs-form-group textarea {
    padding: 8px 10px; /* 减少内边距 */
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px; /* 缩小字体 */
    transition: border-color 0.3s ease;
    background: white;
}

.cs-form-group textarea {
    resize: vertical;
    min-height: 50px; /* 减少最小高度 */
    font-family: inherit;
}

.cs-form-group input:focus,
.cs-form-group select:focus,
.cs-form-group textarea:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.cs-form-group textarea {
    resize: vertical;
    min-height: 60px;
    font-family: inherit;
}

/* 地区选择器样式 */
.cs-region-selectors {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px; /* 减少间距 */
}

.cs-region-selectors select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
    padding-right: 25px;
}

.cs-region-selectors select:disabled {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

/* 表单操作按钮 */
.cs-form-actions {
    display: flex;
    gap: 8px; /* 减少间距 */
    margin-top: 6px;
}



.cs-form-cancel-btn {
    flex: 1;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cs-form-cancel-btn:hover {
    background: #e9ecef;
    border-color: #ccc;
}

.cs-form-submit-btn {
    flex: 2;
    background: #667eea;
    border: none;
    border-radius: 6px;
    padding: 10px;
    font-size: 14px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cs-form-submit-btn:hover {
    background: #5568d3;
    transform: translateY(-1px);
}

.cs-form-cancel-btn,
.cs-form-clear-btn,
.cs-form-submit-btn {
    padding: 8px; /* 减少内边距 */
    font-size: 13px; /* 缩小字体 */
}

/* 表单验证错误样式 */
.cs-field-error {
    border-color: #dc3545 !important;
    background-color: #fff5f5;
}

.cs-field-error-text {
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
}

/* 移动端表单优化 */
@media (max-width: 768px) {
    .cs-shipping-form-container {
        padding: 12px;
        margin: 8px 0;
    }
    
    .cs-region-selectors {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .cs-form-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .cs-form-cancel-btn,
    .cs-form-submit-btn {
        flex: none;
    }
}

@media (max-width: 480px) {
    .cs-shipping-form-container {
        padding: 10px;
    }
    
    .cs-form-group input,
    .cs-form-group select,
    .cs-form-group textarea {
        padding: 8px 10px;
        font-size: 16px; /* 防止iOS缩放 */
    }
}


/* 清除记录按钮样式 */
.cs-form-clear-btn {
    flex: 1;
    background: #ffc107;
    border: none;
    border-radius: 6px;
    padding: 10px;
    font-size: 14px;
    color: #333;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cs-form-clear-btn:hover {
    background: #e0a800;
    transform: translateY(-1px);
}

/* 移动端按钮布局调整 */
@media (max-width: 768px) {
    .cs-form-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .cs-form-cancel-btn,
    .cs-form-clear-btn,
    .cs-form-submit-btn {
        flex: none;
    }
}

/* 自定义滚动条 */
.cs-messages-container::-webkit-scrollbar {
    width: 4px;
}

.cs-messages-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.cs-messages-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

.cs-messages-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 快速操作区域滚动条 */
.cs-quick-actions::-webkit-scrollbar {
    height: 3px;
}

.cs-quick-actions::-webkit-scrollbar-track {
    background: #e9ecef;
    border-radius: 2px;
}

.cs-quick-actions::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

/* 针对华为畅享70X或特定内核的兼容性修复 */
@media screen and (max-width: 768px) {
  .cs-chat-modal {
    position: fixed;
    /* 添加GPU加速 */
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
  }
}


/* 购物车弹窗样式 */
.cs-cart-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 10102;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.cs-cart-modal.active {
    display: flex;
}

.cs-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #667eea, #5568d3);
    color: white;
    flex-shrink: 0;
}

.cs-cart-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.cs-cart-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s;
}

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

.cs-cart-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cs-cart-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    min-height: 200px;
}

.cs-cart-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.cs-cart-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.cs-cart-empty-text {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
}

.cs-cart-empty-desc {
    font-size: 14px;
    opacity: 0.7;
}

/* 购物车商品项样式 */
.cs-cart-item {
    display: flex;
    padding: 12px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 12px;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.cs-cart-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.cs-cart-item-info {
    flex: 1;
    margin-right: 12px;
}

.cs-cart-item-id {
    font-size: 14px;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 4px;
}

.cs-cart-item-spec {
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
}

.cs-cart-item-price {
    font-size: 14px;
    font-weight: 600;
    color: #dc3545;
}

.cs-cart-item-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.cs-cart-quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cs-cart-quantity-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #ddd;
    background: #667eea;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.cs-cart-quantity-btn:hover:not(:disabled) {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.cs-cart-quantity-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cs-cart-quantity {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
}

.cs-cart-item-subtotal {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.cs-cart-remove-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cs-cart-remove-btn:hover {
    background: #c82333;
}

/* 购物车底部样式 */
.cs-cart-footer {
    padding: 16px 20px;
    border-top: 1px solid #e9ecef;
    background: white;
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.cs-cart-total {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cs-cart-total-label {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.cs-cart-total-amount {
    font-size: 20px;
    font-weight: 700;
    color: #dc3545;
}

.cs-cart-checkout-btn {
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.cs-cart-checkout-btn:hover:not(:disabled) {
    background: #5568d3;
    transform: translateY(-1px);
}

.cs-cart-checkout-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* 购物车遮罩层 */
.cs-cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10101;
    display: none;
    backdrop-filter: blur(2px);
}

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

/* 购物车按钮状态指示 */
.cs-cart-btn-indicator {
    position: absolute;
    top: -6px;    /* 调整位置，确保在按钮上方 */
    right: -6px;  /* 调整位置，确保在按钮右侧 */
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;  /* 稍微减小字体 */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border: 2px solid white; /* 添加白色边框，确保在绿色背景上可见 */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    z-index: 1; /* 确保角标在最上层 */
    line-height: 1;
    min-width: 18px; /* 确保最小宽度 */
}

/* 确保购物车按钮有相对定位 */
.cs-quick-btn[data-text="购物车"] {
    position: relative; /* 关键：为角标提供定位上下文 */
}

/* 移动端适配 */
@media (max-width: 768px) {
    
    .cs-cart-btn-indicator {
        top: -5px;
        right: -5px;
        width: 16px;
        height: 16px;
        font-size: 10px;
        min-width: 16px;
    }
    
    .cs-cart-modal {
        width: 95%;
        max-height: 85vh;
    }
    
    .cs-cart-header {
        padding: 14px 16px;
    }
    
    .cs-cart-list {
        padding: 12px;
    }
    
    .cs-cart-footer {
        padding: 14px 16px;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .cs-cart-total {
        justify-content: space-between;
    }
    
    .cs-cart-checkout-btn {
        width: 100%;
    }
}


/* 加入购物车按钮样式 */
.add-to-cart-container {
    margin-top: 12px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    text-align: center;
}

.add-to-cart-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea, #5568d3);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.add-to-cart-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #5568d3, #764ba2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.add-to-cart-btn:active:not(:disabled) {
    transform: translateY(0);
}

.add-to-cart-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .add-to-cart-container {
        margin-top: 10px;
        padding: 8px;
    }
    
    .add-to-cart-btn {
        padding: 14px 16px;
        font-size: 16px;
    }
}

/* 查看购物车按钮容器样式 */
.cs-cart-view-btn-container {
    margin: 12px 0 8px 0; /* 上边距12px，下边距8px */
    text-align: center;
}

.cs-cart-view-btn {
    background: linear-gradient(135deg, #667eea, #5568d3);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.cs-cart-view-btn:hover {
    background: linear-gradient(135deg, #5568d3, #764ba2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.cs-cart-view-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}


/* 客服消息中的样式适配 */
.cs-agent-message .cs-message-content .cs-cart-view-btn-container {
    margin: 12px 0 8px 0;
}

.cs-agent-message .cs-message-content .cs-cart-view-btn {
    font-size: 14px;
    padding: 10px 20px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .cs-cart-view-btn {
        padding: 14px 20px;
        font-size: 16px;
        width: 100%;
        max-width: 200px;
    }
    
    .cs-agent-message .cs-message-content .cs-cart-view-btn {
        width: 100%;
        max-width: 180px;
    }
    
    .cs-message-text {
        margin-bottom: 10px;
    }
    
    .cs-cart-view-btn-container {
        margin: 10px 0 6px 0;
    }
}

/* 小屏幕手机优化 */
@media (max-width: 480px) {
    .cs-cart-btn-indicator {
        top: -4px;
        right: -4px;
        width: 15px;
        height: 15px;
        font-size: 9px;
        min-width: 15px;
    }
}

/* 购物车头部操作区域 */
.cs-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #667eea, #5568d3);
    color: white;
    flex-shrink: 0;
}

.cs-cart-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 清空按钮样式 */
.cs-cart-clear-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cs-cart-clear-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.cs-cart-clear-btn:active {
    transform: translateY(0);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .cs-cart-header {
        padding: 14px 16px;
    }
    
    .cs-cart-clear-btn {
        padding: 5px 10px;
        font-size: 13px;
    }
}

.cs-history-btn.return-mode {
    background: linear-gradient(135deg, #ff6b35, #ff8e53) !important;
    border: 1px solid #ff6b35 !important;
    color: white !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.4) !important;
}

.cs-history-btn.return-mode:hover {
    background: rgba(255, 255, 255, 0.4);
}


/* 系统消息样式 */
.cs-system-message {
    display: flex;
    justify-content: center;
    margin: 8px 0;
    animation: systemMessageFadeIn 0.3s ease;
}

@keyframes systemMessageFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.cs-system-content {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 16px;
    padding: 6px 12px;
    max-width: 80%;
    text-align: center;
}

.cs-system-text {
    font-size: 12px;
    color: #1565c0;
    margin-bottom: 2px;
    font-weight: 500;
}

.cs-system-time {
    font-size: 10px;
    color: #42a5f5;
}

/* 当前视图指示器 */
.cs-view-indicator {
    text-align: center;
    padding: 4px 12px;
    background: #f0f9eb;
    border-bottom: 1px solid #e6f7ee;
    font-size: 12px;
    color: #667eea;
    font-weight: 500;
}

.cs-view-indicator.history {
    background: #fff3cd;
    color: #856404;
    border-color: #ffeaa7;
}

/* 客服模式切换按钮样式 */
.cs-mode-toggle-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    padding: 6px 12px;
    color: white;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    margin-left: 8px;
}

.cs-mode-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.cs-mode-toggle-btn.agent-mode {
    background: linear-gradient(135deg, #9c27b0, #ba68c8) !important;
    border-color: #9c27b0 !important;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(156, 39, 176, 0.4);
}

.cs-mode-toggle-btn.agent-mode:hover {
    background: linear-gradient(135deg, #8e24aa, #ab47bc) !important;
    border-color: #8e24aa !important;
}

/* 客服模式下的消息样式 */
.cs-agent-message.user-query {
    background: #f3e5f5;
    border-left: 4px solid #9c27b0;
}

.cs-agent-message.user-query .cs-message-text {
    color: #4a148c;
}

.user-meta-info {
    font-size: 11px;
    color: #7b1fa2;
    margin-bottom: 6px;
    padding: 4px 8px;
    background: rgba(156, 39, 176, 0.1);
    border-radius: 4px;
}

.user-meta-info .user-name {
    font-weight: 600;
}

.user-meta-info .from-leader {
    font-style: italic;
}

/* 客服模式下的输入区域 */
.cs-agent-input-container {
    display: none;
    padding: 12px 16px;
    background: white;
    border-top: 1px solid #e9ecef;
    flex-shrink: 0;
}

.cs-agent-input-container.active {
    display: block;
}

.cs-agent-input-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px;
}

.cs-agent-reply-input {
    flex: 1;
    border: none;
    background: none;
    resize: none;
    outline: none;
    font-size: 14px;
    line-height: 1.4;
    max-height: 120px;
    min-height: 60px;
    font-family: inherit;
}

.cs-agent-send-btn {
    background: #9c27b0;
    border: none;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.cs-agent-send-btn:hover:not(:disabled) {
    background: #8e24aa;
    transform: scale(1.05);
}

.cs-agent-send-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* 选中的用户消息样式 */
.cs-message.user-query.selected {
    background: #e1bee7;
    border: 2px solid #9c27b0;
}

.cs-message.user-query {
    cursor: pointer;
    transition: all 0.3s ease;
}

.cs-message.user-query:hover {
    background: #f3e5f5;
}

/* 客服模式指示器 */
.cs-agent-mode-indicator {
    text-align: center;
    padding: 8px 12px;
    background: linear-gradient(135deg, #f3e5f5, #e1bee7);
    border-bottom: 2px solid #9c27b0;
    font-size: 12px;
    color: #7b1fa2;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.cs-agent-mode-indicator::before {
    content: "💼";
    font-size: 14px;
}

/* 无用户消息提示 */
.cs-no-user-messages {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.cs-no-user-messages-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.cs-no-user-messages-text {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
}

.cs-no-user-messages-desc {
    font-size: 14px;
    opacity: 0.7;
}

/* 客服回复消息样式 */
.cs-message.agent-reply .cs-message-content {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
}

.agent-meta-info {
    font-size: 11px;
    color: #1565c0;
    margin-bottom: 6px;
    padding: 4px 8px;
    background: rgba(33, 150, 243, 0.1);
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.agent-name {
    font-weight: 600;
}

.reply-time {
    font-size: 10px;
    opacity: 0.8;
}

/* 新回复通知样式 */
.new-reply-notification {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
    color: white;
    border-radius: 20px;
    padding: 8px 16px;
    margin: 8px 12px;
    text-align: center;
    animation: notificationSlideIn 0.5s ease;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
    transition: all 0.3s ease;
}

.notification-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
}

.notification-icon {
    font-size: 14px;
}

@keyframes notificationSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 用户消息中的用户身份信息 */
.user-identity-info {
    font-size: 10px;
    color: #fff;
    margin-bottom: 4px;
    opacity: 0.7;
}

/* 客服回复消息的动画效果 */
.cs-message.agent-reply {
    animation: messageSlideIn 0.3s ease;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 用户身份标识样式 */
.user-identity-badge {
    display: inline-block;
    background: #ff9800;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
    vertical-align: middle;
}

.user-identity-badge.guest {
    background: #9c27b0;
}

.user-identity-badge.member {
    background: #4caf50;
}

/* 返回顶部按钮隐藏状态 */
.ttb-back-to-top.hidden {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* 确保在客服窗口打开时返回顶部按钮被覆盖 */
.cs-chat-modal.active ~ .ttb-back-to-top {
    display: none !important;
}


/* 客服系统媒体上传样式 */
.cs-media-uploader {
    display: flex;
    gap: 8px;
    padding: 8px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.cs-image-uploader,
.cs-video-uploader {
    position: relative;
}

.cs-upload-image-btn,
.cs-upload-video-btn {
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cs-upload-image-btn:hover,
.cs-upload-video-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: scale(1.05);
}

.cs-upload-icon {
    width: 18px;
    height: 18px;
}

/* 媒体预览容器 */
.cs-media-preview-container {
    padding: 8px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.cs-image-preview-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 8px;
}

.cs-image-preview-item {
    position: relative;
    padding-bottom: 100%;
    height: 0;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.cs-image-preview-item img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cs-image-preview-item .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background-color: rgba(0,0,0,0.7);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    border: 1px solid white;
}

.cs-video-preview-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    border-radius: 6px;
    overflow: hidden;
    background-color: #000;
    margin-bottom: 8px;
}

.cs-video-preview-item {
    position: absolute;
    width: 100%;
    height: 100%;
}

.cs-video-preview-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cs-video-preview-item .remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background-color: rgba(0,0,0,0.7);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    border: 1px solid white;
}

/* 上传进度条 */
.cs-upload-progress-container {
    padding: 8px 16px;
    background: #f8f9fa;
}

.cs-upload-progress-bar {
    height: 4px;
    background-color: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 4px;
}

.cs-upload-progress-bar::after {
    content: '';
    display: block;
    height: 100%;
    width: 0;
    background-color: #667eea;
    transition: width 0.3s;
}

.cs-upload-progress-text {
    text-align: right;
    font-size: 12px;
    color: #666;
}

/* 消息中的图片集样式 */
.cs-image-collection {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    margin: 8px 0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.cs-image-collection:hover {
    transform: scale(1.02);
}

.cs-image-collection-item {
    position: relative;
    padding-bottom: 100%;
    height: 0;
    overflow: hidden;
    background: #f5f5f5;
}

.cs-image-collection-item img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.cs-image-collection-item:hover img {
    transform: scale(1.05);
}


.cs-image-collection-count {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
}

/* 图片集点击提示 */
.cs-image-collection::after {
    content: '点击查看大图';
    position: absolute;
    bottom: 5px;
    left: 5px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cs-image-collection:hover::after {
    opacity: 1;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .cs-media-uploader {
        padding: 6px 12px;
    }
    
    .cs-upload-image-btn,
    .cs-upload-video-btn {
        width: 32px;
        height: 32px;
    }
    
    .cs-upload-icon {
        width: 16px;
        height: 16px;
    }
    
    .cs-media-preview-container {
        padding: 6px 12px;
    }
    
    .cs-image-preview-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 4px;
    }
}

/* 添加上传进度条变量支持 */
.cs-upload-progress-bar {
    height: 4px;
    background-color: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 4px;
    position: relative;
}

.cs-upload-progress-bar::after {
    content: '';
    display: block;
    height: 100%;
    width: var(--progress-width, 0);
    background-color: #667eea;
    transition: width 0.3s;
    position: absolute;
    top: 0;
    left: 0;
}

/* 媒体预览遮罩层样式 */
.cs-media-preview-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10200;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.cs-media-preview-modal {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: previewSlideIn 0.3s ease;
}

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

.cs-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #667eea, #5568d3);
    color: white;
    flex-shrink: 0;
}

.cs-preview-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.cs-preview-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s;
}

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

.cs-preview-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    max-height: 400px;
}

/* 图片预览样式 */
.cs-images-preview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.cs-image-preview-item {
    position: relative;
    padding-bottom: 100%;
    height: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.cs-image-preview-item img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 视频预览样式 */
.cs-video-preview {
    text-align: center;
}

.cs-video-preview video {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* 预览操作按钮 */
.cs-preview-actions {
    padding: 16px 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.cs-preview-cancel-btn {
    flex: 1;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cs-preview-cancel-btn:hover {
    background: #e9ecef;
    border-color: #ccc;
}

.cs-preview-send-btn {
    flex: 2;
    background: #667eea;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cs-preview-send-btn:hover {
    background: #5568d3;
    transform: translateY(-1px);
}

.cs-preview-send-btn:active {
    transform: translateY(0);
}

/* 上传进度样式 */
.cs-upload-progress {
    text-align: center;
    padding: 20px;
}

.cs-upload-progress-bar {
    height: 6px;
    background-color: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
    position: relative;
}

.cs-upload-progress-bar::after {
    content: '';
    display: block;
    height: 100%;
    width: var(--progress-width, 0%);
    background: linear-gradient(90deg, #667eea, #5568d3);
    transition: width 0.3s;
    position: absolute;
    top: 0;
    left: 0;
}

.cs-upload-progress-text {
    font-size: 14px;
    color: #666;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .cs-media-preview-modal {
        width: 95%;
        max-height: 85vh;
    }
    
    .cs-preview-header {
        padding: 14px 16px;
    }
    
    .cs-preview-content {
        padding: 16px;
        max-height: 350px;
    }
    
    .cs-images-preview {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    
    .cs-preview-actions {
        padding: 14px 16px;
        flex-direction: column;
    }
    
    .cs-preview-cancel-btn,
    .cs-preview-send-btn {
        flex: none;
    }
}

/* 刷新暂停提示样式 */
.cs-refresh-paused-hint {
    position: sticky;
    top: 10px;
    z-index: 100;
    display: flex;
    justify-content: center;
    margin: 10px 0;
    animation: refreshHintSlideIn 0.3s ease;
}

.cs-refresh-paused-content {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
    backdrop-filter: blur(10px);
}

.cs-refresh-paused-icon {
    font-size: 14px;
}

.cs-refresh-paused-text {
    white-space: nowrap;
}

@keyframes refreshHintSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .cs-refresh-paused-content {
        padding: 6px 12px;
        font-size: 11px;
    }
    
    .cs-refresh-paused-icon {
        font-size: 12px;
    }
}

/* 回复模式提示样式 */
.cs-reply-mode-hint {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(135deg, #2196f3, #1976d2);
    color: white;
    padding: 12px 16px;
    margin: 0;
    border-bottom: 1px solid #1565c0;
    animation: replyHintSlideIn 0.3s ease;
}

.cs-reply-mode-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cs-reply-mode-icon {
    font-size: 16px;
}

.cs-reply-mode-text {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
}

.cs-reply-mode-cancel {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cs-reply-mode-cancel:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

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

/* 选中的用户消息样式增强 */
.cs-message.user-query.selected {
    background: #e3f2fd !important;
    border: 2px solid #2196f3 !important;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
    transform: scale(1.02);
    transition: all 0.3s ease;
}

.cs-message.user-query.selected .cs-message-content {
    background: transparent;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .cs-reply-mode-hint {
        padding: 10px 12px;
    }
    
    .cs-reply-mode-content {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .cs-reply-mode-text {
        font-size: 13px;
    }
    
    .cs-reply-mode-cancel {
        width: 100%;
        padding: 8px;
    }
}

/* 已读状态样式 */
.read-status {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
    margin-left: 8px;
}

.read-status.read {
    background: #4caf50;
    color: white;
}

.read-status.unread {
    background: #ff9800;
    color: white;
}

/* 已读按钮样式 */
.mark-read-btn {
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 8px;
}

.mark-read-btn:hover:not(:disabled) {
    background: #45a049;
    transform: translateY(-1px);
}

.mark-read-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* 消息操作区域布局优化 */
.cs-message-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.reply-btn {
    background: #2196f3;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reply-btn:hover {
    background: #1976d2;
    transform: translateY(-1px);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .cs-message-actions {
        flex-direction: column;
        gap: 6px;
    }
    
    .reply-btn,
    .mark-read-btn {
        width: 100%;
        text-align: center;
    }
    
    .read-status {
        margin-left: 4px;
        font-size: 10px;
        padding: 1px 4px;
    }
}


/* 无报价状态样式 */
.quotation-empty {
    text-align: center;
    color: #999;
    font-size: 14px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

/* 报价错误状态样式 */
.quotation-error {
    text-align: center;
    color: #dc3545;
    font-size: 14px;
    padding: 16px;
    background: #f8d7da;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
    font-weight: 500;
    margin-top: 10px;
    cursor: pointer;
}

.quotation-error:hover {
    background: #f1b0b7;
}

@media (max-width: 768px) {
    .ygq-load-quotation-btn {
        padding: 14px 16px;
        font-size: 16px;
    }
}

/* 查询报价按钮样式 */
.ygq-load-quotation-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea, #5568d3);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.ygq-load-quotation-btn:hover {
    background: linear-gradient(135deg, #5568d3, #764ba2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.ygq-load-quotation-btn:active {
    transform: translateY(0);
}

.ygq-load-quotation-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.ygq-load-quotation-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.ygq-load-quotation-btn.loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: ygq-spin 0.8s linear infinite;
}


/* 确保报价加载区域初始状态正确 */
.ygq-post-quotation .quotation-loading {
    display: none !important;
}

.ygq-post-quotation .quotation-result-container {
    display: none;
}

.ygq-load-quotation-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea, #5568d3);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ygq-load-quotation-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #5568d3, #764ba2);
    transform: translateY(-2px);
}

.ygq-load-quotation-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* 图片容器样式 */
/* 水果圈帖子图片动态布局样式 */
.ygq-post-images {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 10px 0;
}

.ygq-post-images-row {
    display: flex;
    gap: 4px;
    width: 100%;
}

/* 不同列数的图片布局 */
.ygq-post-image-1 {
    flex: 1;
    width: 100%;
}

.ygq-post-image-2 {
    flex: 1;
    width: calc(50% - 2px);
}

.ygq-post-image-3 {
    flex: 1;
    width: calc(33.333% - 2.67px);
}

.ygq-post-image {
    aspect-ratio: 1/1;
    overflow: hidden;
    border-radius: 8px;
    position: relative;
}

.ygq-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s;
}

.ygq-post-image img:active {
    transform: scale(0.95);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .ygq-post-images {
        gap: 3px;
    }
    
    .ygq-post-images-row {
        gap: 3px;
    }
    
    .ygq-post-image-2 {
        width: calc(50% - 1.5px);
    }
    
    .ygq-post-image-3 {
        width: calc(33.333% - 2px);
    }
}

/* 视频控制栏显示/隐藏样式 */
/* 非全屏状态下强制隐藏控制栏 */
.video-js:not(.vjs-fullscreen) .vjs-control-bar {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* 全屏状态下显示控制栏 */
.video-js.vjs-fullscreen .vjs-control-bar {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* 防止控制栏在非全屏时闪烁 */
.video-js:not(.vjs-fullscreen) .vjs-control-bar {
    pointer-events: none !important;
}

/* 确保封面在全屏模式下完全隐藏 */
.vjs-fullscreen .video-thumbnail-container {
    display: none !important;
}

/* 防止Video.js默认行为干扰 */
.video-js.vjs-has-started:not(.vjs-fullscreen) .vjs-control-bar {
    display: none !important;
}

.video-js.vjs-has-started.vjs-fullscreen .vjs-control-bar {
    display: flex !important;
}

/* 禁用控制栏的鼠标事件 */
.video-js:not(.vjs-fullscreen) .vjs-control-bar {
    pointer-events: none !important;
}

.video-js.vjs-fullscreen .vjs-control-bar {
    bottom: 0 !important;
    top: auto !important;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.8) 100%) !important;
}

/* 自定义下拉框样式 */
.custom-dropdown {
    position: relative;
    width: 100%;
    cursor: pointer;
    z-index: 1000; /* 确保在报价区内有足够高度 */
}


.dropdown-selected {
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background-color: #f8f9fa;
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.dropdown-selected:hover {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.custom-dropdown.active .dropdown-selected {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.dropdown-arrow {
    font-size: 12px;
    color: #667eea;
    transition: transform 0.3s ease;
}

.custom-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-options {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1100; /* 高于其他元素 */
    max-height: 300px; /* 增加最大高度 */
    overflow-y: auto;
    display: none;
    margin-top: 4px;
}

.custom-dropdown.active .dropdown-options {
    display: block;
}

.dropdown-option {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
    font-size: 14px;
    color: #333;
}

.dropdown-option:hover {
    background-color: #f0f9eb;
    color: #667eea;
}

.dropdown-option:last-child {
    border-bottom: none;
}

/* 售罄选项样式 */
.dropdown-option.sold-out {
    color: #999;
    background-color: #f8f9fa;
    cursor: pointer; /* 确保可点击 */
    position: relative;
}

.dropdown-option.sold-out:hover {
    background-color: #fff5f5;
    color: #dc3545;
}

/* 售罄选项的标识 */
.dropdown-option.sold-out::before {
    content: "❌ ";
    font-size: 12px;
    margin-right: 4px;
}

/* 选中的售罄选项特殊样式 */
.dropdown-option.sold-out.selected {
    background-color: #fff5f5;
    border-left: 3px solid #dc3545;
}

.dropdown-option.sold-out::after {
    content: " 🔒";
    font-size: 12px;
    margin-left: 4px;
}

/*.dropdown-option.sold-out:hover::before {*/
/*    content: "点击查看价格";*/
/*    position: absolute;*/
/*    right: 10px;*/
/*    top: 50%;*/
/*    transform: translateY(-50%);*/
/*    background: rgba(0,0,0,0.8);*/
/*    color: white;*/
/*    padding: 2px 6px;*/
/*    border-radius: 4px;*/
/*    font-size: 10px;*/
/*    white-space: nowrap;*/
/*}*/

/* 移动端优化 */
@media (max-width: 768px) {
    .dropdown-selected {
        padding: 14px 16px;
        font-size: 16px;
    }
    
    .dropdown-option {
        padding: 14px 16px;
        font-size: 16px;
    }
    
    .dropdown-options {
        max-height: 250px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }
    
}


/* 根据用户角色动态显示/隐藏价格区域 */
.ygq-post-quotation[data-user-role="团长"] .retail-price,
.ygq-post-quotation[data-user-role="团长"] .price-label.retail-label {
    display: none !important;
}

.ygq-post-quotation[data-user-role="普通用户"] .supply-price,
.ygq-post-quotation[data-user-role="普通用户"] .price-label.supply-label {
    display: none !important;
}

/* 管理员显示所有价格 */
.ygq-post-quotation[data-user-role="管理员"] .quotation-prices {
    display: block !important;
}

/* 售罄开关仅管理员可见 */
.ygq-post-quotation[data-user-role!="管理员"] .sold-out-toggle-container {
    display: none !important;
}

/* 分享按钮样式 */
.ygq-share-post-btn {
    background-color: #2196f3;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 60px;
    text-align: center;
    margin-left: 8px;
}

.ygq-share-post-btn:hover {
    background-color: #1976d2;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(33, 150, 243, 0.3);
}

.ygq-share-post-btn:active {
    transform: translateY(0);
}

/* 分享对话框样式 */
.ygq-share-dialog {
    text-align: center;
    padding: 20px;
}

.ygq-share-title {
    color: #2196f3;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
}

.ygq-share-tips {
    background: #f0f9ff;
    border: 1px solid #bbdefb;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 20px;
    text-align: left;
}

.share-tip-item {
    font-size: 13px;
    color: #1565c0;
    margin-bottom: 6px;
    padding-left: 20px;
    position: relative;
}

.share-tip-item:before {
    content: '•';
    position: absolute;
    left: 8px;
    color: #2196f3;
    font-weight: bold;
}

.ygq-content-selector {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    text-align: left;
}

.content-text {
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 15px;
    max-height: 200px;
    overflow-y: auto;
    padding: 10px;
    background: white;
    border-radius: 6px;
    border: 1px solid #ddd;
}

.selection-info {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
}


.selected-preview {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.preview-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
    min-width: 70px;
}

.selected-text {
    font-size: 16px;
    color: #999;
    flex: 1;
    min-height: 24px;
    line-height: 1.4;
    word-break: break-all;
}

.selected-preview .selected-text {
    font-size: 18px;
    color: #667eea;
    font-weight: bold;
}

.selection-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
}



.stat-item {
    font-size: 14px;
    color: #666;
}

.stat-item span {
    font-weight: bold;
    color: #2196f3;
}

.selected-count {
    background: #2196f3;
    color: white;
    border-radius: 12px;
    padding: 2px 10px;
    font-size: 12px;
    font-weight: 600;
    min-width: 40px;
    text-align: center;
}

.ygq-share-actions {
    display: flex;
    gap: 12px;
}

.ygq-share-cancel-btn {
    flex: 1;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 12px;
    font-size: 16px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ygq-share-cancel-btn:hover {
    background: #e9ecef;
    border-color: #ccc;
}

.ygq-share-confirm-btn {
    flex: 2;
    background: #2196f3;
    border: none;
    border-radius: 6px;
    padding: 12px;
    font-size: 16px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.5;
    cursor: not-allowed;
}

.ygq-share-confirm-btn:not(:disabled):hover {
    background: #1976d2;
    transform: translateY(-1px);
}

/* 微信分享指南样式 */
.ygq-wechat-share-guide {
    text-align: center;
    padding: 20px;
}

.share-guide-title {
    color: #667eea;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
}

.share-guide-content {
    background: #f0f9eb;
    border: 1px solid #d0efc2;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    text-align: left;
}

.guide-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 14px;
    color: #333;
}

.guide-item:last-child {
    margin-bottom: 0;
}

.guide-icon {
    font-size: 18px;
}

.guide-text {
    flex: 1;
}

.share-url-preview {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 20px;
    text-align: left;
}

.url-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 6px;
}

.url-text {
    font-size: 13px;
    color: #2196f3;
    word-break: break-all;
    background: white;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.share-guide-actions {
    display: flex;
    gap: 12px;
}

.guide-copy-btn {
    flex: 1;
    background: #2196f3;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 12px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.guide-copy-btn:hover {
    background: #1976d2;
    transform: translateY(-1px);
}

.guide-close-btn {
    flex: 1;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 12px;
    font-size: 16px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.guide-close-btn:hover {
    background: #e9ecef;
    border-color: #ccc;
}

/* 分享信息样式（非微信环境） */
.ygq-share-info {
    text-align: center;
    padding: 20px;
}

.share-info-title {
    color: #2196f3;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
}

.share-info-content {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    text-align: left;
}

.info-item {
    margin-bottom: 15px;
    font-size: 14px;
}

.info-item:last-child {
    margin-bottom: 0;
}

.url-box {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    margin-top: 6px;
    font-size: 13px;
    color: #2196f3;
    word-break: break-all;
    max-height: 100px;
    overflow-y: auto;
}

.share-info-tips {
    font-size: 13px;
    color: #666;
    margin-bottom: 20px;
    padding: 10px;
    background: #fff3cd;
    border-radius: 6px;
    border: 1px solid #ffeaa7;
}

.share-info-actions {
    display: flex;
    gap: 12px;
}

.info-copy-btn {
    flex: 1;
    background: #2196f3;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 12px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.info-copy-btn:hover {
    background: #1976d2;
    transform: translateY(-1px);
}

.info-open-btn {
    flex: 1;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 12px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.info-open-btn:hover {
    background: #218838;
    transform: translateY(-1px);
}

.info-close-btn {
    flex: 1;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 12px;
    font-size: 16px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.info-close-btn:hover {
    background: #e9ecef;
    border-color: #ccc;
}

/* 高亮选中的文本 */
.share-highlight {
    background-color: #ffeb3b !important;
    color: #333 !important;
    padding: 2px 0 !important;
    border-radius: 3px !important;
    animation: highlightFlash 0.5s ease-in-out !important;
}

@keyframes highlightFlash {
    0% { background-color: #ffff00; }
    100% { background-color: #ffeb3b; }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .ygq-share-post-btn {
        min-width: 50px;
        font-size: 11px;
        padding: 4px 6px;
        margin-left: 4px;
    }
    
    .ygq-share-dialog {
        padding: 15px;
    }
    
    .ygq-share-title {
        font-size: 18px;
    }
    
    .content-text {
        font-size: 16px; /* 移动端字体稍大，方便选择 */
        max-height: 300px;
    }
    
    .ygq-share-actions {
        flex-direction: column;
    }
    
    .share-guide-actions,
    .share-info-actions {
        flex-direction: column;
    }
    
    .guide-item {
        font-size: 15px;
    }
}

/* 小屏幕手机优化 */
@media (max-width: 480px) {
    .ygq-admin-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    
    .ygq-share-post-btn {
        order: 1; /* 分享按钮放在邀请按钮之后 */
        margin: 4px 0 0 4px;
    }
    
    .ygq-invite-supplier-btn {
        order: 2;
    }
    
    .ygq-delete-post-btn {
        order: 3;
    }
}


/* 文字格子选择器样式 */
.text-grid-container {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.text-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    user-select: none;
}

.empty-grid {
    text-align: center;
    color: #999;
    padding: 20px;
    font-size: 14px;
}

/* 简化的格子 */
.char-grid-simple {
    width: 40px;
    height: 40px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* PC端悬停效果 */
@media (hover: hover) {
    .char-grid-simple:hover {
        border-color: #2196f3;
        background: #f0f9ff;
        transform: translateY(-1px);
    }
}

/* 触摸设备点击效果 */
@media (hover: none) and (pointer: coarse) {
    .char-grid-simple:active {
        border-color: #2196f3;
        background: #f0f9ff;
    }
}

/* 选中状态 */
.char-grid-simple.selected {
    background: #2196f3;
    border-color: #1976d2;
    color: white;
    font-weight: bold;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(33, 150, 243, 0.3);
}



.char-grid-item {
    position: relative;
    width: 40px;
    height: 50px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.char-grid-item:hover {
    border-color: #2196f3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.1);
}

.char-grid-item.selected {
    background: #2196f3;
    border-color: #1976d2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.char-grid-item.selected .char-text {
    color: white;
    font-weight: bold;
}

.char-grid-item.selected .char-number {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(25, 118, 210, 0.5);
}

.char-text {
    font-size: 18px;
    font-weight: 500;
    color: #333;
    margin-bottom: 2px;
    transition: color 0.2s ease;
}

.char-number {
    font-size: 10px;
    color: #999;
    background: #f5f5f5;
    border-radius: 8px;
    padding: 1px 4px;
    min-width: 16px;
    text-align: center;
    transition: all 0.2s ease;
}

/* 选择控制区域 */
.selection-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
}

.clear-selection-btn {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.clear-selection-btn:hover {
    background: #e9ecef;
    border-color: #ccc;
}

.grid-hint {
    font-size: 12px;
    color: #666;
    flex: 1;
    text-align: right;
    padding-right: 10px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .text-grid {
        gap: 6px;
    }
    
    .char-grid-simple {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .text-grid-container {
        padding: 16px;
    }
    
    .selected-preview {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .preview-label {
        margin-bottom: 8px;
    }
    
    .selection-stats {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .clear-selection-btn {
        width: 100%;
        padding: 8px;
    }
    
    .char-grid-item {
        width: 36px;
        height: 46px;
    }
    
    .char-text {
        font-size: 16px;
    }
    
    .selection-controls {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }
    
    .grid-hint {
        text-align: center;
        padding-right: 0;
    }
}

@media (max-width: 480px) {
    
    .char-grid-simple {
        width: 32px;
        height: 32px;
        font-size: 15px;
        border-width: 1px;
    }
    
    
    .text-grid {
        gap: 4px;
    }
    
    .selected-text {
        font-size: 16px;
    }
    
    .char-grid-item {
        width: 32px;
        height: 42px;
    }
    
    .char-text {
        font-size: 15px;
    }
    
    .char-number {
        font-size: 9px;
    }
}

/* 大屏幕优化 */
@media (min-width: 1200px) {
    .char-grid-simple {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
    
    .text-grid {
        gap: 10px;
    }
}

/* 小屏幕手机横向模式 */
@media (max-width: 768px) and (orientation: landscape) {
     .text-grid-container {
        max-height: 200px;
        overflow-y: auto;
    }
    
    .text-grid {
        gap: 4px;
    }
    
    .char-grid-simple {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
}

/* 高DPI屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .char-grid-item {
        border-width: 1.5px;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .char-grid-item {
        min-height: 50px; /* 确保触摸目标足够大 */
    }
    
    .char-grid-item:active {
        background: #e3f2fd;
        border-color: #2196f3;
    }
    
    .char-grid-item.selected:active {
        background: #1976d2;
    }
}


/* 帖子预览样式 */
.post-preview {
    background: #f0f9ff;
    border: 1px solid #bbdefb;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 15px;
}

.post-preview-title {
    font-size: 13px;
    color: #1565c0;
    font-weight: 600;
    margin-bottom: 6px;
}

.post-preview-content {
    font-size: 13px;
    line-height: 1.5;
    color: #333;
    max-height: 80px;
    overflow-y: auto;
}

.title-box {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    margin-top: 6px;
    font-size: 15px;
    color: #2196f3;
    font-weight: bold;
    text-align: center;
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .char-grid-simple {
        border-width: 3px;
    }
    
    .char-grid-simple.selected {
        border-width: 3px;
    }
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
    .char-grid-simple {
        transition: none;
    }
}


/* 操作说明样式 */
.operation-guide {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
    font-size: 13px;
}

.operation-guide-title {
    font-weight: 600;
    color: #1565c0;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.operation-guide-title:before {
    content: '💡';
}

.operation-guide-content {
    color: #333;
    line-height: 1.5;
}

.operation-guide-content p {
    margin: 6px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.operation-guide-content p:before {
    content: '•';
    color: #2196f3;
    font-weight: bold;
}


/* 手机端触摸优化样式 */
.char-grid-simple.touch-grid {
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    touch-action: manipulation;
}

.char-grid-simple.touch-grid:active {
    transform: scale(0.95);
    background-color: rgba(102, 126, 234, 0.1);
}

.char-grid-simple.selected {
    background-color: #667eea;
    color: white;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* 触摸提示 */
.touch-hint-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.touch-hint-content {
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    text-align: center;
    backdrop-filter: blur(10px);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, -40%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

/* 手机操作提示 */
.mobile-operation-tips {
    background-color: #f5f5f5;
    border-radius: 10px;
    padding: 15px;
    margin-top: 15px;
    border-left: 4px solid #667eea;
}

.tip-title {
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    font-size: 14px;
}

.tip-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
    color: #666;
}

.tip-icon {
    margin-right: 10px;
    font-size: 16px;
}

.tip-text {
    flex: 1;
}

/* 清空按钮触摸反馈 */
.clear-selection-btn:active {
    transform: scale(0.95);
    opacity: 0.8;
}

/* 确认按钮状态 */
.ygq-share-confirm-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.ygq-share-confirm-btn:not(:disabled):active {
    transform: scale(0.98);
}


/* 微信卡片分享样式 */
.wechat-card-preview {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    margin: 15px 0;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.wechat-card-image {
    height: 150px;
    overflow: hidden;
}

.wechat-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wechat-card-content {
    padding: 12px;
}

.wechat-card-title {
    font-weight: bold;
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.wechat-card-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.wechat-card-url {
    font-size: 12px;
    color: #999;
    border-top: 1px solid #f0f0f0;
    padding-top: 8px;
    margin-top: 8px;
}

/* 分享引导界面优化 */
.share-preview {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.preview-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    font-weight: bold;
}

/* 测试分享按钮 */
.guide-test-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.guide-test-btn:hover {
    background: #06ae56;
}

/* ========== 编辑帖子对话框样式 ========== */
.ygq-edit-mask {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ygq-edit-mask.active {
    opacity: 1;
}

.ygq-edit-dialog {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.ygq-edit-mask.active .ygq-edit-dialog {
    transform: scale(1);
}

/* 对话框头部 */
.ygq-edit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.ygq-edit-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.ygq-edit-close-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.ygq-edit-close-btn:hover {
    background: #f5f5f5;
    color: #666;
}

/* 对话框内容区 */
.ygq-edit-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.ygq-edit-section {
    margin-bottom: 24px;
}

.ygq-edit-section label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

.ygq-tip {
    font-size: 12px;
    color: #999;
    font-weight: normal;
}

/* 文字输入区 */
.ygq-edit-textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    resize: vertical;
    font-family: inherit;
    transition: border-color 0.3s;
}

.ygq-edit-textarea:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 图片容器 */
.ygq-edit-images-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.ygq-edit-image-item {
    position: relative;
    padding-bottom: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
    cursor: pointer;
}

.ygq-edit-image-item img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ygq-remove-image-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s;
}

.ygq-edit-image-item:hover .ygq-remove-image-btn {
    opacity: 1;
}

.ygq-remove-image-btn:hover {
    background: rgba(255, 0, 0, 0.8);
    transform: scale(1.1);
}

/* 添加图片按钮 */
.ygq-add-image-btn {
    padding-bottom: 100%;
    position: relative;
    border: 2px dashed #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    background: #fafafa;
}

.ygq-add-image-btn:hover {
    border-color: #667eea;
    background: #f0f9eb;
}

.ygq-add-image-btn .add-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -70%);
    font-size: 32px;
    color: #999;
}

.ygq-add-image-btn:hover .add-icon {
    color: #667eea;
}

.ygq-add-image-btn .add-text {
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: #999;
}

/* 视频容器 */
.ygq-edit-video-container {
    min-height: 120px;
}

.ygq-edit-video-item {
    position: relative;
}

.ygq-edit-video-item video {
    width: 100%;
    border-radius: 8px;
    background: #000;
}

.ygq-video-actions {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.ygq-replace-video-btn,
.ygq-remove-video-btn {
    flex: 1;
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.ygq-replace-video-btn:hover {
    border-color: #667eea;
    color: #667eea;
    background: #f0f9eb;
}

.ygq-remove-video-btn:hover {
    border-color: #ff4444;
    color: #ff4444;
    background: #fff0f0;
}

/* 添加视频按钮 */
.ygq-add-video-btn {
    height: 120px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #fafafa;
    transition: all 0.3s;
}

.ygq-add-video-btn:hover {
    border-color: #667eea;
    background: #f0f9eb;
}

.ygq-add-video-btn .add-icon {
    font-size: 40px;
    color: #999;
    margin-bottom: 8px;
}

.ygq-add-video-btn:hover .add-icon {
    color: #667eea;
}

.ygq-add-video-btn .add-text {
    font-size: 14px;
    color: #999;
}

/* 对话框底部 */
.ygq-edit-footer {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid #eee;
}

.ygq-cancel-edit-btn,
.ygq-save-edit-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.ygq-cancel-edit-btn {
    background: #f5f5f5;
    color: #666;
}

.ygq-cancel-edit-btn:hover {
    background: #e0e0e0;
}

.ygq-save-edit-btn {
    background: #667eea;
    color: white;
}

.ygq-save-edit-btn:hover {
    background: #5568d3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.ygq-save-edit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* 编辑按钮样式 */
.ygq-edit-post-btn {
    background-color: #1890ff;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.ygq-edit-post-btn:hover {
    background-color: #40a9ff;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .ygq-edit-dialog {
        width: 95%;
        max-height: 95vh;
    }
    
    .ygq-edit-images-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .ygq-edit-header {
        padding: 16px;
    }
    
    .ygq-edit-content {
        padding: 16px;
    }
    
    .ygq-edit-footer {
        padding: 12px 16px;
    }
}






/* 多帖报价功能样式 */
.multi-quote-toolbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    padding: 12px 15px;
    display: none;
    z-index: 999;
}

.multi-quote-toolbar.active { display: flex; }
.multi-quote-info { font-size: 14px; color: #333; }
.multi-quote-info .count { color: #667eea; font-weight: bold; font-size: 16px; }
.multi-quote-actions { display: flex; gap: 10px; }
.multi-quote-cancel-btn, .multi-quote-generate-btn { padding: 8px 20px; border: none; border-radius: 6px; font-size: 14px; cursor: pointer; }
.multi-quote-cancel-btn { background: #f5f5f5; color: #666; }
.multi-quote-generate-btn { background: #667eea; color: white; }
.post-checkbox { position: absolute; top: 10px; right: 10px; width: 24px; height: 24px; cursor: pointer; z-index: 10; }
.post-card.selected { border: 2px solid #667eea; }
/* 多帖报价按钮容器 */
.multi-quote-button-container {
    margin: 15px 0;
    padding: 0 15px;
}

.multi-quote-mode-toggle {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #06ad56 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.multi-quote-mode-toggle:hover {
    background: linear-gradient(135deg, #06ad56 0%, #059648 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.multi-quote-mode-toggle.active {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.multi-quote-mode-toggle.active:hover {
    background: linear-gradient(135deg, #ee5a52 0%, #e74c3c 100%);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}
