/**
 * Tab弹窗小部件样式
 * 作者：百家
 */

/* 容器 */
.tcm-tab-popup-widget {
    width: 100%;
}

/* 筛选标签 */
.tcm-tab-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.tcm-tab-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: #ffffff;
    color: #333333;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tcm-tab-filter-btn:hover {
    border-color: #4a6741;
    transform: translateY(-2px);
}

.tcm-tab-filter-btn.active {
    background-color: #4a6741;
    color: #ffffff;
    border-color: #4a6741;
}

.tcm-filter-count {
    font-size: 13px;
    opacity: 0.8;
}

/* 内容网格 */
.tcm-tab-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* 卡片 */
.tcm-tab-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 25px 30px;
    background-color: #f5f5dc;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tcm-tab-card:hover {
    background-color: #e8e8d0;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tcm-tab-card-title {
    flex: 1;
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    color: #4a6741;
    line-height: 1.4;
}

.tcm-tab-card-arrow {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: #4a6741;
    transition: transform 0.3s ease;
}

.tcm-tab-card:hover .tcm-tab-card-arrow {
    transform: translate(3px, -3px);
}

.tcm-tab-card-content {
    display: none;
}

/* 弹窗 */
.tcm-tab-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.tcm-tab-modal.is-active {
    visibility: visible;
    opacity: 1;
}

/* 遮罩层 */
.tcm-tab-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

/* 弹窗容器 */
.tcm-tab-modal-container {
    position: relative;
    width: 90%;
    max-width: 1200px;
    max-height: 80vh;
    margin: 10vh auto;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    transform: translateY(-50px);
    transition: transform 0.3s ease;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
}

.tcm-tab-modal.is-active .tcm-tab-modal-container {
    transform: translateY(0);
}

/* 关闭按钮 */
.tcm-tab-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.tcm-tab-modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: rotate(90deg);
}

.tcm-tab-modal-close svg {
    width: 20px;
    height: 20px;
    color: #fff;
}

/* 弹窗内容 */
.tcm-tab-modal-content {
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 50px 40px 40px;
}

/* 左右布局容器 */
.tcm-modal-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    width: 100%;
}

/* 左侧主内容区 70% */
.tcm-modal-left {
    flex: 0 0 calc(70% - 20px);
    max-width: calc(70% - 20px);
    min-width: 0;
}

.tcm-modal-subtitle {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    margin: 0 0 10px 0;
}

.tcm-modal-title {
    font-size: 48px;
    font-weight: 700;
    color: #333;
    margin: 0 0 30px 0;
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.tcm-modal-content {
    font-size: 16px;
    line-height: 1.8;
    color: #666;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.tcm-modal-content p {
    margin-bottom: 1em;
}

.tcm-modal-content h2,
.tcm-modal-content h3 {
    margin-top: 1.5em;
    margin-bottom: 0.8em;
    color: #333;
}

.tcm-modal-content h2 {
    font-size: 24px;
}

.tcm-modal-content h3 {
    font-size: 20px;
}

.tcm-modal-content ul,
.tcm-modal-content ol {
    margin-bottom: 1em;
    padding-left: 1.5em;
}

.tcm-modal-content li {
    margin-bottom: 0.5em;
}

/* 右侧边栏 30% */
.tcm-modal-sidebar {
    flex: 0 0 calc(30% - 20px);
    max-width: calc(30% - 20px);
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* 预约按钮 */
.tcm-modal-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 25px;
    background-color: #4a6741;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-align: center;
}

.tcm-modal-button:hover {
    background-color: #3a5531;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 103, 65, 0.3);
}

.tcm-modal-button svg {
    width: 20px;
    height: 20px;
}

/* 右侧描述信息 */
.tcm-modal-sidebar-info {
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
}

.tcm-sidebar-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #999;
    margin: 0 0 15px 0;
}

.tcm-sidebar-content {
    font-size: 18px;
    line-height: 1.6;
    color: #333;
    white-space: pre-line;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* 阻止body滚动 */
body.tcm-tab-modal-open {
    overflow: hidden;
}

/* 自定义滚动条 */
.tcm-tab-modal-content::-webkit-scrollbar {
    width: 8px;
}

.tcm-tab-modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.tcm-tab-modal-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.tcm-tab-modal-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .tcm-tab-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tcm-modal-layout {
        gap: 30px;
    }
    
    .tcm-modal-left {
        flex: 0 0 calc(65% - 15px);
        max-width: calc(65% - 15px);
    }
    
    .tcm-modal-sidebar {
        flex: 0 0 calc(35% - 15px);
        max-width: calc(35% - 15px);
    }
    
    .tcm-modal-title {
        font-size: 36px;
    }
}

@media (max-width: 768px) {
    .tcm-tab-filters {
        gap: 8px;
        margin-bottom: 20px;
    }
    
    .tcm-tab-filter-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .tcm-tab-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .tcm-tab-card {
        padding: 20px 25px;
    }
    
    .tcm-tab-card-title {
        font-size: 16px;
    }
    
    .tcm-tab-modal-container {
        width: 100%;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
    }
    
    .tcm-tab-modal-content {
        padding: 40px 20px 20px;
        max-height: calc(100vh - 60px);
    }
    
    /* 移动端改为上下布局 */
    .tcm-modal-layout {
        flex-direction: column;
        gap: 30px;
    }
    
    .tcm-modal-left,
    .tcm-modal-sidebar {
        flex: none;
        width: 100%;
        max-width: 100%;
    }
    
    .tcm-modal-title {
        font-size: 28px;
        margin-bottom: 20px;
    }
    
    .tcm-modal-content {
        font-size: 15px;
    }
    
    .tcm-modal-button {
        width: 100%;
        justify-content: center;
    }
    
    .tcm-tab-modal-close {
        top: 15px;
        right: 15px;
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    .tcm-tab-filter-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .tcm-tab-card {
        padding: 15px 20px;
    }
    
    .tcm-tab-card-title {
        font-size: 15px;
    }
    
    .tcm-tab-card-arrow {
        width: 20px;
        height: 20px;
    }
    
    .tcm-modal-title {
        font-size: 24px;
    }
    
    .tcm-sidebar-content {
        font-size: 16px;
    }
}

