.branches-container {
  min-height: 100vh;
  padding: 2rem 0;
}

.branches-card {
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.map-container {
  background: #f8fafc;
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

/* Iraq Map Styles */
.iraq-map-container {
  display: flex;
  -ms-flex-direction: column;
  flex-direction: column;
  align-items: center;
}

.iraq-map {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: 0.5rem;
  background: white;
  padding: 1rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.iraq-map svg {
  width: 100%;
  height: auto;
  border: none;
  background: transparent;
}

/* Map Path Styles */
.iraq-map path[data-name] {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

/* Active governorates (with branches) */
.iraq-map path[data-name].active {
  fill: rgba(34, 197, 94, 0.3) !important;
  stroke: #16a34a;
  stroke-width: 2;
  cursor: pointer;
  -webkit-filter: drop-shadow(0 2px 4px rgba(34, 197, 94, 0.2));
  filter: drop-shadow(0 2px 4px rgba(34, 197, 94, 0.2));
}

.iraq-map path[data-name].active:hover {
  fill: rgba(34, 197, 94, 0.5) !important;
  stroke: #15803d;
  stroke-width: 3;
  -webkit-filter: drop-shadow(0 4px 8px rgba(34, 197, 94, 0.3));
  filter: drop-shadow(0 4px 8px rgba(34, 197, 94, 0.3));
}

/* Inactive governorates */
.iraq-map path[data-name].inactive {
  fill: #e5e7eb !important;
  opacity: 0.4;
  pointer-events: none;
  cursor: not-allowed;
  stroke: #9ca3af;
  stroke-width: 1;
}

/* Selected governorate */
.iraq-map path[data-name].selected {
  fill: #3b82f6 !important;
  stroke: #1d4ed8;
  stroke-width: 3;
  -webkit-filter: drop-shadow(0 4px 12px rgba(59, 130, 246, 0.4));
  filter: drop-shadow(0 4px 12px rgba(59, 130, 246, 0.4));
  z-index: 10;
}

/* Hover effects for non-active, non-inactive paths */
.iraq-map path[data-name]:not(.inactive):not(.active):hover {
  fill: rgba(59, 130, 246, 0.4) !important;
  stroke: #3b82f6;
  stroke-width: 2;
  -webkit-filter: drop-shadow(0 2px 4px rgba(59, 130, 246, 0.2));
  filter: drop-shadow(0 2px 4px rgba(59, 130, 246, 0.2));
}

/* Map Legend */
.map-legend {
  margin-top: 1rem;
}

.legend-item {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  color: #6b7280;
}

.legend-color {
  width: 20px;
  height: 20px;
  border-radius: 0.25rem;
  border: 2px solid;
  flex-shrink: 0;
}

.legend-active {
  background: rgba(34, 197, 94, 0.3);
  border-color: #16a34a;
}

.legend-inactive {
  background: #e5e7eb;
  border-color: #9ca3af;
}

.legend-selected {
  background: #3b82f6;
  border-color: #1d4ed8;
}

/* Pulse animation for selected region */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
  }
}

/* Fade in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.3s ease-out;
}

/* Empty State Styles */
.empty-state {
  text-align: center;
  padding: 2rem 0;
}

.empty-state-icon {
  margin-bottom: 1rem;
}

.empty-state-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
}

.empty-state-subtitle {
  color: #6b7280;
  margin-bottom: 0.5rem;
}

/* Table Styles */
.table-vcenter td {
  vertical-align: middle;
}

/* View Map Button */
.view-map-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-block;
  border: none;
  font-size: 0.875rem;
}

.view-map-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(16, 185, 129, 0.4);
  color: white;
  text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
  .iraq-map {
    max-width: 100%;
    padding: 0.5rem;
  }

  .map-legend .row {
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }

  .legend-item {
    font-size: 0.8rem;
  }

  .table-responsive {
    font-size: 0.875rem;
  }
}

@media (max-width: 576px) {
  .card-body {
    padding: 1rem;
  }

  .table th,
  .table td {
    padding: 0.5rem;
  }
}
