/* 日历 iframe 在移动端作为独立页面渲染，需要自身响应式布局。 */
.mobile-course-panel {
    display: none;
}

@media (max-width: 768px) {
    html,
    body {
        width: 100%;
        min-width: 0;
        overflow-x: hidden;
        background: #f7f8fa;
    }

    .datafrom {
        width: 100%;
        box-sizing: border-box;
        padding: 12px;
    }

    .datafromDate {
        top: 20px;
        left: 26%;
        font-size: 22px;
        line-height: 28px;
    }

    .datafrom .el-calendar {
        width: 100%;
        border: 0;
        border-radius: 14px;
        box-shadow: 0 4px 18px rgba(42, 51, 66, 0.1);
        overflow: hidden;
    }

    .calendar-content .livetimefirst {
        position: unset;
    }

    .el-calendar-table .el-calendar-day {
        height: 68px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .datafrom .el-calendar__header {
        padding: 46px 12px 12px;
    }
    .iframe-close {
        top: max(10px, calc(50% - min(39vh, 270px)));
        top: max(10px, calc(50% - min(39dvh, 270px)));
        left: auto;
        right: 8%;
    }
    .iframe-close i {
        color: #000;
    }

    .datafrom .el-calendar__body {
        padding: 8px;
    }

    .datafrom .el-calendar-table thead th {
        padding: 6px 0;
        font-size: 14px;
        text-align: center;
    }
    .datafrom .el-calendar-table thead th,
    .datafrom .el-calendar-table td {
        border-right-width: 2px;
        border-bottom-width: 2px;
    }

    .datafrom .calendar-data,
    .datafrom .calendar-day {
        width: 18px;
        height: 20px;
        font-size: 16px;
    }
    .datafrom .calendar-content {
        display: flex;
        justify-content: center;
        flex-direction: column;
        align-items: center;
    }
    .datafrom .calendar-content .livetime {
        font-size: 14px;
    }

    .datafrom .calendar-content .livetitle {
        width: 40px;
        font-size: 12px;
    }

    .datafrom .today-course {
        display: none;
        min-width: 140px;
        max-width: min(280px, calc(100vw - 36px));
    }

    /* 点击有直播日期后显示当天课程，避免移动端依赖 hover */
    .datafrom .mobile-course-panel {
        display: block;
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        bottom: 0;
        z-index: 35;
        overflow: hidden;
        border-radius: 14px;
        background: rgba(0,0,0,0.4);
        box-shadow: 0 8px 28px rgba(42, 51, 66, 0.2);
        animation: mobile-panel-in 160ms ease-out;
    }

    .mobile-course-content {
        width: 86%;
        height: 350px;
        border-radius: 4px;
        background-color: #FEF5E6;
        border: 2px solid #FFDFA9;
        box-shadow: 0px 0px 6px 0px rgba(148, 95, 6, 0.16);
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .mobile-course-panel-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 46px;
        padding: 0 14px 0 16px;
        color: #2e2b27;
        font-size: 15px;
        font-weight: 600;
        border-bottom: 1px solid #f0f0f0;
    }

    .mobile-course-panel-close {
        width: 28px;
        height: 28px;
        padding: 0;
        border-radius: 14px;
        border: 2px solid #fff;
        background: transparent;
        color: #fff;
        font-size: 12px;
        font-weight: 800;
        line-height: normal;
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 30px auto 0;
    }

    .mobile-course-list {
        height: 350px;
        margin: 0;
        padding: 0 16px;
        overflow-y: auto;
        list-style: none;
        box-sizing: border-box;
    }

    .mobile-course-list li {
        display: flex;
        justify-content: flex-start;
        flex-direction: column;
        padding: 10px 0;
        box-sizing: border-box;
        min-height: 48px;
        border-bottom: 1px solid #FFDFA9;
        color: #2e2b27;
        cursor: pointer;
    }

    .mobile-course-list li:last-child {
        border-bottom: 0;
    }

    .mobile-course-list li span {
        font-family: PingFang SC;
        color: #2E2B27;
        font-weight: 500;
    }

    .mobile-course-list li span.mobile-course-time {
        flex: none;
        width: 48px;
        font-size: 14px;
    }

    .mobile-course-list li span.mobile-course-title {
        flex: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 12px;
    }

    .live-course-arrow.live-data .gg-iconfont {
        font-size: 14px;
    }

    .mobile-course-list .icon-arrow {
        flex: none;
        margin-left: 8px;
        color: #b5bac3;
        font-size: 12px;
    }

    .datafrom .GenerateQRcode {
        z-index: 30;
    }

    .datafrom .QRcode-box {
        width: calc(100vw - 32px);
        max-height: calc(100dvh - 32px);
        box-sizing: border-box;
        padding: 32px 16px 16px !important;
        border-radius: 14px;
    }

    .datafrom .QRcode-ul-video img {
        width: 128px;
        height: 90px;
        object-fit: cover;
    }

    .datafrom .QRcode-ul-video-items {
        width: calc(100% - 116px);
        margin-left: 12px;
    }

    .datafrom .QRcode-ul .QRcode-ul-video-item-tit {
        font-size: 14px;
        line-height: 20px;
    }

    .datafrom .QRcode-box p {
        font-size: 13px;
    }

    .QRcode-mobile {
        margin-top: 10px;
        display: block !important;
    }

    .QRcode-ul li:last-child {
        margin-top: 0;
        padding-top: 0;
    }
}
