2025-08-04 22:16:26 +08:00
|
|
|
|
.modal-overlay {
|
|
|
|
|
|
position: fixed;
|
|
|
|
|
|
top: 0;
|
|
|
|
|
|
left: 0;
|
|
|
|
|
|
right: 0;
|
|
|
|
|
|
bottom: 0;
|
|
|
|
|
|
background: rgba(0, 0, 0, 0.5);
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
z-index: 1000;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.modal-content {
|
|
|
|
|
|
background: white;
|
2025-08-26 12:34:47 +08:00
|
|
|
|
border-radius: 10px;
|
|
|
|
|
|
padding: 0;
|
2025-08-04 22:16:26 +08:00
|
|
|
|
width: 90%;
|
2025-08-26 12:34:47 +08:00
|
|
|
|
max-width: 640px;
|
2025-08-04 22:16:26 +08:00
|
|
|
|
max-height: 90vh;
|
2025-08-26 12:34:47 +08:00
|
|
|
|
overflow: hidden; /* 由 body 滚动,标题栏固定 */
|
|
|
|
|
|
box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
|
2025-08-05 09:51:41 +08:00
|
|
|
|
position: relative;
|
|
|
|
|
|
z-index: 1001;
|
2025-08-27 11:00:53 +08:00
|
|
|
|
display: flex; /* 纵向布局,便于底栏固定 */
|
2025-08-26 12:34:47 +08:00
|
|
|
|
flex-direction: column;
|
2025-08-04 22:16:26 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-08-26 12:34:47 +08:00
|
|
|
|
/* 模拟窗口标题栏 */
|
|
|
|
|
|
.modal-titlebar {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
height: 3rem; /* 与主窗口标题栏一致 */
|
|
|
|
|
|
padding: 0 12px; /* 接近主头部的水平留白 */
|
|
|
|
|
|
background: #3498db; /* 与 .app-header 相同 */
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
border-top-left-radius: 10px;
|
|
|
|
|
|
border-top-right-radius: 10px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 左侧占位以保证标题居中(与右侧关闭按钮宽度相当) */
|
2025-08-27 11:00:53 +08:00
|
|
|
|
.modal-spacer {
|
|
|
|
|
|
width: 32px;
|
|
|
|
|
|
flex: 0 0 32px;
|
|
|
|
|
|
}
|
2025-08-26 12:34:47 +08:00
|
|
|
|
|
|
|
|
|
|
.modal-title {
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
font-size: 1rem;
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.modal-close-btn {
|
|
|
|
|
|
background: transparent;
|
|
|
|
|
|
border: none;
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
font-size: 20px;
|
|
|
|
|
|
line-height: 1;
|
|
|
|
|
|
padding: 2px 6px;
|
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.modal-close-btn:hover {
|
|
|
|
|
|
background: rgba(255, 255, 255, 0.18);
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-08-27 11:00:53 +08:00
|
|
|
|
.modal-form {
|
|
|
|
|
|
/* 表单外层包裹 body + footer */
|
2025-08-26 12:34:47 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
flex: 1 1 auto;
|
2025-08-27 11:00:53 +08:00
|
|
|
|
min-height: 0; /* 允许子元素正确计算高度 */
|
2025-08-26 12:34:47 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.modal-body {
|
|
|
|
|
|
padding: 1.25rem 1.5rem 1.5rem;
|
2025-08-27 11:00:53 +08:00
|
|
|
|
overflow: auto; /* 仅内容区滚动 */
|
2025-08-26 12:34:47 +08:00
|
|
|
|
flex: 1 1 auto;
|
|
|
|
|
|
min-height: 0;
|
2025-08-04 22:16:26 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-08-06 16:29:52 +08:00
|
|
|
|
.error-message {
|
|
|
|
|
|
background: #fee;
|
|
|
|
|
|
color: #c33;
|
|
|
|
|
|
padding: 0.75rem;
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
margin-bottom: 1rem;
|
|
|
|
|
|
border: 1px solid #fcc;
|
|
|
|
|
|
font-size: 0.9rem;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-08-04 22:16:26 +08:00
|
|
|
|
.presets {
|
|
|
|
|
|
margin-bottom: 1.5rem;
|
|
|
|
|
|
padding-bottom: 1.5rem;
|
|
|
|
|
|
border-bottom: 1px solid #ecf0f1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.presets label {
|
|
|
|
|
|
display: block;
|
|
|
|
|
|
margin-bottom: 0.5rem;
|
|
|
|
|
|
color: #555;
|
|
|
|
|
|
font-size: 0.9rem;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.preset-buttons {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
gap: 0.5rem;
|
2025-08-07 15:48:30 +08:00
|
|
|
|
flex-wrap: wrap;
|
2025-08-04 22:16:26 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.preset-btn {
|
|
|
|
|
|
padding: 0.375rem 0.75rem;
|
|
|
|
|
|
border: 1px solid #3498db;
|
|
|
|
|
|
background: white;
|
|
|
|
|
|
color: #3498db;
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
font-size: 0.85rem;
|
|
|
|
|
|
transition: all 0.2s;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-08-21 21:46:48 +08:00
|
|
|
|
.preset-btn:hover,
|
|
|
|
|
|
.preset-btn.selected {
|
2025-08-04 22:16:26 +08:00
|
|
|
|
background: #3498db;
|
|
|
|
|
|
color: white;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.form-group {
|
|
|
|
|
|
margin-bottom: 1.25rem;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.form-group label {
|
|
|
|
|
|
display: block;
|
|
|
|
|
|
margin-bottom: 0.5rem;
|
|
|
|
|
|
color: #555;
|
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-08-27 10:39:39 +08:00
|
|
|
|
/* API Key 输入框容器 - 预留空间避免抖动 */
|
|
|
|
|
|
.form-group.api-key-group {
|
|
|
|
|
|
min-height: 88px; /* 固定高度:label + input + 间距 */
|
|
|
|
|
|
transition: opacity 0.2s ease;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.form-group.api-key-group.hidden {
|
|
|
|
|
|
opacity: 0;
|
|
|
|
|
|
visibility: hidden;
|
|
|
|
|
|
pointer-events: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-08-07 15:48:30 +08:00
|
|
|
|
.form-group input,
|
|
|
|
|
|
.form-group textarea {
|
2025-08-04 22:16:26 +08:00
|
|
|
|
width: 100%;
|
|
|
|
|
|
padding: 0.625rem;
|
|
|
|
|
|
border: 1px solid #ddd;
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
font-size: 0.95rem;
|
|
|
|
|
|
transition: border-color 0.2s;
|
2025-08-05 09:51:41 +08:00
|
|
|
|
background: white;
|
2025-08-07 15:48:30 +08:00
|
|
|
|
box-sizing: border-box;
|
2025-08-04 22:16:26 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-08-07 15:48:30 +08:00
|
|
|
|
.form-group textarea {
|
|
|
|
|
|
resize: vertical;
|
|
|
|
|
|
min-height: 200px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.form-group input:focus,
|
|
|
|
|
|
.form-group textarea:focus {
|
2025-08-04 22:16:26 +08:00
|
|
|
|
outline: none;
|
|
|
|
|
|
border-color: #3498db;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-08-27 11:00:53 +08:00
|
|
|
|
.modal-footer {
|
|
|
|
|
|
/* 固定在弹窗底部(非滚动区) */
|
2025-08-04 22:16:26 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
|
gap: 1rem;
|
|
|
|
|
|
justify-content: flex-end;
|
2025-08-26 12:34:47 +08:00
|
|
|
|
padding: 0.75rem 1.5rem;
|
|
|
|
|
|
border-top: 1px solid #ecf0f1;
|
|
|
|
|
|
background: #fff;
|
2025-08-04 22:16:26 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.cancel-btn,
|
|
|
|
|
|
.submit-btn {
|
|
|
|
|
|
padding: 0.625rem 1.25rem;
|
|
|
|
|
|
border: none;
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
font-size: 0.95rem;
|
|
|
|
|
|
transition: all 0.2s;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.cancel-btn {
|
|
|
|
|
|
background: #ecf0f1;
|
|
|
|
|
|
color: #555;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.cancel-btn:hover {
|
|
|
|
|
|
background: #bdc3c7;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.submit-btn {
|
|
|
|
|
|
background: #27ae60;
|
|
|
|
|
|
color: white;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.submit-btn:hover {
|
|
|
|
|
|
background: #229954;
|
2025-08-05 09:51:41 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-08-06 10:09:58 +08:00
|
|
|
|
.field-hint {
|
|
|
|
|
|
display: block;
|
|
|
|
|
|
margin-top: 0.25rem;
|
|
|
|
|
|
color: #7f8c8d;
|
|
|
|
|
|
font-size: 0.8rem;
|
|
|
|
|
|
line-height: 1.3;
|
2025-08-07 23:05:11 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 添加标签和选择框的样式 */
|
|
|
|
|
|
.label-with-checkbox {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
align-items: baseline;
|
|
|
|
|
|
margin-bottom: 0.5rem;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.label-with-checkbox label:first-child {
|
|
|
|
|
|
margin-bottom: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.checkbox-label {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
gap: 0.3rem;
|
|
|
|
|
|
font-size: 0.85rem;
|
|
|
|
|
|
color: #666;
|
|
|
|
|
|
font-weight: normal;
|
|
|
|
|
|
margin-bottom: 0;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.checkbox-label input[type="checkbox"] {
|
|
|
|
|
|
width: auto;
|
|
|
|
|
|
margin: 2px;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
transform: translateY(2px);
|
2025-08-26 12:34:47 +08:00
|
|
|
|
}
|