/**
 * 学生成绩分析系统 - 模态框组件样式
 */

/* 模态框覆盖层 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

/* 基础模态框 */
.modal {
    background: white;
    border-radius: 8px;
    padding: 24px;
    width: 90%;
    max-width: 650px;
    max-height: 80vh;
    overflow-y: auto;
}

/* 模态框头部 */
.modal-header {
    position: sticky;
    top: 0;
    background: white;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
}

/* 设置面板 */
.settings-panel {
    display: none;
    padding: 0 20px;
}

.settings-panel.active {
    display: block;
}

/* 导入提示 */
.import-tips {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.import-tips h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.import-tips ul {
    margin: 10px 0;
    padding-left: 20px;
}

.import-tips li {
    color: var(--text-secondary);
    margin: 5px 0;
}

.template-download {
    margin-top: 15px;
}

/* 学科设置 */
.subject-setting {
    background: #f8f9fa;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
}

.subject-setting-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.cloud-status {
    margin-top: 8px;
    font-size: 13px;
    min-height: 18px;
    color: var(--text-secondary);
}

.cloud-status-success {
    color: #2e7d32;
}

.cloud-status-error {
    color: #d32f2f;
}

.cloud-status-warning {
    color: #f57c00;
}

.cloud-status-info {
    color: #1976d2;
}

.cloud-sync-section {
    background: #f8f9fb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid #eef2f7;
}

.cloud-sync-section h4 {
    margin: 0 0 8px;
    font-size: 15px;
    color: #1a237e;
}

.cloud-sync-section p {
    margin: 0 0 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 13px;
}

.cloud-sync-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.cloud-sync-actions button {
    flex-shrink: 0;
}

.cloud-sync-field {
    margin-bottom: 12px;
}

.cloud-sync-field label {
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.cloud-sync-field input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    font-size: 14px;
}

.cloud-sync-actions-wrap {
    flex-wrap: wrap;
    align-items: flex-start;
}

.cloud-sync-actions-wrap .cloud-status {
    min-width: 180px;
}

/* 反馈问题模态框 */
.feedback-modal {
    max-width: 420px;
    text-align: center;
}

.feedback-modal-body {
    padding: 12px 20px 24px;
}

.feedback-tip {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 16px;
}

.feedback-qr {
    display: block;
    width: 240px;
    max-width: 70vw;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    padding: 10px;
    margin: 0 auto;
}

.feedback-note {
    margin-top: 12px;
    font-size: 13px;
    color: #6b7280;
}

.auth-summary {
    margin-top: 12px;
    padding: 12px;
    border-radius: 8px;
    border: 1px dashed #d6e0f5;
    background-color: #fff;
}

.auth-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.auth-summary-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.auth-summary-name {
    font-size: 16px;
    font-weight: 600;
    color: #1a237e;
}

.auth-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.auth-badge-guest {
    background: #f5f5f5;
    color: #757575;
}

.auth-badge-basic {
    background: #e3f2fd;
    color: #1976d2;
}

.auth-badge-pro {
    background: #e8f5e9;
    color: #2e7d32;
}

.auth-badge-legacy {
    background: #fff3e0;
    color: #ef6c00;
}

.auth-summary-item {
    font-size: 13px;
    margin-bottom: 4px;
}

.auth-summary-item.success {
    color: #2e7d32;
}

.auth-summary-item.muted {
    color: var(--text-secondary);
}

.auth-summary-actions {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
}

.auth-summary-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid #d6e0f5;
    background: #f8f9fb;
    color: #1a237e;
    cursor: pointer;
}

.auth-summary-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.input-with-button {
    display: flex;
    gap: 8px;
}

.input-with-button input {
    flex: 1;
}

.input-with-button button {
    flex-shrink: 0;
}

.legacy-redeem-field .cloud-status {
    margin-top: 6px;
}
