/**
 * EGR Contact Map Component Styles
 */

/* Base styles */
.egr-contact-map {
  margin: 2rem 0;
}

/* Map container */
.egr-contact-map__map-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  background-color: #f5f5f5;
}

.egr-contact-map__map,
.egr-contact-map__map-container iframe {
  width: 100%;
  height: 100%;
}

/* Contact info section */
.egr-contact-map__info {
  padding: 2rem;
  background-color: #18453b; /* MSU primary green */
  color: #ffffff;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.egr-contact-map__title {
  font-size: 2rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 2rem;
  position: relative;
}

.egr-contact-map__title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 60px;
  height: 4px;
  background-color: #00c24e;
}

/* Contact details */
.egr-contact-map__details {
  flex: 1;
}

.egr-contact-map__item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

.egr-contact-map__item i {
  font-size: 1.25rem;
  color: #00c24e;
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.egr-contact-map__item strong {
  color: #ffffff;
  font-weight: 600;
  display: block;
  margin-bottom: 0.25rem;
}

.egr-contact-map__item a {
  color: #00c24e;
  text-decoration: none;
}

.egr-contact-map__item a:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* Additional info section */
.egr-contact-map__additional {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* Layout variations */
/* Edge to edge */
.egr-contact-map-edge-to-edge {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

/* Stacked layouts */
.egr-contact-map--top .egr-contact-map__map-container,
.egr-contact-map--bottom .egr-contact-map__map-container {
  margin-bottom: 2rem;
}

.egr-contact-map--bottom .egr-contact-map__map-container {
  margin-bottom: 0;
  margin-top: 2rem;
}

.egr-contact-map--top .egr-contact-map__info,
.egr-contact-map--bottom .egr-contact-map__info {
  max-width: 800px;
  margin: 0 auto;
}

/* Side-by-side specific styles */
.egr-contact-map--left .egr-contact-map__info,
.egr-contact-map--right .egr-contact-map__info {
  border: 1px solid #18453b;
}

/* Box shadow for map */
.egr-contact-map__map-container {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Loading state */
.egr-contact-map__map.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f5f5f5;
}

.egr-contact-map__map.loading::before {
  content: 'Loading map...';
  color: #495057; /* Changed from #666 to meet WCAG AA contrast */
  font-size: 1rem;
}

/* Error state */
.egr-contact-map__map.error {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #fee;
  color: #c00;
  padding: 2rem;
  text-align: center;
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .egr-contact-map--left .col-12,
  .egr-contact-map--right .col-12 {
    margin-bottom: 2rem;
  }
  
  .egr-contact-map--left .col-12:last-child,
  .egr-contact-map--right .col-12:last-child {
    margin-bottom: 0;
  }
  
  .egr-contact-map__map-container {
    min-height: 300px !important;
  }
}

@media (max-width: 767px) {
  .egr-contact-map__info {
    padding: 1.5rem;
  }
  
  .egr-contact-map__title {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
  }
  
  .egr-contact-map__item {
    margin-bottom: 1.25rem;
  }
  
  .egr-contact-map__item i {
    font-size: 1.125rem;
  }
}

/* Dark mode support - keeping the same primary green */
@media (prefers-color-scheme: dark) {
  .egr-contact-map__info {
    background-color: #18453b;
    color: #ffffff;
  }
  
  .egr-contact-map__title {
    color: #ffffff;
  }
  
  .egr-contact-map__item strong {
    color: #ffffff;
  }
  
  .egr-contact-map__additional {
    border-top-color: rgba(255, 255, 255, 0.2);
  }
  
  .egr-contact-map--left .egr-contact-map__info,
  .egr-contact-map--right .egr-contact-map__info {
    border-color: #18453b;
  }
}