/*
|--------------------------------------------------------------------------
| DDE页面基础样式
|--------------------------------------------------------------------------
*/

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
}

body {
    background: #f5f7fa;
    color: #333;
    font-family:
        "Microsoft YaHei",
        "PingFang SC",
        Arial,
        sans-serif;
    font-size: 14px;
    line-height: 1.6;
}

/*
|--------------------------------------------------------------------------
| 页面公共宽度
|--------------------------------------------------------------------------
*/

.pleft,
.bodyWidth3,
.bodyWidthddx {
    width: calc(100% - 24px);
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

/*
|--------------------------------------------------------------------------
| 上一只、下一只股票
|--------------------------------------------------------------------------
*/

.pleft {
    margin-top: 15px;
    margin-bottom: 12px;
}

.stock-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 42px;
    padding: 7px 12px;
    background: #fff;
    border: 1px solid #e3e8ee;
    border-radius: 5px;
}

.stock-nav a {
    display: inline-block;
    max-width: 48%;
    padding: 5px 10px;
    color: #1677c8;
    text-decoration: none;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.stock-nav a:hover {
    color: #e53935;
    background: #f2f8fd;
}

/*
|--------------------------------------------------------------------------
| 股票标题和说明
|--------------------------------------------------------------------------
*/

.bodyWidth3 {
    margin-bottom: 12px;
    background: #fff;
    border: 1px solid #e3e8ee;
    border-radius: 5px;
    overflow: hidden;
}

.nav3 {
    width: 100%;
    padding: 12px 15px;
}

.nav3 ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav3 li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav3 .title {
    display: block;
    margin-bottom: 10px;
    color: #222;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
}

#loadmsg {
    padding: 8px 10px;
    color: #777;
    text-align: center;
}
.csmleft {
    color: #ff0000;
}
/*
|--------------------------------------------------------------------------
| DDE iframe区域
|--------------------------------------------------------------------------
*/

.bodyWidthddx {
    position: relative;
    width: calc(100% - 24px);
    max-width: 1000px;
    margin: 0 auto 18px;
    background: #fff;
    border: 1px solid #e3e8ee;
    border-radius: 5px;
    overflow: hidden;
}

.bodyWidthddx iframe {
    display: block;
    width: 100% !important;
    height: 1300px;
    margin: 0 !important;
    padding: 0;
    border: 0;
    background: #fff;
}

/*
|--------------------------------------------------------------------------
| 平板
|--------------------------------------------------------------------------
*/

@media screen and (max-width: 1024px) {

    .pleft,
    .bodyWidth3,
    .bodyWidthddx{
        width: calc(100% - 20px);
    }

    .nav3 {
        padding: 12px;
    }

    .nav3 .title {
        font-size: 19px;
    }

    /*
     * 隐藏页面两侧绝对定位广告，
     * 避免平板页面被撑宽。
     */
    .bodyWidthddx > div[style*="position:absolute"] {
        display: none !important;
    }
}

/*
|--------------------------------------------------------------------------
| 手机
|--------------------------------------------------------------------------
*/

@media screen and (max-width: 768px) {

    body {
        font-size: 13px;
        background: #fff;
    }

    .pleft,
    .bodyWidth3,
    .bodyWidthddx {
        width: 100%;
        max-width: none;
    }

    .pleft {
        margin-top: 8px;
        margin-bottom: 8px;
        padding: 0 8px;
    }

    .stock-nav {
        gap: 6px;
        min-height: 38px;
        padding: 5px 6px;
        border-radius: 3px;
    }

    .stock-nav a {
        max-width: 50%;
        padding: 5px;
        font-size: 13px;
    }

    .bodyWidth3 {
        margin-bottom: 8px;
        border-right: 0;
        border-left: 0;
        border-radius: 0;
    }

    .nav3 {
        padding: 10px 8px;
    }

    .nav3 .title {
        margin-bottom: 6px;
        font-size: 17px;
    }

    #loadmsg {
        padding: 5px;
        font-size: 13px;
    }

    .bodyWidthddx {
        width: 100%;
        max-width: none;
        border-right: 0;
        border-left: 0;
        border-radius: 0;
        overflow: hidden;
    }

    .bodyWidthddx iframe {
        display: block;
        width: 100% !important;
        height: 1300px;
        border: 0;
    }

    .bodyWidthddx > div[style*="position:absolute"] {
        display: none !important;
    }

}

