/* open_match.css */

#openMatchModal .border-dashed {
    border-style: dashed !important;
}

#openMatchModal #omDropZone:hover {
    background-color: #e9ecef !important;
    border-color: #0d6efd !important;
}

/* 加载中浮层 */
#openMatchModal .om-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.92);
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 0 0 6px 6px;
}

/* 表格紧凑 */
#openMatchModal #omPreviewTable th,
#openMatchModal #omPreviewTable td {
    padding: 4px 8px;
    vertical-align: middle;
}

#openMatchModal #omPreviewTable thead th {
    font-weight: 600;
    font-size: 0.78rem;
    color: #475569;
}

#openMatchModal #omPreviewTable tbody td {
    font-size: 0.76rem;
    color: #334155;
}

/* 弹窗滚动条美化 */
#openMatchModal .modal-body::-webkit-scrollbar {
    width: 8px;
}
#openMatchModal .modal-body::-webkit-scrollbar-thumb {
    background: #b0c4de;
    border-radius: 4px;
}
#openMatchModal .modal-body::-webkit-scrollbar-track {
    background: #f1f5f9;
}

#omTermsCountdown {
    font-weight: 500;
}
/* ==================== 预览表格（列名不换行 + 省略号） ==================== */
#openMatchModal #omPreviewTable {
    width: 100%;
    table-layout: auto;
    margin-bottom: 0;
}

#openMatchModal #omPreviewTable thead th {
    background: #f8fafc;
    font-weight: 600;
    font-size: 0.82rem;
    color: #475569;
    padding: 6px 8px;
    white-space: nowrap;
    vertical-align: middle;
    position: sticky;
    top: 0;
    z-index: 1;
    border-color: #e2e8f0;
}

#openMatchModal #omPreviewTable tbody td {
    font-size: 0.8rem;
    color: #334155;
    padding: 5px 8px;
    vertical-align: middle;
    white-space: nowrap;
    border-color: #eef2f7;
}

/* ★ 单元格内的内容容器：固定宽度、超出省略、鼠标悬停 title 显示全部 */
#openMatchModal #omPreviewTable .om-col-cell {
    display: block;
    min-width: 100px;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: default;
}

/* 表头单元格内容稍宽一点，让列名更完整 */
#openMatchModal #omPreviewTable thead th .om-col-cell {
    max-width: 200px;
    font-weight: 600;
}
/* ==================== Modal 整体缩放到 90% ==================== */
#openMatchModal .om-zoom-wrap {
    /* zoom 0.9 后视觉尺寸 = 92vw × 88vh，与原 modal-dialog 匹配 */
    zoom: 0.9;
    width: 111.11%;
    height: 111.11%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
/* ==================== 修复遮罩层被 zoom 缩小的问题 ====================
   body 上有 zoom: 0.9，backdrop 挂在 body 下，也会被缩小 10%。
   所以需要反向补偿 1/0.9 ≈ 1.1111 倍，让它视觉上覆盖整个视口。
   ==================================================================== */
body.login-body .modal-backdrop {
    width: 111.11vw !important;
    height: 111.11vh !important;
    top: 0 !important;
    left: 0 !important;
}
/* 修复 modal 容器被 body 的 zoom 缩小的补偿（让 modal 视觉盖满视口） */
body.login-body .modal {
    width: 111.11vw !important;
    height: 111.11vh !important;
}
/* ==================== 移动端 Modal 适配 ==================== */
@media (max-width: 992px) {
    /* 取消桌面端的补偿值（因为这些补偿是为 body 的 zoom 准备的，移动端已取消 zoom） */
    body.login-body .modal,
    body.login-body .modal-backdrop {
        width: 100vw !important;
        height: 100vh !important;
    }

    /* Modal 全屏显示 */
    #openMatchModal .modal-dialog {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh !important;
        max-height: 100vh !important;
        margin: 0 !important;
    }
    #openMatchModal .modal-content {
        border-radius: 0;
        height: 100vh;
    }

    /* 缩小 padding，给内容更多空间 */
    #openMatchModal .modal-body {
        padding: 12px 14px !important;
    }
    #openMatchModal .modal-header,
    #openMatchModal .modal-footer {
        padding: 10px 14px;
    }

    /* 上传区 */
    #openMatchModal #omDropZone {
        padding: 20px 14px !important;
    }
    #openMatchModal #omDropZone p {
        font-size: 0.85rem;
    }
    #openMatchModal #omDropZone .small {
        font-size: 0.72rem;
    }

    /* 配置区：把两列改成单列 */
    #openMatchModal .row.g-2 > [class*="col-md-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* 预览表：字号缩小一点，让更多列能放 */
    #openMatchModal #omPreviewTable thead th {
        font-size: 0.76rem;
        padding: 5px 6px;
    }
    #openMatchModal #omPreviewTable tbody td {
        font-size: 0.74rem;
        padding: 4px 6px;
    }
    #openMatchModal #omPreviewTable .om-col-cell {
        min-width: 80px;
        max-width: 140px;
    }

    /* 验证码区域自动换行 */
    #openMatchModal #omCaptchaBlock .d-flex {
        flex-wrap: wrap;
    }

    /* 底部按钮缩小 */
    #openMatchModal .modal-footer .btn {
        padding: 6px 12px;
        font-size: 0.82rem;
    }
    #openMatchModal .modal-footer .me-auto {
        display: none;   /* 移动端隐藏底部提示文字 */
    }
    #openMatchModal #omQuotaHint {
        display: none;   /* 移动端隐藏剩余次数提示 */
    }
}

/* 超小屏 */
@media (max-width: 480px) {
    #openMatchModal #omDropZone {
        padding: 16px 10px !important;
    }
    #openMatchModal .modal-header .modal-title {
        font-size: 0.95rem;
    }
}