/* ===== Map Container ===== */
.map-container {
  position: relative;
  width: 100%;
  height: calc(100vh - 56px);
  overflow: hidden;
}

#map {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* ===== Sidebar Layout ===== */
.sidebar {
  position: absolute;
  top: 0;
  height: 100%;
  width: 300px;
  background: white;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.providers-sidebar {
  left: 0;
  transform: translateX(-100%);
}

.sellers-sidebar {
  right: 0;
  transform: translateX(100%);
}

.sidebar.active {
  transform: translateX(0);
}

/* ===== Sidebar Components ===== */
.sidebar-toggle {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 40px;
  background: white;
  border-radius: 0 4px 4px 0;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
}

.providers-sidebar .sidebar-toggle {
  right: -20px;
  border-radius: 0 4px 4px 0;
}

.sellers-sidebar .sidebar-toggle {
  left: -20px;
  border-radius: 4px 0 0 4px;
}

.sidebar-toggle i {
  transition: transform 0.3s ease;
}

.sidebar:not(.active) .sidebar-toggle i {
  transform: rotate(180deg);
}

.sidebar-header {
  padding: 1rem;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 60px;
}

.search-box {
  padding: 1rem;
  border-bottom: 1px solid #eee;
}

/* ===== Record List ===== */
.record-list {
  list-style: none;
  padding: 0;
  margin: 0;
  overflow-y: auto;
  height: calc(100% - 120px);
  padding-right: 6px;
}

.record-list::-webkit-scrollbar {
  width: 6px;
}

.record-list::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.record-list::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 3px;
}

.record-list::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.record-item {
  padding: 1rem;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* ===== Provider-specific Styles ===== */
#providersList .record-item {
  border-right: 3px solid transparent;
}

#providersList .record-item.active,
#providersList .record-item.focused,
#providersList .record-item.related,
#providersList .record-item.hovered,
#providersList .record-item.hover {
  background-color: #fff5f5;
  border-right: 3px solid #dc3545;
}

/* ===== Seller-specific Styles ===== */
#sellersList .record-item {
  border-left: 3px solid transparent;
}

#sellersList .record-item.active,
#sellersList .record-item.focused,
#sellersList .record-item.related,
#sellersList .record-item.hovered,
#sellersList .record-item.hover {
  background-color: #f0f7ff;
  border-left: 3px solid #007bff;
}

/* ===== Info Window Styles ===== */
.info-window {
  padding: 8px 12px;
  max-width: 200px;
}

.gm-ui-hover-effect {
  border: none !important;
  padding: 0 !important;
  margin: 8px 8px 0 0 !important;
}

/* ===== Provider Keys Styles ===== */
.provider-keys-container {
  padding: 15px;
  background: #f8f9fa;
  border-radius: 4px;
  margin-top: 15px;
}

.provider-keys-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hub-section {
  margin-bottom: 20px;
  padding: 15px;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ===== Relationship Overlay ===== */
.overlay-control {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  width: 300px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  border-radius: 0.5rem;
  overflow: hidden;
  transition: opacity 0.3s ease;
  z-index: 1050;
}

.overlay-header {
  display: flex;
  align-items: center;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
}

.overlay-company-label {
  font-weight: bold;
  margin-right: 0.5rem;
  font-size: 0.9rem;
}

.overlay-content {
  padding: 0.75rem;
}

.overlay-control.minimized {
  opacity: 0.5;
  height: auto;
  width: 150px;
  cursor: pointer;
}
