/* ============================================================
   统一弹窗组件样式 (modal.js 配套)
   纯 HTML/CSS 渲染，Android / iOS 显示完全一致
   ============================================================ */

/* ---- 页面滚动锁定 ---- */
.kc-modal-lock {
    overflow: hidden !important;
}

/* ---- 遮罩层 ---- */
.kc-modal-mask {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    padding: 40px 28px;
    background: rgba(15, 23, 42, 0.55);
    opacity: 0;
    -webkit-transition: opacity 0.18s ease;
    transition: opacity 0.18s ease;
}
.kc-modal-mask.kc-modal-show {
    opacity: 1;
}
.kc-modal-mask.kc-modal-hide {
    opacity: 0;
}

/* ---- 弹窗卡片 ---- */
.kc-modal {
    position: relative;
    width: 100%;
    max-width: 300px;
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.25);
    -webkit-transform: scale(0.9);
    transform: scale(0.9);
    opacity: 0;
    -webkit-transition: -webkit-transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
}
.kc-modal-mask.kc-modal-show .kc-modal {
    -webkit-transform: scale(1);
    transform: scale(1);
    opacity: 1;
}

/* ---- 标题 ---- */
.kc-modal-title {
    padding: 22px 20px 0;
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    text-align: center;
    line-height: 1.4;
    word-break: break-word;
}

/* ---- 内容 ---- */
.kc-modal-message {
    padding: 12px 20px 22px;
    font-size: 14px;
    line-height: 1.6;
    color: #475569;
    text-align: left;
    white-space: pre-line;
    word-break: break-word;
}
.kc-modal-no-title .kc-modal-message {
    padding-top: 24px;
}

/* ---- 右上角关闭按钮（三按钮弹窗的第三个动作） ---- */
.kc-modal-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #94a3b8;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
}
.kc-modal-close:active {
    background: #f1f5f9;
    color: #334155;
}

/* ---- 按钮区 ---- */
.kc-modal-footer {
    display: -webkit-flex;
    display: flex;
    gap: 10px;
    padding: 14px;
    border-top: 1px solid #f1f5f9;
}
/* 两键并排 */
.kc-modal-footer.kc-modal-row {
    -webkit-flex-direction: row;
    flex-direction: row;
}
/* 四键及以上：竖排 */
.kc-modal-footer.kc-modal-col {
    -webkit-flex-direction: column;
    flex-direction: column;
}
.kc-modal-btn {
    display: block;
    height: 44px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #334155;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}
.kc-modal-footer.kc-modal-row .kc-modal-btn {
    -webkit-flex: 1;
    flex: 1;
    width: auto;
}
.kc-modal-footer.kc-modal-col .kc-modal-btn {
    width: 100%;
}
/* 主要操作（最后一个按钮） */
.kc-modal-btn.kc-modal-btn-primary {
    border-color: #2563eb;
    background: #2563eb;
    color: #ffffff;
}
.kc-modal-btn:active {
    opacity: 0.85;
}
