/* 组件样式 */

/* 底部导航按钮激活状态 */
.nav-btn.active {
    color: #4CAF50 !important;
    font-weight: 600;
}

.nav-btn.active .btn-icon {
    transform: scale(1.1);
}

/* 菜单按钮悬停效果 */
.menu-btn:not(.disabled):hover {
    background: #e9ecef;
}

.menu-btn.primary:not(.disabled):hover {
    background: #45a049;
}

/* 关闭按钮动画 */
.close-btn {
    transition: transform 0.3s ease;
}

.close-btn:active {
    transform: rotate(180deg);
}

/* 地图容器样式 */
.map-container {
    background: #e9ecef;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-btn {
        min-height: 44px;
        min-width: 60px;
    }
    
    .menu-btn {
        min-height: 44px;
    }
}

/* 加载状态 */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* 错误状态 */
.error {
    color: #f44336;
    background: #ffebee;
    border: 1px solid #f44336;
}

/* 弹窗层级修复 */
.modal, .management-modal {
    z-index: 4000 !important;
}

.modal .modal-content, 
.management-modal .modal-content {
    z-index: 4001 !important;
}

/* 子弹窗确保在最上层 */
#text-input-modal,
#icon-selector-modal,
#image-picker-modal,
#group-selection-modal,
#image-management-modal,
#image-viewer-modal {
    z-index: 5000 !important;
}

#text-input-modal .modal-content,
#icon-selector-modal .modal-content,
#image-picker-modal .modal-content,
#group-selection-modal .modal-content,
#image-management-modal .modal-content,
#image-viewer-modal .modal-content {
    z-index: 5001 !important;
}

/* 标注信息项样式优化 */
.location-info-item {
    padding: 8px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
}

.location-info-item.empty {
    background: #fff3cd;
    border-color: #ffeaa7;
}

.info-label {
    font-weight: 600;
    color: #333;
    min-width: 80px;
    font-size: 14px;
}

.info-value {
    color: #666;
    flex: 1;
    text-align: right;
    font-size: 14px;
    padding: 0 8px;
}

.empty-text {
    color: #999;
    font-style: italic;
    font-size: 12px;
}

/* 图片预览样式优化 */
.images-preview {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.image-item {
    padding: 4px 8px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 12px;
    text-align: center;
}

/* 操作按钮组优化 */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.cancel-btn, .confirm-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    max-width: 200px;
}

.cancel-btn {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #e0e0e0;
}

.confirm-btn {
    background: #4CAF50;
    color: white;
}

.cancel-btn:active {
    background: #e9ecef;
}

.confirm-btn:active {
    background: #45a049;
}

/* 标注操作按钮优化 */
.mark-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.mark-action-buttons .action-btn {
    width: 100%;
    padding: 12px;
    font-size: 14px;
}

.mark-action-buttons .primary {
    background: #2196F3;
    border-color: #2196F3;
    color: white;
}

.mark-action-buttons .primary:active {
    background: #1976D2;
}

/* 确保表格布局正确 */
.management-table {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 200px;
}

.table-header {
    display: flex;
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    font-weight: 600;
    flex-shrink: 0;
}

.table-body {
    flex: 1;
    overflow-y: auto;
    max-height: 40vh;
}

.table-row {
    display: flex;
    border-bottom: 1px solid #f0f0f0;
    align-items: center;
    min-height: 60px;
}

.table-cell {
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* 列宽分配 */
.table-header .table-cell:nth-child(1),
.table-row .table-cell:nth-child(1) {
    width: 20%; /* 序号 */
}

.table-header .table-cell:nth-child(2),
.table-row .table-cell:nth-child(2) {
    width: 50%; /* 内容 */
}

.table-header .table-cell:nth-child(3),
.table-row .table-cell:nth-child(3) {
    width: 30%; /* 操作 */
}

/* 操作按钮样式 */
.action-btn {
    padding: 6px 12px;
    border: 1px solid #4CAF50;
    background: white;
    color: #4CAF50;
    border-radius: 6px;
    font-size: 12px;
    margin: 0 2px;
    min-width: 50px;
}

.action-btn:active {
    background: #4CAF50;
    color: white;
}

.delete-btn {
    border-color: #f44336;
    color: #f44336;
}

.delete-btn:active {
    background: #f44336;
    color: white;
}