/**
 * 协议弹窗公共组件样式
 * 用于展示用户服务协议和隐私政策
 */

/* 弹窗遮罩层 */
.agreement-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
}

/* 弹窗主体 */
.agreement-modal {
    width: 720px;
    max-width: 95%;
    max-height: 96vh;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 弹窗头部 */
.agreement-modal-header {
    padding: 14px 24px;
    border-bottom: 1px solid #e8e8e8;
    text-align: center;
    background-color: #fff;
}

.agreement-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

/* 弹窗内容区域 */
.agreement-modal-body {
    flex: 1;
    padding: 0;
    overflow: hidden;
    background-color: #fff;
}

/* PDF 展示区域 */
.agreement-pdf-viewer {
    width: 100%;
    height: 100%;
    min-height: 500px;
    max-height: calc(96vh - 140px);
    border: none;
    background-color: #f5f5f5;
}

/* 弹窗底部 */
.agreement-modal-footer {
    padding: 8px 24px;
    border-top: 1px solid #e8e8e8;
    text-align: center;
    background-color: #fff;
}

/* 关闭按钮 */
.agreement-close-btn {
    display: inline-block;
    padding: 10px 40px;
    background-color: #EB512F;
    color: #fff;
    font-size: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.agreement-close-btn:hover {
    background-color: #E7340C;
}

/* 加载状态 */
.agreement-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 500px;
    max-height: calc(96vh - 140px);
    color: #999;
    font-size: 14px;
    background-color: #fff;
}

.agreement-loading i {
    margin-right: 8px;
    font-size: 16px;
}

/* 错误提示 */
.agreement-error {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 500px;
    max-height: calc(96vh - 140px);
    color: #999;
    font-size: 14px;
    text-align: center;
    padding: 20px;
    background-color: #fff;
}

/* 响应式适配 */
@media screen and (max-width: 768px) {
    .agreement-modal {
        width: 95%;
        max-height: 96vh;
    }
    
    .agreement-modal-header {
        padding: 16px 20px;
    }
    
    .agreement-modal-title {
        font-size: 16px;
    }
    
    .agreement-pdf-viewer {
        min-height: 400px;
        max-height: calc(96vh - 140px);
    }
}
