/* ========================================
   监护人同意书插件样式
   ======================================== */

.gcm-card {
    max-width: 820px;
    margin: 30px auto;
    background: #ffffff;
    border-radius: 28px;
    padding: 35px 40px;
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.15);
}

.gcm-card h2 {
    font-size: 26px;
    font-weight: 600;
    color: #0b2b3d;
    margin: 0 0 6px;
}

.gcm-subhead {
    background: #f0f6fb;
    padding: 12px 18px;
    border-radius: 0 12px 12px 0;
    border-left: 4px solid #2e7d9e;
    margin-bottom: 28px;
    color: #3d5a6c;
    font-size: 15px;
    line-height: 1.5;
}

.gcm-form-group {
    margin-bottom: 18px;
}

.gcm-form-group label {
    font-weight: 500;
    font-size: 14px;
    color: #1a3b4f;
    display: block;
    margin-bottom: 4px;
}

.gcm-form-group .required {
    color: #b91c1c;
}

.gcm-form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1.5px solid #d8e2ec;
    border-radius: 14px;
    font-size: 15px;
    background: #fcfdff;
    box-sizing: border-box;
}

.gcm-form-group input:focus {
    border-color: #2e7d9e;
    outline: none;
    box-shadow: 0 0 0 4px rgba(46, 125, 158, 0.12);
}

/* 签名区域 */
.gcm-signature-area {
    background: #f8faff;
    border-radius: 20px;
    padding: 22px 24px;
    border: 1px dashed #b8cfdf;
    margin: 20px 0;
}

.gcm-signature-area > label {
    font-weight: 500;
    font-size: 14px;
    color: #1a3b4f;
    display: block;
    margin-bottom: 4px;
}

.gcm-sig-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    margin-top: 10px;
}

/* ---------- 预览签名框 ---------- */
.gcm-sig-preview {
    position: relative;
    width: 280px;
    height: 90px;
    border: 2px solid #b8cfdf;
    border-radius: 16px;
    background: #ffffff;
    overflow: hidden;
    cursor: pointer;
    flex: 0 0 280px;
}

.gcm-sig-preview canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    pointer-events: none;   /* 关键：让点击事件穿透到父容器 */
}

.gcm-sig-preview .placeholder {
    color: #8aa9c0;
    font-size: 15px;
    position: absolute;
    z-index: 3;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    background: rgba(255, 255, 255, 0.8);
    padding: 4px 14px;
    border-radius: 20px;
    white-space: nowrap;
}

.gcm-sig-preview.signed .placeholder {
    display: none !important;
}

.gcm-date-display {
    font-size: 16px;
    color: #0b2b3d;
    background: #f4f8fc;
    padding: 10px 18px;
    border-radius: 14px;
    border: 1.5px solid #d8e2ec;
    font-weight: 500;
}

.gcm-warning {
    margin-top: 14px;
    font-size: 14px;
    background: #e9f2f9;
    padding: 8px 16px;
    border-radius: 40px;
    display: inline-block;
    color: #cc0000;
    font-weight: 700;
}

