/**
 * Waiver Modal Styles - 显示完整内容版本
 * San-Q Movement Rehab Inc.
 */

.waiver-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
    overflow-y: auto; /* ✅ 允许整个modal滚动 */
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.waiver-modal-content {
    background: white;
    border-radius: 20px;
    max-width: 1200px; /* ✅ 增加最大宽度 */
    width: 95%; /* ✅ 增加宽度百分比 */
    max-height: none; /* ✅ 移除高度限制 */
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.4s ease-out;
    margin: 40px auto; /* ✅ 添加上下边距 */
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.waiver-header {
    background: linear-gradient(135deg, #1E4938 0%, #2d6e54 100%);
    color: white;
    padding: 30px 40px;
    text-align: center;
    border-radius: 20px 20px 0 0;
}

.waiver-header h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
}

.waiver-header p {
    font-size: 15px;
    opacity: 0.95;
    margin-bottom: 15px;
}

.waiver-progress {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 13px;
    display: inline-block;
    font-weight: 600;
}

/* ✅ 修改：内容区域 - 显示全部内容，无滚动 */
.waiver-body {
    padding: 40px 60px; /* ✅ 增加padding */
    overflow-y: visible; /* ✅ 不需要内部滚动 */
    flex: 1;
    max-height: none; /* ✅ 移除高度限制 */
}

/* ✅ 删除滚动条样式（不再需要） */

.waiver-text {
    line-height: 1.8;
    color: #333;
    margin-bottom: 30px;
}

.waiver-text h3 {
    font-size: 24px; /* ✅ 增大标题 */
    color: #1E4938;
    margin-bottom: 20px;
    font-weight: 700;
}

.waiver-intro {
    font-size: 17px; /* ✅ 增大字体 */
    font-weight: 600;
    margin-bottom: 25px;
    color: #1E4938;
    line-height: 1.8;
}

.waiver-section {
    margin-bottom: 30px; /* ✅ 增加间距 */
    padding-bottom: 25px;
    border-bottom: 1px solid #e0e0e0;
}

.waiver-section:last-child {
    border-bottom: none;
}

.waiver-section h4 {
    font-size: 19px; /* ✅ 增大字体 */
    color: #1E4938;
    margin-bottom: 15px;
    font-weight: 600;
}

.waiver-points {
    list-style: none;
    padding-left: 0;
}

.waiver-points li {
    padding: 10px 0 10px 35px; /* ✅ 增加间距 */
    position: relative;
    font-size: 16px; /* ✅ 增大字体 */
    line-height: 1.8;
}

.waiver-points li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #1E4938;
    font-weight: bold;
    font-size: 20px;
}

.waiver-footer-text {
    margin-top: 30px;
    padding: 25px;
    background: #f8f9fa;
    border-left: 4px solid #1E4938;
    font-size: 15px; /* ✅ 增大字体 */
    font-weight: 600;
    color: #333;
    border-radius: 8px;
    line-height: 1.8;
}

.signature-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

.signature-section label {
    display: block;
    font-weight: 600;
    font-size: 16px; /* ✅ 增大字体 */
    margin-bottom: 15px;
    color: #1E4938;
}

#signatureCanvas {
    border: 3px solid #1E4938;
    border-radius: 12px;
    cursor: crosshair;
    display: block;
    width: 100%;
    max-width: 700px; /* ✅ 增加签名区域宽度 */
    height: 200px;
    margin: 0 auto 15px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(30, 73, 56, 0.1);
    touch-action: none;
}

.clear-signature-btn {
    padding: 12px 28px; /* ✅ 增大按钮 */
    background: #e0e0e0;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px; /* ✅ 增大字体 */
    font-weight: 600;
    transition: all 0.3s;
    color: #333;
}

.clear-signature-btn:hover {
    background: #d0d0d0;
    transform: translateY(-2px);
}

.waiver-footer {
    padding: 25px 40px;
    border-top: 2px solid #f0f0f0;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    background: #fafafa;
    border-radius: 0 0 20px 20px;
}

.waiver-decline-btn,
.waiver-accept-btn {
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.waiver-decline-btn {
    background: white;
    color: #666;
    border: 2px solid #ddd;
}

.waiver-decline-btn:hover {
    background: #f5f5f5;
}

.waiver-accept-btn {
    background: linear-gradient(135deg, #1E4938 0%, #2d6e54 100%);
    color: white;
}

.waiver-accept-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 73, 56, 0.3);
}

