/**
 * 文件路径: /home/ubuntu/talktalk_backend/public/css/modal.css
 * 功能用途: 模态框和加载指示器样式
 * 版本: v3.0
 * 最后修改: 2025-11-27 - 切换到可爱卡通主题
 */

/* ==================== 模态框 ==================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(69, 90, 100, 0.6); /* 柔和的遮罩 */
    backdrop-filter: blur(4px);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--border-radius-lg);
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 15px 50px rgba(0,0,0,0.15);
    border: 4px solid rgba(255, 255, 255, 0.5);
    animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

[data-theme="dark"] .modal-content {
    background: rgba(55, 71, 79, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background-color: var(--bg-primary);
    border-bottom: 2px solid rgba(0,0,0,0.05);
}

.modal-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.4em;
}

.cartoon-close-btn {
    background: var(--bg-tertiary);
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.cartoon-close-btn:hover {
    background-color: var(--danger-color);
    color: #fff;
    transform: rotate(90deg);
}

.modal-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

/* ==================== 加载指示器 ==================== */
.loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.loading.active {
    display: flex;
}

.cartoon-loading p {
    margin-top: 15px;
    font-size: 1.2em;
    color: var(--primary-color);
    font-weight: bold;
    letter-spacing: 1px;
}

/* 动画定义 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