/* 提交按钮区域 */
.gcm-submit-area {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.gcm-btn-primary {
    background: #1b4f69;
    border: none;
    padding: 14px 40px;
    border-radius: 60px;
    font-weight: 600;
    font-size: 16px;
    color: #fff;
    cursor: pointer;
    border: 1.5px solid #1b4f69;
    transition: all 0.2s;
}

.gcm-btn-primary:hover {
    background: #123b4f;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px -6px rgba(27, 79, 105, 0.3);
}

.gcm-btn-outline {
    background: transparent;
    border: 1.5px solid #b8cfdf;
    padding: 14px 32px;
    border-radius: 60px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    color: #1a4054;
    transition: all 0.2s;
}

.gcm-btn-outline:hover {
    background: #e6f0f7;
    border-color: #7fa9c4;
}

/* ---------- 全屏手写画板（样式与JS内联对应） ---------- */
.gcm-fullscreen-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.gcm-modal {
    background: #ffffff;
    border-radius: 40px;
    padding: 30px;
    max-width: 800px;
    width: 100%;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
    box-sizing: border-box;
}

.gcm-modal h2 {
    margin: 0 0 10px;
    font-size: 22px;
    color: #0b2b3d;
}

.gcm-modal .hint {
    color: #4b6f86;
    font-size: 14px;
    margin-bottom: 16px;
}

.gcm-drawing-board {
    width: 100%;
    height: auto;
    aspect-ratio: 800 / 240;   /* 与JS中固定的画布尺寸匹配 */
    background: #ffffff;
    border: 2.5px solid #b8cfdf;
    border-radius: 24px;
    cursor: crosshair;
    touch-action: none;
    display: block;
}

.gcm-modal-actions {
    display: flex;
    gap: 16px;
    margin-top: 22px;
    flex-wrap: wrap;
    justify-content: center;
}

.gcm-btn-clear {
    background: #f2f6fa;
    border: 1.5px solid #c8dae8;
    padding: 12px 28px;
    border-radius: 60px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.gcm-btn-clear:hover {
    background: #e6eef6;
}

.gcm-btn-confirm {
    background: #1b4f69;
    border: 1.5px solid #1b4f69;
    padding: 12px 28px;
    border-radius: 60px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
}

.gcm-btn-confirm:hover {
    background: #123b4f;
}

/* 响应式适配 */
@media (max-width: 600px) {
    .gcm-card {
        padding: 20px 16px;
    }
    .gcm-sig-preview {
        width: 100%;
        flex: 1 1 100%;
        height: 80px;
    }
    .gcm-sig-row {
        flex-direction: column;
        align-items: stretch;
    }
    .gcm-date-display {
        text-align: center;
    }
    .gcm-modal {
        padding: 20px 16px;
        border-radius: 28px;
    }
    .gcm-drawing-board {
        aspect-ratio: 800 / 280;   /* 手机上稍高一些，方便书写 */
    }
}

/* 打印样式（隐藏按钮，保留内容） */
@media print {
    .gcm-card {
        box-shadow: none;
        border: 1px solid #ccc;
        padding: 30px 28px;
    }
    .gcm-submit-area,
    .gcm-btn,
    .no-print {
        display: none !important;
    }
    .gcm-signature-area {
        background: #f7faff;
        border: 1px solid #b8cfdf;
    }
    .gcm-warning {
        color: #cc0000 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}




/* ===== 两列布局 ===== */
.gcm-form-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.gcm-form-row .gcm-form-group {
    flex: 1 1 calc(50% - 10px);
    min-width: 200px;
}

@media (max-width: 600px) {
    .gcm-form-row .gcm-form-group {
        flex: 1 1 100%;
    }
}

/* ===== 复制按钮 ===== */
#gcm_copy_btn {
    transition: all 0.3s ease;
}

#gcm_copy_btn:hover {
    opacity: 0.85;
    transform: scale(1.02);
}





      
       .notice {
      background: #eef6fa;
      padding: 14px 20px;
      border-radius: 18px;
      font-size: 14px;
      color: #1a4c63;
      border-left: 5px solid #2e7d9e;
      margin: 16px 0 24px;
      line-height: 1.6;
    }
    
    
    
    
    
    
    
/* ============================================================
   手机端专用修复（仅对 600px 以下生效，不影响电脑端）
   ============================================================ */

@media (max-width: 600px) {

    /* ---- 修复1：手机端改为单列布局 ---- */
    .gcm-form-row {
        display: block !important;
        gap: 0;
        /* 每个 row 底部增加分隔线，清晰区分两组 */
        border-bottom: 2px dashed #e8edf2;
        padding-bottom: 6px;
        margin-bottom: 10px;
    }

    /* 最后一个 row（关系字段）不需要底部边框 */
    .gcm-form-row:last-of-type {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }

    .gcm-form-row .gcm-form-group {
        flex: none !important;
        width: 100% !important;
        min-width: 0 !important;
        margin-bottom: 14px;
    }

    .gcm-form-row .gcm-form-group:last-child {
        margin-bottom: 0;
    }

    /* ---- 修复2：签名预览框高度增加（手机端） ---- */
    .gcm-sig-preview {
        height: 120px !important;
        min-height: 120px;
        flex: none !important;
        width: 100% !important;
    }

    .gcm-sig-preview canvas {
        height: 100% !important;
    }

    /* ---- 修复3：签名区域手机端优化 ---- */
    .gcm-signature-area {
        padding: 18px 16px;
        margin: 16px 0;
    }

    .gcm-sig-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    /* ---- 修复4：警告文字完整显示 ---- */
    .gcm-warning {
        display: block;
        white-space: normal;
        word-break: break-word;
        font-size: 13px;
        padding: 10px 14px;
        line-height: 1.6;
        width: 100%;
        box-sizing: border-box;
    }

    /* ---- 修复5：说明文字 ---- */
    .notice {
        font-size: 13px;
        padding: 12px 16px;
        margin: 12px 0 18px;
    }

    /* ---- 修复6：日期居中 ---- */
    .gcm-date-display {
        text-align: center;
        font-size: 15px;
        padding: 8px 14px;
        width: 100%;
        box-sizing: border-box;
    }

    /* ---- 修复7：提交按钮全宽 ---- */
    .gcm-submit-area {
        flex-direction: column;
    }

    .gcm-btn-primary,
    .gcm-btn-outline {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
        box-sizing: border-box;
    }

    /* ---- 修复8：卡片内边距 ---- */
    .gcm-card {
        padding: 20px 16px;
    }

    /* ---- 修复9：模态框手机端 ---- */
    .gcm-modal {
        padding: 20px 16px;
        border-radius: 28px;
    }

    .gcm-drawing-board {
        aspect-ratio: 800 / 280;
    }
}