/* supplier-map.css */

.supplier-map-page {
    background: #f5f6fa;

}

.supplier-map-container {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.page-title {
    text-align: center;
    padding: 20px;
    margin: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 28px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.map-layout {
    display: flex;
    height: calc(100vh - 100px);
    background: white;
}

/* 左侧供应商列表面板 */
.suppliers-list-panel {
    width: 350px;
    border-right: 1px solid #e1e8ed;
    display: flex;
    flex-direction: column;
    background: white;
    box-shadow: 2px 0 10px rgba(0,0,0,0.05);
}

.panel-header {
    padding: 20px;
    border-bottom: 1px solid #e1e8ed;
    background: #f8f9fa;
}

.panel-header h2 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-box {
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
}

.search-box input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.suppliers-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.supplier-item {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #e1e8ed;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.supplier-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.supplier-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.supplier-item.active .supplier-name {
    color: white;
}

.supplier-item.active .supplier-location {
    color: rgba(255,255,255,0.9);
}

.supplier-avatar {
    margin-right: 15px;
    flex-shrink: 0;
}

.supplier-avatar img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 50%;
    border: 2px solid #e1e8ed;
    background: white;
    padding: 2px;
}

.avatar-placeholder {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
}

.supplier-info {
    flex: 1;
    min-width: 0;
}

.supplier-name {
    margin: 0 0 5px 0;
    font-size: 16px!important;
    font-weight: 600;
    color: #2c3e50;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.supplier-location {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #7f8c8d;
    display: flex;
    align-items: center;
    gap: 5px;
}

.supplier-level {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 15px;
    font-weight: 500;
    background: #e9ecef;
    color: #495057;
}

.supplier-level.vip {
    background: #1e90ff;
    color: white;
}

.supplier-level.svip {
    background: #ffd700;
    color: #000;
}

.no-suppliers {
    text-align: center;
    padding: 50px 20px;
    color: #999;
    font-style: italic;
}

/* 右侧地图面板 */
.map-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.map-panel .panel-header {
    background: #f8f9fa;
}

.map-panel .panel-header h2 {
    margin: 0;
}

.suppliers-map {
    flex: 1;
    width: 100%;
    min-height: 400px;
}

/* 供应商信息卡片弹窗 */
.supplier-profile-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    position: relative;
    animation: slideIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.close-modal {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    z-index: 10001;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.close-modal:hover {
    color: #000;
    background: rgba(0,0,0,0.1);
}

.supplier-profile-card {
    padding: 25px;
}

.profile-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.profile-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 50%;
    border: 2px solid #e1e8ed;
    margin-right: 15px;
    background: white;
    padding: 5px;
}

.profile-logo-placeholder {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    margin-right: 15px;
}

.profile-info h3 {
    margin: 0 0 5px 0;
    color: #2c3e50;
    font-size: 18px!important;
}

.profile-info p {
    margin: 0 0 10px 0;
    color: #7f8c8d;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.profile-level {
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 15px;
    font-weight: 500;
    background: #e9ecef;
    color: #495057;
}

.profile-level.vip {
    background: #1e90ff;
    color: white;
}

.profile-level.svip {
    background: #ffd700;
    color: #000;
}

.profile-actions {
    text-align: center;
}

.view-details-btn {
    display: inline-block;
    padding: 12px 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.view-details-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .map-layout {
        flex-direction: column;
        height: auto;
    }
    
    .suppliers-list-panel {
        width: 100%;
        max-height: 400px;
    }
    
    .map-panel {
        height: 500px;
    }
}

@media (max-width: 768px) {
    .page-title {
        font-size: 24px;
        padding: 15px;
    }
    
    .suppliers-list-panel {
        max-height: 300px;
    }
    
    .supplier-item {
        padding: 12px;
    }
    
    .supplier-avatar img,
    .avatar-placeholder {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .supplier-name {
        font-size: 14px;
    }
    
    .supplier-location {
        font-size: 12px;
    }
    
    .map-panel {
        height: 400px;
    }
    
    .modal-content {
        margin: 15% auto;
        width: 95%;
        max-width: 350px;
    }
    
    .supplier-profile-card {
        padding: 20px;
    }
    
    .profile-logo,
    .profile-logo-placeholder {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .suppliers-list-panel {
        max-height: 250px;
    }
    
    .supplier-item {
        padding: 10px;
    }
    
    .supplier-avatar {
        margin-right: 10px;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-logo,
    .profile-logo-placeholder {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .map-panel {
        height: 350px;
    }
}