/* ===============================
   基金数据表格模态框样式
   =============================== */

/* 数据表格模态框 */
#fundDataModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    animation: fadeIn 0.3s ease;
}

#fundDataModal .modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-secondary);
    border-radius: 12px;
    width: 90vw;
    max-width: 900px;
    max-height: 85vh;
    box-shadow: 0 10px 30px var(--shadow);
    display: flex;
    flex-direction: column;
}

#fundDataModal .modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-tertiary);
    border-radius: 12px 12px 0 0;
}

#fundDataModal .modal-header h2 {
    margin: 0;
    color: var(--text-primary);
    font-size: 20px;
}

#fundDataModal .close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition-interaction);
}

#fundDataModal .close-btn:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}

#fundDataModal .modal-body {
    padding: 20px;
    overflow: visible;
    flex: 1;
    display: flex;
    flex-direction: column;
}

#fundDataTableContainer {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 12px;
}

/* 数据表格样式 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-tertiary);
    border-radius: 8px;
    overflow: hidden;
    table-layout: auto;
}

.data-table thead tr {
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-weight: 600;
}

.data-table th {
    padding: 2px 6px;
    text-align: left;
    border-bottom: 2px solid var(--border-color);
    font-size: 11px;
}

.data-table tbody tr {
    transition: background 0.2s ease;
}

.data-table tbody tr:hover {
    background: var(--hover-bg) !important;
}

.data-table td {
    padding: 1px 6px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    font-size: 11px;
    line-height: 1.3;
}

/* 响应式调整 */
@media (max-width: 768px) {
    #fundDataModal .modal-content {
        width: 95vw;
        max-height: 90vh;
    }

    #fundDataModal .modal-header {
        padding: 15px;
    }

    #fundDataModal .modal-header h2 {
        font-size: 18px;
    }

    #fundDataModal .modal-body {
        padding: 15px;
    }

    .data-table th,
    .data-table td {
        padding: 8px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    #fundDataModal .modal-content {
        width: 98vw;
        max-height: 95vh;
    }

    #fundDataModal .modal-header {
        padding: 12px;
    }

    #fundDataModal .modal-header h2 {
        font-size: 16px;
    }

    #fundDataModal .modal-body {
        padding: 12px;
    }

    .data-table th,
    .data-table td {
        padding: 6px;
        font-size: 11px;
    }
}

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