/**
 * Norse Facilities Map - Elementor Widget Styles
 * Version: 1.1.0
 * Author: Nano Tasarım
 */

/* ==========================================================================
   Base Widget Layout
   ========================================================================== */

/* Ensure widget fills full width of Elementor Container */
.elementor-widget-norse_facilities_map {
  width: 100% !important;
  max-width: 100%;
  align-self: stretch;
}

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

.norse-facilities-map-widget {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  display: block;
}

.norse-facilities-map-widget *,
.norse-facilities-map-widget *::before,
.norse-facilities-map-widget *::after {
  box-sizing: inherit;
}

.norse-facilities-map__inner {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 30px;
  width: 100%;
  min-height: 520px;
}

/* ==========================================================================
   Left Column: Info Panel
   ========================================================================== */

.norse-facilities-map__panel {
  position: relative;
  flex: 0 0 38%;
  width: 38%;
  max-width: 100%;
  background: #0f172a;
  border-radius: 8px;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  color: #f8fafc;
  overflow: hidden;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.2);
  transition: background-color 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              color 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.4s ease,
              min-height 0.3s ease;
}

/* Top Action Bar (Back to Overview) */
.norse-facilities-map__panel-header {
  margin-bottom: 20px;
  min-height: 38px;
  display: flex;
  align-items: center;
}

.norse-facilities-map__back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--norse-back-bg, rgba(255, 255, 255, 0.1));
  color: var(--norse-back-color, #38bdf8);
  border: 1px solid var(--norse-back-border, rgba(56, 189, 248, 0.3));
  border-radius: 4px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s ease;
  line-height: 1.4;
  outline: none;
}

.norse-facilities-map__back-btn:hover,
.norse-facilities-map__back-btn:focus-visible {
  background: var(--norse-back-hover-bg, #0284c7);
  color: var(--norse-back-hover-color, #ffffff);
  border-color: var(--norse-back-hover-border, var(--norse-back-hover-bg, #0284c7));
  transform: translateX(-3px);
}

.norse-facilities-map__back-btn.is-hidden {
  display: none !important;
}

/* Panel Content Container with Animation States */
.norse-facilities-map__content {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  transition: opacity 0.35s ease, transform 0.35s ease;
  opacity: 1;
  transform: translate(0, 0);
}

/* Titles & Descriptions */
.norse-facilities-map__title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffffff;
  margin: 0 0 16px 0;
  line-height: 1.3;
}

.norse-facilities-map__desc {
  font-size: 15px;
  line-height: 1.6;
  color: #94a3b8;
  margin: 0 0 24px 0;
}

.norse-facilities-map__desc p:last-child {
  margin-bottom: 0;
}

/* Property Rows */
.norse-facilities-map__properties {
  list-style: none;
  margin: 0 0 28px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.norse-facilities-map__property-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
}

.norse-facilities-map__property-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
}

.norse-facilities-map__property-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #38bdf8;
  width: 24px;
  flex-shrink: 0;
}

.norse-facilities-map__property-icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.norse-facilities-map__property-label {
  font-size: 14px;
  color: #cbd5e1;
  font-weight: 500;
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}

.norse-facilities-map__property-value {
  font-size: 15px;
  color: #ffffff;
  font-weight: 700;
  text-align: right;
  flex-shrink: 0;
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: break-word;
  max-width: 48%;
}

/* Divider */
.norse-facilities-map__divider {
  height: 1px;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.1);
  border: none;
  margin: 0;
}

/* CTA Buttons */
.norse-facilities-map__cta-wrap {
  margin-top: auto;
  padding-top: 12px;
}

