// 地图组件样式文件
.map-widget-wrapper {
  width: 100%;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;

  .map-widget-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;

    .map-widget-title {
      margin: 0 0 8px 0;
      font-size: 18px;
      font-weight: 600;
    }

    .map-widget-address {
      display: flex;
      align-items: center;
      font-size: 14px;
      opacity: 0.95;

      .address-icon {
        margin-right: 6px;
        font-size: 16px;
      }

      .address-text {
        flex: 1;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
    }
  }

  .map-widget-container-wrapper {
    position: relative;
    background: #f5f5f5;

    .map-widget-container {
      width: 100%;
      height: 100%;
    }

    .map-loading {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      height: 100%;
      background: #fafafa;

      .loading-spinner {
        width: 40px;
        height: 40px;
        border: 4px solid #e0e0e0;
        border-top-color: #667eea;
        border-radius: 50%;
        animation: spin 1s linear infinite;
      }

      .loading-text {
        margin-top: 16px;
        color: #666;
        font-size: 14px;
      }
    }

    .map-error {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      height: 100%;
      background: #fff5f5;

      .error-icon {
        font-size: 48px;
        margin-bottom: 16px;
      }

      .error-text {
        color: #f56c6c;
        font-size: 14px;
        text-align: center;
        padding: 0 20px;
      }
    }
  }

  .map-widget-footer {
    padding: 12px 20px;
    background: #fafafa;
    border-top: 1px solid #e8e8e8;

    .map-info {
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 12px;
      color: #666;

      .info-label {
        color: #999;
        margin-right: 4px;
      }

      .info-value {
        color: #333;
        font-weight: 500;
      }

      .info-separator {
        margin: 0 12px;
        color: #d9d9d9;
      }
    }
  }

  // 信息窗体样式
  .map-info-window {
    padding: 12px;
    min-width: 200px;

    .info-title {
      font-size: 14px;
      font-weight: 600;
      color: #333;
      margin-bottom: 8px;
    }

    .info-address {
      font-size: 12px;
      color: #666;
      line-height: 1.5;
    }
  }
}

// 加载动画
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

// 响应式适配
@media (max-width: 768px) {
  .map-widget-wrapper {
    .map-widget-header {
      padding: 12px 16px;

      .map-widget-title {
        font-size: 16px;
      }

      .map-widget-address {
        font-size: 12px;
      }
    }

    .map-widget-footer {
      padding: 10px 16px;

      .map-info {
        font-size: 11px;

        .info-separator {
          margin: 0 8px;
        }
      }
    }
  }
}

// 高德地图样式覆盖
.amap-logo,
.amap-copyright {
  display: none !important;
}

.amap-marker-label {
  border: none;
  background-color: transparent;
}