/* ✅ 删除滚动提示样式（不再需要） */

/* ✅ 删除禁用状态的接受按钮（不再需要滚动检测） */

/* ==================== Waiver 表单样式 ==================== */

.waiver-form-section {
    margin: 30px 0;
    padding: 30px; /* ✅ 增加padding */
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
}

.waiver-form-title {
    font-size: 22px; /* ✅ 增大标题 */
    color: #1E4938;
    margin-bottom: 25px;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.waiver-form-title:before {
    content: "📋";
    margin-right: 10px;
    font-size: 26px;
}

.waiver-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px; /* ✅ 增加间距 */
}

.waiver-form-field {
    display: flex;
    flex-direction: column;
}

.waiver-form-field.full-width {
    grid-column: 1 / -1;
}

.waiver-form-field label {
    font-size: 15px; /* ✅ 增大字体 */
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.waiver-form-field .required {
    color: #e74c3c;
    margin-left: 4px;
    font-size: 16px;
}

.waiver-input {
    padding: 14px 16px; /* ✅ 增加padding */
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px; /* ✅ 增大字体 */
    transition: all 0.3s;
    background: white;
}

.waiver-input:focus {
    outline: none;
    border-color: #1E4938;
    box-shadow: 0 0 0 3px rgba(30, 73, 56, 0.1);
}

.waiver-input::placeholder {
    color: #999;
}

/* ==================== 声明确认区域 ==================== */

.waiver-declaration-section {
    margin: 30px 0;
    padding: 25px; /* ✅ 增加padding */
    background: #fff9e6;
    border: 2px solid #ffc107;
    border-radius: 12px;
}

.waiver-declaration-checkbox {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    position: relative;
    padding-left: 40px; /* ✅ 增加左边距 */
    font-size: 16px; /* ✅ 增大字体 */
    line-height: 1.8;
    color: #333;
    user-select: none;
}

.waiver-declaration-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.waiver-declaration-checkbox .checkmark {
    position: absolute;
    top: 2px;
    left: 0;
    height: 26px; /* ✅ 增大checkbox */
    width: 26px;
    background-color: white;
    border: 2px solid #1E4938;
    border-radius: 6px;
    transition: all 0.3s;
}

.waiver-declaration-checkbox:hover .checkmark {
    background-color: #f0f8f5;
}

.waiver-declaration-checkbox input:checked ~ .checkmark {
    background-color: #1E4938;
}

.waiver-declaration-checkbox .checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 8px; /* ✅ 调整位置 */
    top: 4px;
    width: 7px;
    height: 13px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.waiver-declaration-checkbox input:checked ~ .checkmark:after {
    display: block;
}

.declaration-text {
    font-weight: 600;
    color: #1E4938;
}

.declaration-text span {
    display: block;
}

/* 响应式 */
@media (max-width: 1024px) {
    .waiver-modal-content {
        max-width: 95%;
    }
    
    .waiver-body {
        padding: 30px 40px;
    }
}

@media (max-width: 768px) {
    .waiver-modal {
        padding: 10px;
    }

    .waiver-modal-content {
        width: 100%;
        border-radius: 15px;
        margin: 20px auto;
    }

    .waiver-header {
        padding: 25px 25px;
        border-radius: 15px 15px 0 0;
    }

    .waiver-body {
        padding: 25px 25px;
    }
    
    .waiver-text h3 {
        font-size: 20px;
    }
    
    .waiver-intro {
        font-size: 15px;
    }
    
    .waiver-section h4 {
        font-size: 17px;
    }
    
    .waiver-points li {
        font-size: 14px;
    }

    #signatureCanvas {
        height: 150px;
    }

    .waiver-footer {
        padding: 20px 25px;
        flex-direction: column;
    }

    .waiver-decline-btn,
    .waiver-accept-btn {
        width: 100%;
    }
    
    .waiver-form-section {
        padding: 20px 15px;
    }
    
    .waiver-form-grid {
        grid-template-columns: 1fr;
    }
    
    .waiver-declaration-section {
        padding: 15px;
    }
    
    .waiver-declaration-checkbox {
        font-size: 14px;
    }
}