/* ========== Agreement Modal ========== */
.purchase-agreement-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10001;
}

.purchase-agreement-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
}

.purchase-agreement-content {
    position: relative;
    background: #112237;
    border: 1px solid #2b4a6e;
    max-width: 520px;
    width: 90%;
    /* ✅ 固定最大高度 */
    max-height: 50vh;
    /* ✅ 使用 flex 布局 */
    display: flex;
    flex-direction: column;
    margin: 8vh auto;
    border-radius: 2px;
}

.purchase-agreement-header {
    padding: 1.2rem;
    border-bottom: 1px solid #2b4a6e;
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* ✅ 固定不滚动 */
    flex-shrink: 0;
}

.purchase-agreement-header h3 {
    color: #bdd3f0;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.purchase-agreement-close {
    cursor: pointer;
    color: #5f7f7f;
    font-size: 1.5rem;
    background: none;
    border: none;
}

.purchase-agreement-close:hover {
    color: #b0c4c4;
}

.purchase-agreement-body {
    /* ✅ 可滚动区域 */
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    color: #8da3c7;
    font-size: 0.85rem;
    line-height: 1.7;
}

/* ✅ 自定义滚动条 */
.purchase-agreement-body::-webkit-scrollbar {
    width: 4px;
}

.purchase-agreement-body::-webkit-scrollbar-track {
    background: #0b1420;
}

.purchase-agreement-body::-webkit-scrollbar-thumb {
    background: #2b4a6e;
    border-radius: 2px;
}

/* ✅ 协议内容样式 */
.agreement-content h3 {
    color: #bdd3f0;
    font-size: 1rem;
    margin-bottom: 0.8rem;
}

.agreement-content h4 {
    color: #8aaed5;
    font-size: 0.85rem;
    margin: 1rem 0 0.5rem;
    border-bottom: 1px solid #1e3a5f;
    padding-bottom: 0.3rem;
}

.agreement-content p {
    margin-bottom: 0.6rem;
    line-height: 1.7;
}

.agreement-content ol {
    padding-left: 1.5rem;
    margin-bottom: 0.6rem;
}

.agreement-content ol li {
    margin-bottom: 0.4rem;
    line-height: 1.7;
}

.agreement-content strong {
    color: #ff6b6b;
}

.agreement-content .highlight {
    color: #ff6b6b;
    font-weight: bold;
}

/* ✅ 复选框区域固定在底部 */
.agreement-checkbox {
    margin: 1rem 1rem 1rem;
    padding-top: 1rem;
    border-top: 1px solid #1e3a5f;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;

}

.agreement-checkbox input[type="checkbox"] {
    accent-color: #3b80c3;
}

.agreement-checkbox label {
    color: #bdd3f0;
    font-size: 0.8rem;
    cursor: pointer;
}

.purchase-agreement-footer {
    padding: 1.2rem;
    border-top: 1px solid #2b4a6e;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    /* ✅ 固定不滚动 */
    flex-shrink: 0;
}

.purchase-agreement-btn {
    padding: 0.6rem 1.8rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    border: 1px solid;
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
}

.purchase-agreement-btn.cancel {
    border-color: #4a3a5c;
    color: #8da3c7;
}

.purchase-agreement-btn.cancel:hover {
    background: #2a1a2e;
}

.purchase-agreement-btn.confirm {
    border-color: #2a5c8a;
    color: #c6d9f5;
}

.purchase-agreement-btn.confirm:hover {
    background: #152c47;
}

.purchase-agreement-btn.confirm:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}