/* 画质说明弹窗 — 对齐原站 hz-* 结构与设计稿 */

.quality-modal {
    position: fixed;
    inset: 0;
    z-index: 10020;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}

.quality-modal.show {
    opacity: 1;
    visibility: visible;
}

.quality-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.quality-modal-dialog {
    position: relative;
    width: 100%;
    max-width: 920px;
    max-height: calc(100vh - 2.5rem);
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.2);
    overflow: hidden;
    transform: translateY(16px) scale(0.98);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.quality-modal.show .quality-modal-dialog {
    transform: translateY(0) scale(1);
}

.quality-modal-header,
#qualityModalContent .modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.4rem 0.7rem;
    flex-shrink: 0;
}

.quality-modal-title-wrap,
#qualityModalContent .modal-head h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    min-width: 0;
    font-size: 1.0625rem;
    font-weight: 700;
    color: #1f2937;
}

.quality-modal-icon,
#qualityModalContent .modal-head h3 i {
    color: #3b82f6;
    font-size: 1.15rem;
}

.quality-modal-header h2 {
    margin: 0;
    font-size: 1.0625rem;
    font-weight: 700;
    color: #1f2937;
}

.quality-modal-close,
#qualityModalContent .modal-close {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: #f3f4f6;
    color: #9ca3af;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

.quality-modal-close:hover,
#qualityModalContent .modal-close:hover {
    background: #e5e7eb;
    color: #4b5563;
}

.quality-modal-body {
    padding: 0 1.4rem 1.35rem;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

body.quality-modal-open {
    overflow: hidden;
}

/* 内容自带 modal-head 时，隐藏外壳标题，避免双标题 */
.quality-modal.has-inner-head .quality-modal-header {
    display: none;
}

.quality-modal.has-inner-head .quality-modal-body {
    padding-top: 0.35rem;
}

#qualityModalContent .modal-close {
    /* 内容内关闭：关掉外壳弹窗 */
}

/* —— hz 表格（设计稿 1:1） —— */
.hz-body,
#qualityModalContent {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: #374151;
}

.hz-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 13px;
    line-height: 1.4;
}

.hz-table th,
.hz-table td {
    text-align: center;
    vertical-align: middle;
    padding: 10px 6px;
    border: none;
    border-bottom: 1px solid #f1f5f9;
    font-weight: 500;
    color: #6b7280;
}

.hz-table tbody tr:last-child td {
    border-bottom: none;
}

.hz-table thead th:first-child,
.hz-table tbody td:first-child {
    text-align: left;
    padding-left: 12px;
    color: #4b5563;
    font-weight: 600;
    width: 104px;
    white-space: nowrap;
}

.hz-group-row .hz-th-group {
    font-weight: 600;
    color: #4b5563;
    padding: 10px 8px;
}

.hz-th-group.hz-th-algo,
.hz-th-col.hz-th-algo {
    background: #eef2ff;
}

.hz-th-group.hz-th-algo {
    border-radius: 10px 10px 0 0;
    color: #4f46e5;
}

.hz-th-group.hz-th-slice,
.hz-th-col.hz-th-slice {
    background: #ecfdf5;
}

.hz-th-group.hz-th-slice {
    border-radius: 10px 10px 0 0;
    color: #059669;
}

.hz-th-col {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    padding-top: 8px;
    padding-bottom: 10px;
}

.hz-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    white-space: nowrap;
    max-width: 100%;
    box-sizing: border-box;
}

.hz-badge.hz-b {
    background: #e8f1ff;
    color: #3b82f6;
}

.hz-badge.hz-s {
    min-width: 22px;
    height: 22px;
    padding: 0 4px;
    background: #d1fae5;
    color: #059669;
    font-size: 13px;
    border-radius: 6px;
}

.hz-dash {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #d1d5db;
    font-size: 14px;
    font-weight: 500;
}

.hz-note,
.hz-warn {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 13px;
    line-height: 1.65;
}

.hz-note i,
.hz-warn i {
    flex-shrink: 0;
    margin-top: 2px;
    font-size: 14px;
}

.hz-note {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #4b5563;
}

.hz-note i {
    color: #3b82f6;
}

.hz-warn {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #9a3412;
}

.hz-warn i {
    color: #f59e0b;
}

/* 兼容旧 qh 结构 */
.qh-wrap { font-family: inherit; }
.qh-table { width: 100%; border-collapse: collapse; }
.qh-badge { display: inline-flex; padding: 3px 8px; border-radius: 6px; background: #e8f1ff; color: #3b82f6; font-size: 12px; font-weight: 600; }
.qh-check { color: #059669; font-weight: 700; }
.qh-dash { color: #d1d5db; }
.qh-tip { display: flex; gap: 8px; padding: 12px 14px; border-radius: 10px; margin-top: 12px; border: 1px solid transparent; font-size: 13px; }
.qh-tip-info { background: #eff6ff; border-color: #bfdbfe; }
.qh-tip-warn { background: #fff7ed; border-color: #fed7aa; }

.nav-card.is-nolink.has-html-modal {
    opacity: 1;
    cursor: pointer;
}

.nav-card.is-nolink.has-html-modal .nav-link-disabled {
    pointer-events: auto;
    cursor: pointer;
}

.nav-card.is-nolink.has-html-modal:hover .nav-card-inner {
    border-color: #3b82f6;
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.18);
}

@media (max-width: 768px) {
    .quality-modal {
        padding: 0.75rem;
        align-items: flex-end;
    }

    .quality-modal-dialog {
        max-height: 92vh;
        border-radius: 16px 16px 12px 12px;
    }

    .hz-table {
        min-width: 700px;
        font-size: 12px;
    }
}
