/* 弹窗工具类样式 */

/* 遮罩层 */
.ic-modal-mask {
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    /* 禁止遮罩层本身滚动 */
}

/* 模态框容器 */
.ic-modal {
    width: 86%;
    max-width: 420px;
    background: linear-gradient(to bottom, #ffffff 0%, #fafafa 100%);
    /* 微妙的渐变背景 */
    border-radius: 18px;
    /* 圆角更大 */
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.06),
        0 12px 32px rgba(0, 0, 0, 0.1),
        0 24px 64px rgba(0, 0, 0, 0.08);
    /* 多层次柔和阴影 */
    padding: 24px;
    max-height: 80vh;
    overflow-y: auto;
    backdrop-filter: blur(10px);
    /* 背景模糊效果 */
}

/* 标题 */
.ic-modal-title {
    font-size: 20px;
    /* 字号更大 */
    font-weight: 700;
    /* 更粗 */
    margin-bottom: 0;
    padding-bottom: 18px;
    color: #1a1a1a;
    /* 更深的黑色 */
    text-align: center;
    /* 标题居中 */
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    /* 更柔和的分割线 */
    letter-spacing: 0.5px;
    /* 字间距更舒展 */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    /* 微妙的文字阴影 */
}

/* 内容区域 */
.ic-modal-content {
    margin-top: 16px;
    /* 与标题分割线保持距离 */
    margin-bottom: 16px;
}

/* 表单项包装 */
.ic-modal-field {
    margin-bottom: 12px;
}

.ic-modal-field:last-child {
    margin-bottom: 0;
}

/* 表单标签 */
.ic-modal-label {
    font-size: 13px;
    color: #333;
    margin-bottom: 6px;
    display: block;
}

/* 输入框 */
.ic-modal-input,
.ic-modal-textarea,
.ic-modal-select {
    width: 100%;
    padding: 8px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
}

.ic-modal-textarea {
    height: 90px;
    resize: vertical;
    font-family: inherit;
}

.ic-modal-input::placeholder,
.ic-modal-textarea::placeholder {
    color: #999;
    font-size: 12px;
}

/* 通用输入框容器 */
.ic-modal-input-box {
    position: relative !important;
    width: 100% !important;
    display: block !important;
}

/* 清除按钮 - 绝对定位 */
.ic-modal-clear-btn {
    position: absolute !important;
    right: 10px !important;
    top: 0 !important;
    bottom: 0 !important;
    margin: auto !important; /* 垂直居中关键 */
    width: 18px !important;
    height: 18px !important;
    background: rgba(0, 0, 0, 0.15) !important;
    border-radius: 50% !important;
    color: #fff !important;
    font-size: 14px !important;
    line-height: 16px !important;
    text-align: center !important;
    cursor: pointer !important;
    display: none; /* 默认隐藏 */
    z-index: 10 !important;
    pointer-events: auto !important;
    transform: none !important; /* 移除 translate，避免定位偏移 */
}

.ic-modal-clear-btn:hover {
    background: rgba(0, 0, 0, 0.3) !important;
}

/* 验证码行容器 - 强制 Flex */
.ic-modal-sms-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    width: 100% !important;
    gap: 0 !important; /* 移除 gap，改用 margin */
}

/* 验证码输入框包装 */
.ic-modal-sms-input-wrapper {
    flex: 1 1 auto !important;
    position: relative !important;
    min-width: 0 !important;
    display: block !important;
    margin-right: 10px !important;
    height: 42px !important;
}

/* 输入框样式 */
.ic-modal-input,
.ic-modal-sms-input {
    width: 100% !important;
    display: block !important;
    height: 100% !important; /* 跟随容器高度 */
    min-height: 42px !important; /* 最小高度保障 */
    padding: 0 32px 0 12px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    border: 1px solid #d9d9d9 !important;
    border-radius: 6px !important;
    outline: none !important;
    font-size: 14px !important;
    background: #fff !important;
    line-height: normal !important;
}

/* 验证码按钮 */
.ic-modal-sms-btn {
    flex: 0 0 110px !important;
    width: 110px !important;
    height: 42px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid #007AFF !important;
    background: #fff !important;
    color: #007AFF !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.ic-modal-sms-btn:active {
    background: #f0f7ff;
    opacity: 0.8;
}

.ic-modal-sms-btn.is-disabled {
    border-color: #d9d9d9;
    color: #999;
    background: #f5f5f5;
    cursor: not-allowed;
}

/* 验证码模式下的清除按钮位置修正 */
.ic-modal-sms-wrap .ic-modal-clear-btn {
    right: 125px !important;
}

