@charset "utf-8";

/* ========== 整体容器：左右结构（左：介绍+数据 | 右：切换） ========== */
.booking-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 15px;
    box-sizing: border-box;
    display: flex;
    flex-direction: row-reverse;
    gap: 20px;
}

/* ========== 通用 wrap 卡片样式（booking-left 和 booking-wrap 共享） ========== */
.booking-left,
.booking-wrap {
    background: #ffffff;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    padding: 20px;
    box-sizing: border-box;
    font-size: 14px;
    line-height: 1.7;
    color: #333;
    overflow-wrap: break-word;
    word-break: break-word;
}
/* booking-left 内部纵向：intro 在上，stats 在下 */
.booking-left {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.booking-wrap {
    flex: 3 1 0;
    min-width: 0;
}

/* ========== booking-left 左侧主体：内部纵向（介绍 + 实时数据） ========== */
.booking-intro {
    min-width: 0;
}
.booking-stats {
    min-width: 0;
    background: linear-gradient(180deg, #fff8f8 0%, #faf6f6 100%);
    border: 1px solid #f0e0e0;
    border-top: 3px solid #9f0303;
    border-radius: 4px;
    padding: 14px 15px 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-self: stretch;
    box-shadow: 0 1px 4px rgba(1535, 3, 3, 0.08);
    position: relative;
    overflow: hidden;
}
.booking-stats::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle at top right, rgba(1535, 3, 3, 0.06), transparent 70%);
    pointer-events: none;
}
.stats-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e8d8d8;
    margin-bottom: 2px;
}
.stats-live {
    width: 8px;
    height: 8px;
    background: #b81b1b;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 0 rgba(184, 27, 27, 0.6);
    animation: stats-pulse 1.5s ease-in-out infinite;
}
@keyframes stats-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(1535, 3, 3, 0.6); opacity: 1; }
    50% { box-shadow: 0 0 0 6px rgba(535, 3, 3, 0); opacity: 0.6; }
}
.stats-title {
    font-size: 15px;
    font-weight: bold;
    color: #b81b1b;
    letter-spacing: 0.5px;
}
.stats-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    line-height: 1.5;
    border-bottom: 1px dashed #f0e0e0;
    padding-bottom: 8px;
}
.stats-item:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}
.stats-label {
    color: #666;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.stats-label::before {
    content: '';
    width: 4px;
    height: 4px;
    background: #9f0303;
    border-radius: 50%;
    flex-shrink: 0;
}
.stats-value {
    color: #9f0303;
    font-weight: bold;
    font-size: 18px;
    font-variant-numeric: tabular-nums;
    transition: color 0.3s ease;
    flex-shrink: 0;
}
.stats-comfort {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    color: #ffffff;
    letter-spacing: 0.5px;
}
.stats-comfort.comfortable { background: #4caf50; }
.stats-comfort.relative-comfortable { background: #8bc34a; }
.stats-comfort.average { background: #ffc107; color: #333; }
.stats-comfort.relative-crowded { background: #ff9800; }
.stats-comfort.crowded { background: #f44336; }
.stats-progress {
    width: 100%;
    height: 6px;
    background: #f0e0e0;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 4px;
}
.stats-progress-bar {
    height: 100%;
    width: 0%;
    background: #4caf50;
    border-radius: 3px;
    transition: width 0.6s ease, background 0.3s ease;
}
.booking-left p,
.booking-wrap p {
    margin: 0 0 1em;
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    word-break: break-word;
    overflow-wrap: break-word;
}
.booking-left p:last-child,
.booking-wrap p:last-child {
    margin-bottom: 0;
}
/* 开放信息标题：TRS 在 booking-intro 内输出的 h2 文档标题 */
.booking-intro h2 {
    margin: 0 0 16px;
    padding: 0 0 14px;
    font-size: 22px;
    font-weight: bold;
    color: #222;
    line-height: 1.4;
    text-align: center;
    border-bottom: 1px solid #f0e0e0;
}
.booking-left img,
.booking-wrap img {
    max-width: 100%;
    height: auto;
}
.booking-left a,
.booking-wrap a {
    color: #9f0303;
    text-decoration: none;
    transition: color 0.2s ease;
}
.booking-left a:hover,
.booking-wrap a:hover {
    color: #e32929;
    text-decoration: underline;
}

/* ========== 切换区上半：Tab 栏 ========== */
.booking-wrap .switch-title {
    list-style: none;
    margin: 0 0 15px;
    padding: 0;
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    border-bottom: 2px solid #9f0303;
}
.booking-wrap .switch-title li {
    padding: 8px 18px;
    background: #f5f5f5;
    color: #333;
    cursor: pointer;
    border-radius: 4px 4px 0 0;
    font-size: 14px;
    transition: background 0.2s ease, color 0.2s ease;
    user-select: none;
}
.booking-wrap .switch-title li:hover {
    background: #faf6f6;
    color: #9f0303;
}
.booking-wrap .switch-title li.active {
    background: #9f0303;
    color: #ffffff;
}

/* ========== 切换区下半：内容区 ========== */
.booking-wrap .switch-content {
    list-style: none;
    margin: 0;
    padding: 0;
    min-height: 240px;
}
.booking-wrap .switch-content li {
    display: none;
}
.booking-wrap .switch-content li.active {
    display: block;
}
.booking-wrap .switch-content li img {
    max-width: 100%;
    height: auto;
}

/* ========== 平板：≤991px 整体改上下堆叠 ========== */
@media (max-width: 991px) {
    .booking-container {
        flex-direction: column;
    }
    .booking-left,
    .booking-wrap {
        flex: 1 1 auto;
    }
    .booking-stats {
        align-self: stretch;
        min-height: 200px;
    }
    /* 段落样式 */
    .booking-left p,
    .booking-wrap p {
        font-size: 15px;
        line-height: 1.75;
        margin-bottom: 0.8em;
    }
    /* 标题样式 */
    .booking-intro h2 {
        font-size: 20px;
        margin-bottom: 12px;
        padding-bottom: 10px;
    }
}

/* ========== 手机：≤767px Tab 栏可横滑 + 实时数据卡片紧凑 ========== */
@media (max-width: 767px) {
    .booking-left,
    .booking-wrap {
        padding: 15px;
    }
    .booking-stats {
        align-self: stretch;
        padding: 12px 14px;
        gap: 8px;
    }
    .stats-title {
        font-size: 14px;
    }
    .stats-header {
        padding-bottom: 8px;
    }
    .stats-item {
        font-size: 13px;
        padding-bottom: 6px;
    }
    .stats-value {
        font-size: 16px;
    }
    .stats-comfort {
        font-size: 11px;
        padding: 2px 8px;
    }
    .stats-progress {
        height: 4px;
        margin-top: 2px;
    }
    /* 段落样式 */
    .booking-left p,
    .booking-wrap p {
        font-size: 14px;
        line-height: 1.7;
        margin-bottom: 0.6em;
    }
    /* 标题样式 */
    .booking-intro h2 {
        font-size: 18px;
        margin-bottom: 10px;
        padding-bottom: 8px;
    }
    .booking-wrap .switch-title {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .booking-wrap .switch-title li {
        white-space: nowrap;
        padding: 6px 12px;
        font-size: 13px;
    }
}

/* ========== 超窄屏：≤380px 标签和数值改为上下排版 ========== */
@media (max-width: 380px) {
    .stats-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
    .stats-value {
        font-size: 15px;
    }
    /* 段落样式 */
    .booking-left p,
    .booking-wrap p {
        font-size: 13px;
        line-height: 1.65;
        text-indent: 1.5em;
    }
    /* 标题样式 */
    .booking-intro h2 {
        font-size: 16px;
    }
}