/*
|--------------------------------------------------------------------------
| 小屏手机
|--------------------------------------------------------------------------
*/

@media screen and (max-width: 480px) {

    .stock-nav {
        align-items: stretch;
    }

    .stock-nav a {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 34px;
        text-align: center;
        white-space: normal;
    }

    .nav3 .title {
        font-size: 16px;
    }
}

/*
|--------------------------------------------------------------------------
| DDE标题和股票导航同一行
|--------------------------------------------------------------------------
*/

.dde-headbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 52px;
    padding: 8px 15px;
    background: #fff;
    border-bottom: 1px solid #e5eaf0;
}

/* 股票名称标题：蓝色、左对齐 */
.dde-stock-title {
    flex: 1;
    min-width: 0;
    color: #1677c8;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 上一只、下一只：右侧同行 */
.dde-headbar .stock-nav {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-height: 0;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
}

.dde-headbar .stock-nav a {
    display: inline-block;
    max-width: none;
    padding: 5px 10px;
    color: #1677c8;
    background: #f3f8fc;
    border: 1px solid #d7e8f5;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    text-decoration: none;
    white-space: nowrap;
}

.dde-headbar .stock-nav a:hover {
    color: #fff;
    background: #1677c8;
    border-color: #1677c8;
}

/*
|--------------------------------------------------------------------------
| 更新时间
|--------------------------------------------------------------------------
*/

.dde-update-box {
    min-height: 32px;
    padding: 5px 15px;
    text-align: left;
}

/* “正在加载”和更新完成后的时间都显示红色 */
.dde-update-box #loadmsg,
.dde-update-box #loadmsg span {
    margin: 0;
    padding: 0;
    color: #e60012 !important;
    font-weight: 600;
    text-align: left;
}

/* 如果更新时间使用独立类名 */
.bk-update-time,
.dde-update-time,
.update-time {
    color: #e60012 !important;
    font-weight: 600;
}

/*
|--------------------------------------------------------------------------
| 操作提示
|--------------------------------------------------------------------------
*/

.dde-page-note {
    padding: 4px 15px 10px;
    color: #777;
    font-size: 13px;
    line-height: 1.7;
    text-align: left;
}

/*
|--------------------------------------------------------------------------
| 手机自适应
|--------------------------------------------------------------------------
*/

@media screen and (max-width: 768px) {

    .dde-headbar {
        flex-wrap: wrap;
        gap: 7px;
        min-height: 0;
        padding: 9px 10px;
    }

    .dde-stock-title {
        flex-basis: 100%;
        width: 100%;
        font-size: 17px;
    }

    .dde-headbar .stock-nav {
        width: 100%;
        justify-content: space-between;
    }

    .dde-headbar .stock-nav a {
        max-width: 49%;
        padding: 5px 8px;
        font-size: 13px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .dde-update-box {
        padding: 5px 10px;
    }

    .dde-page-note {
        padding: 3px 10px 9px;
        font-size: 12px;
    }
}

/* PC端：标题居左，上下支导航居右 */
@media (min-width: 769px) {

    .dde-headbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 15px;
    }

    .dde-headbar .dde-stock-title {
        display: block;
        flex: 1 1 auto;
        min-width: 200px;
        color: #0874c9;
        font-size: 20px;
        font-weight: 700;
        line-height: 40px;
        text-align: left;
        white-space: nowrap;
    }

    .dde-headbar .stock-nav {
        width: auto !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        flex: 0 0 auto;
        justify-content: flex-end;
    }
}
/* 手机端DDE图表保持840px原始宽度，外层可以左右滑动 */
@media (max-width: 768px) {

    .bodyWidthddx {
        display: block;
        width: 100%;
        max-width: 100%;
        overflow-x: auto !important;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-x pan-y;
    }

    .bodyWidthddx iframe,
    .bodyWidthddx #ifr {
        display: block;
        width: 840px !important;
        min-width: 840px !important;
        max-width: none !important;
        margin: 0 !important;
    }
}