/* 错误提示 */
.ic-modal-error {
    color: #F5222D;
    font-size: 12px;
    margin-top: 6px;
    min-height: 18px;
}

/* 提示文本 */
.ic-modal-hint {
    font-size: 12px;
    color: #999;
    margin-top: 8px;
}

/* 进度条 */
.ic-modal-progress-wrap {
    width: 100%;
    height: 8px;
    background: #f0f0f0;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 12px;
}

.ic-modal-progress-bar {
    height: 100%;
    width: 0%;
    background: #52C41A;
    border-radius: 6px;
    transition: width 0.3s ease;
}

/* 状态文本 */
.ic-modal-status {
    font-size: 12px;
    color: #666;
    margin-top: 8px;
}

/* 文件选择按钮 */
.ic-modal-file-btn {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #d9d9d9;
    background: #fff;
    color: #666;
    margin-top: 8px;
    cursor: pointer;
    font-size: 14px;
}

.ic-modal-file-name {
    font-size: 14px;
    color: #666;
    min-height: 20px;
}

/* 按钮组 */
.ic-modal-buttons {
    display: flex;
    gap: 12px;
    margin-top: 28px;
    /* 间距增加 */
    justify-content: center;
    /* 按钮居中对齐 */
}

/* 按钮基础样式 */
.ic-modal-btn {
    flex: 1;
    padding: 14px 28px;
    /* 高度增加 */
    border-radius: 14px;
    /* 圆角更大 */
    font-size: 16px;
    font-weight: 600;
    /* 字重增加 */
    cursor: pointer;
    border: none;
    outline: none;
    min-width: 140px;
    max-width: 360px;
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /* 更流畅的缓动函数 */
    letter-spacing: 0.5px;
    /* 字间距 */
    position: relative;
    overflow: hidden;
}

/* 取消按钮 */
.ic-modal-btn-cancel {
    border: 1px solid #d9d9d9;
    background: #fff;
    color: #666;
}

.ic-modal-btn-cancel:hover {
    background: #f9f9f9;
    border-color: #bbb;
}

.ic-modal-btn-cancel:active {
    background: #f0f0f0;
    transform: scale(0.98);
    /* 按下时轻微缩小 */
}

/* 确认按钮 */
.ic-modal-btn-confirm {
    background: linear-gradient(135deg, #007AFF 0%, #0051D5 100%);
    /* 渐变背景 */
    color: #fff;
    box-shadow: 
        0 4px 12px rgba(0, 122, 255, 0.3),
        0 2px 4px rgba(0, 122, 255, 0.2),
        inset 0 -2px 4px rgba(0, 0, 0, 0.1);
    /* 多层次阴影，内阴影增加立体感 */
}

/* 添加光泽效果 */
.ic-modal-btn-confirm::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.15), transparent);
    border-radius: 14px 14px 0 0;
    pointer-events: none;
}

.ic-modal-btn-confirm:hover {
    background: linear-gradient(135deg, #0067DB 0%, #0047BA 100%);
    box-shadow: 
        0 6px 20px rgba(0, 122, 255, 0.4),
        0 3px 8px rgba(0, 122, 255, 0.25),
        inset 0 -2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    /* 悬停时向上浮动 */
}

.ic-modal-btn-confirm:active {
    background: linear-gradient(135deg, #0055B3 0%, #003D99 100%);
    box-shadow: 
        0 2px 8px rgba(0, 122, 255, 0.3),
        inset 0 2px 4px rgba(0, 0, 0, 0.15);
    transform: translateY(0) scale(0.98);
    /* 按下时归位并缩小 */
}

.ic-modal-btn-confirm:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 单按钮时自适应宽度，不占满全宽 */
.ic-modal-btn-full {
    flex: 0 1 auto;
    /* 不拉伸，根据内容自适应 */
    width: auto;
    /* 自动宽度 */
}

/* 消息内容样式 */
.ic-modal-message {
    font-size: 15px;
    /* 字号稍大 */
    color: #555;
    /* 颜色稍深 */
    line-height: 1.8;
    /* 行高增加，更易读 */
    letter-spacing: 0.3px;
    /* 字间距 */
    margin: 20px 0 24px;
    /* 间距增加 */
    padding: 0 4px;
    /* 左右留白 */
}

/* 消息内容中的段落 */
.ic-modal-message p {
    margin: 0 0 12px 0;
}

.ic-modal-message p:first-child {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
    /* 第一段（问候语）突出显示 */
}

.ic-modal-message p:last-child {
    margin-bottom: 0;
}

