/**
 * 公告模态框样式
 */

/* 模态框容器 */
.announcement-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.announcement-modal.show {
    opacity: 1;
}

/* 遮罩层 */
.announcement-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

/* 模态框内容 */
.announcement-modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 1200px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.announcement-modal.show .announcement-modal-content {
    transform: scale(1);
}

/* 模态框头部 */
.announcement-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.announcement-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    display: flex;
    align-items: center;
}

.announcement-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.announcement-modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

/* 模态框主体 */
.announcement-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* 公告列表 */
.announcement-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 公告项 */
.announcement-item {
    background: #f9fafb;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s;
}

.announcement-item:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

/* 紧急公告 */
.announcement-item.announcement-urgent {
    background: #fef2f2;
    border-color: #fecaca;
}

.announcement-item.announcement-urgent:hover {
    background: #fee2e2;
    border-color: #fca5a5;
}

/* 重要公告 */
.announcement-item.announcement-important {
    background: #fefce8;
    border-color: #fde68a;
}

.announcement-item.announcement-important:hover {
    background: #fef9c3;
    border-color: #fcd34d;
}

/* 公告头部 */
.announcement-item-header {
    margin-bottom: 8px;
}

.announcement-item-title {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
}

.announcement-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

/* 公告类型标签 */
.announcement-type-normal {
    padding: 2px 8px;
    background: #e5e7eb;
    color: #6b7280;
    border-radius: 4px;
    font-size: 11px;
}

.announcement-type-important {
    padding: 2px 8px;
    background: #fbbf24;
    color: #78350f;
    border-radius: 4px;
    font-size: 11px;
}

.announcement-type-urgent {
    padding: 2px 8px;
    background: #ef4444;
    color: white;
    border-radius: 4px;
    font-size: 11px;
}

/* 公告日期 */
.announcement-item-date {
    color: #9ca3af;
}

/* 公告内容 */
.announcement-item-content {
    font-size: 14px;
    line-height: 1.6;
    color: #4b5563;
    white-space: pre-wrap;
    word-break: break-word;
}

/* 空状态 */
.announcement-empty {
    padding: 60px 20px;
    text-align: center;
}

/* 模态框底部 */
.announcement-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: center;
}

.announcement-modal-btn {
    padding: 8px 24px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.announcement-modal-btn:hover {
    background: #2563eb;
}

/* 响应式 */
@media (max-width: 640px) {
    .announcement-modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .announcement-modal-header {
        padding: 16px 20px;
    }
    
    .announcement-modal-body {
        padding: 20px;
    }
}
