/* 党员管理模态框样式 - 用于替代JavaScript中的内联样式 */

/* ===== 批量导入模态框 ===== */
.modal-import-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: 2000;
}

.modal-import-content {
    background: white;
    border-radius: 8px;
    max-width: 1200px;
    width: 95vw;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.modal-import-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border-radius: 8px 8px 0 0;
}

.modal-import-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.modal-import-close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    background: none;
    border: none;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-import-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-import-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.modal-import-info h4 {
    color: #dc2626;
    margin-bottom: 10px;
}

.modal-import-info ul {
    margin: 0;
    padding-left: 20px;
    color: #666;
}

.modal-import-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid #e5e7eb;
}

/* ===== 文件上传区域 ===== */
.file-upload-area {
    border: 2px dashed #dc2626;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    background: #fef2f2;
    transition: background 0.3s;
}

.file-upload-area:hover {
    background: #fee2e2;
}

.file-upload-icon {
    font-size: 48px;
    color: #dc2626;
    margin-bottom: 15px;
}

.file-upload-title {
    color: #dc2626;
    margin-bottom: 10px;
}

.file-upload-hint {
    color: #666;
    margin: 0;
}

.file-info {
    display: none;
    margin-top: 20px;
    padding: 15px;
    background: #e8f5e8;
    border-radius: 8px;
}

.file-info-visible {
    display: flex;
    align-items: center;
    gap: 15px;
}

.file-info-icon {
    font-size: 24px;
    color: #28a745;
}

.file-info-content {
    flex: 1;
}

.file-info-name {
    margin: 0;
    color: #28a745;
}

.file-info-size {
    margin: 5px 0 0 0;
    color: #666;
    font-size: 14px;
}

.file-info-remove {
    background: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}

/* ===== 预览区域 ===== */
.preview-section {
    display: none;
    margin-top: 20px;
}

.preview-section-visible {
    display: block;
}

.preview-title {
    color: #dc2626;
    margin-bottom: 15px;
}

.preview-content {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
}

/* ===== 添加党员模态框 ===== */
.modal-add-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: 2000;
}

.modal-add-content {
    background: white;
    border-radius: 8px;
    max-width: 800px;
    width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.modal-add-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border-radius: 8px 8px 0 0;
}

.modal-add-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.modal-add-close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    background: none;
    border: none;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== 通知动画 ===== */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.notification {
    transition: all 0.3s ease;
}

.notification button:hover {
    opacity: 1 !important;
}

.notification-slide-out {
    animation: slideOutRight 0.3s ease-out;
}

/* ===== 模态框显示状态 ===== */
.modal-overlay-visible {
    display: flex !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 9999 !important;
    align-items: center !important;
    justify-content: center !important;
}

.modal-visible {
    display: block !important;
}

/* ===== 文件信息显示状态 ===== */
.file-info-visible {
    display: flex;
    align-items: center;
    gap: 15px;
}

.file-info:not(:has(.file-info-visible)) {
    display: none;
}

.preview-section-visible {
    display: block;
}

.preview-section:not(.preview-section-visible) {
    display: none;
}

/* ===== 错误状态样式 ===== */
.error-state {
    padding: 60px 20px;
    text-align: center;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.error-state-icon {
    font-size: 48px;
    color: #dc3545;
    margin-bottom: 20px;
}

.error-state-title {
    color: #333;
    margin-bottom: 10px;
}

.error-state-message {
    color: #666;
    margin-bottom: 20px;
}

.error-state-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* ===== 空状态样式 ===== */
.empty-state-table {
    text-align: center;
    padding: 40px;
    color: #666;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
    color: #ccc;
}

.empty-state-title {
    margin: 0 0 8px 0;
    color: #999;
}

.empty-state-hint {
    margin: 0;
    color: #aaa;
}

/* ===== 按钮样式 ===== */
.btn-download-template {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-cancel {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-preview {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-import {
    background: #dc2626;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
}

/* ===== 添加党员表单样式 ===== */
/* 从 members.js 的 showAddModal() 方法提取 */

.modal-add-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-add-form {
    /* 表单容器样式 */
}

.modal-add-form .form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.modal-add-form .form-group {
    flex: 1;
}

.modal-add-form .form-group-full {
    margin-bottom: 20px;
}

.modal-add-form .form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.modal-add-form .required-mark {
    color: red;
}

.modal-add-form .form-input,
.modal-add-form .form-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.modal-add-form .form-input:focus,
.modal-add-form .form-select:focus {
    outline: none;
    border-color: #dc2626;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.1);
}

.modal-add-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid #e5e7eb;
}

.modal-add-footer .btn-cancel {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.modal-add-footer .btn-cancel:hover {
    background: #5a6268;
}

.modal-add-footer .btn-save {
    background: #dc2626;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.modal-add-footer .btn-save:hover {
    background: #c82333;
}