.norse-facilities-map__cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background-color: var(--norse-cta-bg, #0284c7);
  color: var(--norse-cta-color, #ffffff);
  padding: 12px 24px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s ease;
  line-height: 1.4;
}

.norse-facilities-map__cta-btn:hover,
.norse-facilities-map__cta-btn:focus-visible {
  background-color: var(--norse-cta-hover-bg, #0369a1);
  color: var(--norse-cta-hover-color, #ffffff);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
  transform: translateY(-2px);
}

.norse-facilities-map__cta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.norse-facilities-map__cta-icon svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* ==========================================================================
   Right Column: Map & Pins
   ========================================================================== */

.norse-facilities-map__map-wrap {
  position: relative;
  flex: 1 1 0%;
  min-width: 0;
  width: auto;
  border-radius: 8px;
  overflow: hidden;
  background-color: #0c1e33;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.2);
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.norse-facilities-map__map-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  user-select: none;
  display: flex;
}

/* Aspect Ratio Handling */
.norse-facilities-map__map-ratio--1-1 { aspect-ratio: 1 / 1; }
.norse-facilities-map__map-ratio--4-3 { aspect-ratio: 4 / 3; }
.norse-facilities-map__map-ratio--16-9 { aspect-ratio: 16 / 9; }
.norse-facilities-map__map-ratio--3-2 { aspect-ratio: 3 / 2; }
.norse-facilities-map__map-ratio--auto {
  aspect-ratio: auto;
  height: 100%;
  min-height: 100%;
}

.norse-facilities-map-widget .norse-facilities-map__image,
.norse-facilities-map__image {
  width: 100%;
  height: 100% !important;
  max-width: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}

.norse-facilities-map__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  transition: background-color 0.3s ease;
}

/* Pins Layer */
.norse-facilities-map__pins {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none; /* Pins themselves re-enable pointer-events */
}

/* Pin Element */
.norse-facilities-map__pin {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: pointer;
  border: 2px solid #ffffff;
  background-color: #0284c7;
  color: #ffffff;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.25s ease, box-shadow 0.25s ease;
  z-index: 11;
  outline: none;
}

/* Minimum touch target accessibility invisible padding */
.norse-facilities-map__pin::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 48px;
  height: 48px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}

.norse-facilities-map__pin-label {
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

.norse-facilities-map__pin-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.norse-facilities-map__pin-icon svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* Hover & Active Pin States */
.norse-facilities-map__pin:hover,
.norse-facilities-map__pin:focus-visible {
  transform: translate(-50%, -50%) scale(1.18);
  background-color: #38bdf8;
  color: #0f172a;
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.6);
  z-index: 15;
}

.norse-facilities-map__pin.is-active {
  transform: translate(-50%, -50%) scale(1.25);
  background-color: #f59e0b;
  color: #0f172a;
  border-color: #ffffff;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.35), 0 8px 20px rgba(0, 0, 0, 0.45);
  z-index: 20;
}

/* Pulse Animation Ring */
.norse-facilities-map__pin-pulse {
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  border: 2px solid currentColor;
  opacity: 0;
  pointer-events: none;
  animation: norsePinPulse 2.4s cubic-bezier(0.25, 1, 0.5, 1) infinite;
}

.norse-facilities-map__pin.is-active .norse-facilities-map__pin-pulse {
  animation: none;
  display: none;
}

@keyframes norsePinPulse {
  0% {
    transform: scale(0.9);
    opacity: 0.8;
  }
  70% {
    transform: scale(1.9);
    opacity: 0;
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

/* ==========================================================================
   Panel Transition Animations
   ========================================================================== */

/* Fade */
.norse-facilities-map-widget[data-anim-type="fade"] .norse-facilities-map__content.is-exiting {
  opacity: 0;
}
.norse-facilities-map-widget[data-anim-type="fade"] .norse-facilities-map__content.is-entering {
  opacity: 0;
}

/* Slide Left */
.norse-facilities-map-widget[data-anim-type="slide-left"] .norse-facilities-map__content.is-exiting {
  opacity: 0;
  transform: translateX(-24px);
}
.norse-facilities-map-widget[data-anim-type="slide-left"] .norse-facilities-map__content.is-entering {
  opacity: 0;
  transform: translateX(24px);
}

/* Slide Up */
.norse-facilities-map-widget[data-anim-type="slide-up"] .norse-facilities-map__content.is-exiting {
  opacity: 0;
  transform: translateY(-20px);
}
.norse-facilities-map-widget[data-anim-type="slide-up"] .norse-facilities-map__content.is-entering {
  opacity: 0;
  transform: translateY(20px);
}

/* Fade & Slide (Default) */
.norse-facilities-map-widget[data-anim-type="fade-slide"] .norse-facilities-map__content.is-exiting {
  opacity: 0;
  transform: translateY(-12px);
}
.norse-facilities-map-widget[data-anim-type="fade-slide"] .norse-facilities-map__content.is-entering {
  opacity: 0;
  transform: translateY(12px);
}

/* ==========================================================================
   SSR / SEO Hidden Data Containers
   ========================================================================== */

.norse-facilities-map__ssr-data {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  width: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

/* Tablet & Mobile Stack */
@media (max-width: 1024px) {
  .norse-facilities-map__inner {
    flex-direction: column;
    gap: 24px;
    min-height: auto;
  }

  .norse-facilities-map__panel,
  .norse-facilities-map__map-wrap {
    flex: 0 0 100%;
    width: 100%;
  }

  .norse-facilities-map__map-container {
    min-height: 400px;
  }
}

@media (max-width: 767px) {
  .norse-facilities-map__panel {
    padding: 24px 20px;
  }

  .norse-facilities-map__title {
    font-size: 20px;
  }

  .norse-facilities-map__property-item {
    gap: 10px;
  }

  .norse-facilities-map__property-label,
  .norse-facilities-map__property-value {
    font-size: 13px;
  }

  .norse-facilities-map__map-container {
    min-height: 320px;
  }

  .norse-facilities-map__pin {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
  }

  .norse-facilities-map__pin-label {
    font-size: 12px;
  }
}
