/* ==========================================================================
    視窗：分析彈窗樣式 (基礎共用)
   ========================================================================== */
.analysis-btn {
    background-color: #ffffff;
    color: #1a73e8;
    border: 1px solid #dadce0;
    padding: 6px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.analysis-btn:hover {
    background-color: #f1f6fe;
    border-color: #1a73e8;
    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3);
}

.analysis-btn.cancel-btn {
    color: #5f6368;
    border-color: #dadce0;
}

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fff;
    margin: 3% auto 50px auto;
    padding: 0;
    border-radius: 8px;
    width: 520px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.25);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 85vh;
    max-height: 85vh;
    overflow: hidden;
    transition: width 0.3s ease, height 0.3s ease;
}

/* 信度與效度視窗通用的步驟寬度控制 */
.modal-content.is-step-1 {
    width: 450px;
    margin-top: 10vh;
    height: 80vh;
}

.modal-content.is-step-2 {
    width: 500px;
    margin-top: 8vh;
    height: 77vh;
}

.modal-header {
    flex-shrink: 0;
    padding: 25px 20px 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ==========================================================================
    信度分析專屬樣式 (#analysisModal)
   ========================================================================== */
#modalTitle {
    margin: 0;
    font-size: 18px;
    color: #202124;
}

/* ==========================================================================
    效度分析專屬樣式 (#validityModal)
   ========================================================================== */
#validityModalTitle {
    margin: 0;
    font-size: 18px;
    color: #202124;
    /* 你可以根據需要更改顏色，例如改為綠色系區分 */
}

/* 效度分析專用的變數格線樣式 (若需要與信度不同可在此修改) */
#validityVariableList.variable-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 5px 0;
}

/* ==========================================================================
    內部組件樣式 (通用於所有 Modal Body)
   ========================================================================== */
.close-btn {
    color: #5f6368;
    font-size: 32px;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    padding: 0 5px;
}

.close-btn:hover {
    color: #d93025;
}

.modal-body {
    flex-grow: 1;
    padding: 0 20px 20px 20px;
    overflow-y: auto;
}

.modal-body p {
    margin-bottom: 10px;
    font-size: 13px;
    color: #70757a;
}

.variable-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 5px 0;
}

.variable-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.variable-item label {
    cursor: pointer;
}

.variable-item.hidden {
    display: none !important;
}

.select-all-wrapper {
    padding: 8px 0;
    margin-bottom: 5px;
    border-bottom: 1px solid #eee;
}

.select-all-wrapper label {
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.modal-footer {
    flex-shrink: 0;
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background-color: #ffffff;
}

.modal-search-wrapper input:focus {
    border-color: #1a73e8 !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}