/* Interactive map. Cabin facts come from the site's existing data. */
.fd-map-launcher[hidden], .fd-map-dialog [hidden], .fd-map-photos [hidden] { display: none !important; }
.fd-map-launcher { display: flex; padding: 2px 16px 4px; }
#fd-map-open {
  min-height: 40px; padding: 8px 16px; border: 1px solid rgba(25,167,183,.4);
  border-radius: 12px; background: rgba(25,167,183,.08); color: #91dce4;
  font: 600 14px/1.4 'Tajawal', sans-serif; cursor: pointer;
}
#fd-map-open:hover { background: rgba(25,167,183,.16); }
.fd-map-dialog {
  position: fixed; inset: 0; margin: auto; padding: 0;
  width: min(calc(100vw - 32px), 1120px); max-width: none;
  height: min(calc(100vh - 32px), 780px);
  height: min(calc(100dvh - 32px), 780px);
  max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
  border: 1px solid #234655; border-radius: 20px;
  background: #081c2a; color: #fff; overflow: hidden; overscroll-behavior: contain;
  font-family: 'Tajawal', sans-serif; direction: rtl; box-sizing: border-box;
  box-shadow: 0 20px 70px rgba(0,0,0,.3);
}
.fd-map-dialog[open] { display: flex; flex-direction: column; }
.fd-map-dialog::backdrop { background: rgba(2,10,18,.8); }
.fd-map-dialog button { font-family: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.fd-map-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 20px 14px; flex: none; border-bottom: 1px solid #234655; }
.fd-map-header h2 { margin: 0; color: #fff; font-size: 21px; font-weight: 700; line-height: 1.4; }
.fd-map-header p { margin: 2px 0 0; color: #a9c3cd; font-size: 12px; line-height: 1.5; }
.fd-map-close { flex: none; width: 40px; height: 40px; display: grid; place-items: center; background: #142e3c; color: #e0eff3; border: 1px solid #2a4655; border-radius: 50%; }
.fd-map-close svg, .fd-map-clear svg { width: 17px; height: 17px; }
.fd-map-workspace { display: flex; flex: 1; min-height: 0; flex-direction: column; direction: ltr; }
.fd-map-viewport {
  flex: 1; min-height: 280px; position: relative; overflow: hidden;
  background: #dfe6e8; direction: ltr; touch-action: none; user-select: none; -webkit-user-select: none;
}
.fd-map-viewport.is-zoomed { cursor: grab; }
.fd-map-viewport.is-dragging { cursor: grabbing; }
.fd-map-plane { position: absolute; inset: 0 auto auto 0; transform-origin: 0 0; will-change: transform; }
.fd-map-image { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; -webkit-user-drag: none; }
.fd-map-highlight {
  position: absolute; transform: translate(-50%, -50%); width: 10.4%; aspect-ratio: 1;
  border: 2px solid #128b99; border-radius: 50%; box-sizing: border-box;
  background: rgba(25,167,183,.07); pointer-events: none;
}
.fd-map-footprint-wrap { position: absolute; inset: 0; pointer-events: none; }
.fd-map-footprint { display: block; width: 100%; height: 100%; overflow: visible; }
.fd-map-footprint polygon { fill: rgba(25,167,183,.12); stroke: #128b99; stroke-width: 2; stroke-linejoin: round; }
.fd-map-footprint-wrap.is-connected polygon { fill: rgba(25,167,183,.04); stroke: #366c77; stroke-dasharray: 4 3; }
.fd-map-leader { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.fd-map-leader polyline { fill: none; stroke: #637b83; stroke-width: 1; stroke-linejoin: round; }
.fd-map-hotspot {
  position: absolute; width: 44px; height: 44px; padding: 0;
  transform: translate(-50%, -50%) scale(var(--fd-map-inverse, 1));
  border: 0; border-radius: 50%; background: transparent; color: #183544; z-index: 2;
  touch-action: none;
}
.fd-map-hotspot::before { content: ''; display: block; width: 7px; height: 7px; margin: auto; border: 2px solid #fff; border-radius: 50%; background: #187f89; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.fd-map-hotspot span {
  position: absolute; left: calc(100% + 4px); top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; white-space: nowrap; width: max-content;
  min-height: 21px; box-sizing: border-box; padding: 2px 5px;
  border: 1px solid rgba(24,53,68,.18); border-radius: 3px;
  background: rgba(255,255,255,.94); color: #183544; direction: rtl;
  font-size: 11.5px; font-weight: 700; line-height: 1.3;
}
.fd-map-hotspot span::before { content: ''; position: absolute; right: 100%; top: 50%; width: 11px; height: 1px; background: #637b83; pointer-events: none; }
.fd-map-hotspot--label-left span {
  left: auto; right: calc(50% + var(--fd-map-label-offset, 32px));
}
.fd-map-hotspot--label-right span {
  left: calc(50% + var(--fd-map-label-offset, 32px)); right: auto;
}
.fd-map-hotspot--label-right span::before {
  left: auto; right: 100%; width: calc(var(--fd-map-label-offset, 32px) - 5px);
}
.fd-map-hotspot--label-left span::before {
  right: auto; left: 100%; width: calc(var(--fd-map-label-offset, 32px) - 5px);
}
.fd-map-hotspot--label-bottom span, .fd-map-hotspot--label-offset span {
  left: calc(50% + var(--fd-map-label-x, 0px)); right: auto;
  top: calc(50% + var(--fd-map-label-y, 0px)); transform: translate(-50%, -50%);
  text-align: center;
}
.fd-map-hotspot--label-bottom span::before, .fd-map-hotspot--label-offset span::before { display: none; }
.fd-map-hotspot[aria-pressed="true"] { z-index: 3; }
.fd-map-hotspot[aria-pressed="true"] span { background: #0e6470; border-color: #0e6470; color: #fff; }
.fd-map-hotspot[aria-pressed="true"] span::before { background: #0e6470; }
.fd-map-hotspot[aria-pressed="true"]::before { background: #0e6470; }
.fd-map-panel { display: flex; flex: none; flex-direction: column; max-height: min(43vh, 360px); max-height: min(43dvh, 360px); min-width: 0; overflow: hidden; direction: rtl; background: #081c2a; border-top: 1px solid #234655; }
.fd-map-toolbar { display: flex; align-items: center; justify-content: flex-start; gap: 8px; padding: 9px 16px; background: #102936; border-bottom: 1px solid #24404d; flex: none; }
.fd-map-tool { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; min-width: 38px; padding: 0 9px; border: 1px solid #365362; border-radius: 9px; background: #183542; color: #e6f1f5; font-size: 12px; font-weight: 600; touch-action: manipulation; }
.fd-map-tool svg { width: 17px; height: 17px; }
.fd-map-toolbar .fd-map-fit { flex: none; white-space: nowrap; }
.fd-map-info { flex: 1; min-height: 0; padding: 16px; overflow-y: auto; box-sizing: border-box; background: #081c2a; text-align: right; }
.fd-map-empty { min-height: 72px; display: flex; align-items: center; justify-content: center; color: #b9cfd8; font-size: 14px; line-height: 1.6; text-align: center; }
.fd-map-empty p { margin: 0; }
.fd-map-card:not([hidden]) { display: flex; flex-direction: column; min-height: 100%; }
.fd-map-card-photo { position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 0; overflow: hidden; box-sizing: border-box; border: 1px solid #234655; border-radius: 12px; background: #102936; cursor: zoom-in; }
.fd-map-card-photo:hover { border-color: #59b8c3; }
.fd-map-photo-label { position: absolute; inset: auto 5px 5px; border-radius: 5px; padding: 3px 4px; background: rgba(3,18,29,.78); color: #fff; font-size: 11px; font-weight: 600; line-height: 1.3; text-align: center; white-space: nowrap; pointer-events: none; }
.fd-map-card-photo img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .18s ease; }
.fd-map-card-photo img.is-ready { opacity: 1; }
.fd-map-card-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.fd-map-card h3 { margin: 0; color: #fff; font-size: 21px; line-height: 1.4; font-weight: 700; }
.fd-map-card.is-classic h3 { font-size: 19px; }
.fd-map-clear { display: grid; place-items: center; flex: none; width: 32px; height: 32px; padding: 0; background: transparent; border: 1px solid #2b4655; border-radius: 50%; color: #a9c3cd; }
.fd-map-description { margin: 5px 0 0; color: #b0c9d1; font-size: 13px; line-height: 1.65; }
.fd-map-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 16px 0 12px; }
.fd-map-fact { min-width: 0; min-height: 62px; display: flex; flex-direction: column; justify-content: center; gap: 3px; padding: 10px 12px; box-sizing: border-box; border: 1px solid #285160; border-radius: 10px; background: #102f3e; }
.fd-map-fact-label { color: #7ecfea; font-size: 11px; font-weight: 600; line-height: 1.4; }
.fd-map-fact strong { color: #fff; font-size: 14px; font-weight: 700; line-height: 1.45; }
.fd-map-amenities { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.fd-map-amenity { margin: 0; padding: 6px 10px; border: 1px solid #285b67; border-radius: 8px; color: #9adce3; background: #10323f; font-size: 12px; font-weight: 600; line-height: 1.5; }
.fd-map-details-button { width: 100%; min-height: 46px; margin-top: auto; padding: 10px 14px; border: 1px solid #27b5c5; border-radius: 11px; background: #19a7b7; color: #fff; font-size: 14px; font-weight: 700; line-height: 1.4; touch-action: manipulation; }
.fd-map-details-button:hover { background: #168f9e; border-color: #35c1d0; }
.fd-map-connection { flex: 1; min-width: 0; margin: 0; padding-inline-start: 4px; color: #d5e9ee; text-align: right; font-size: 12px; line-height: 1.65; }
.fd-map-error { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 12px; background: #102936; padding: 20px; text-align: center; color: #daeaf0; font-size: 14px; }
.fd-map-error p { margin: 0; }
.fd-map-dialog button:focus-visible, .fd-map-viewport:focus-visible, #fd-map-open:focus-visible { outline: 3px solid #54cad8; outline-offset: 3px; }

@media (max-width: 819px) {
  .fd-map-dialog {
    width: 100vw; height: 100vh; height: 100dvh; max-height: none;
    border: 0; border-radius: 0;
  }
  .fd-map-header { padding-top: max(13px, env(safe-area-inset-top)); }
  .fd-map-info { padding-bottom: max(16px, env(safe-area-inset-bottom)); }
}

@media (min-width: 820px) {
  .fd-map-workspace { display: grid; grid-template-columns: minmax(330px, 36%) minmax(0, 1fr); grid-template-areas: "panel map"; }
  .fd-map-viewport { grid-area: map; min-height: 0; }
  .fd-map-panel { grid-area: panel; max-height: none; border-top: 0; border-right: 1px solid #234655; }
  .fd-map-info { padding: 24px; }
  .fd-map-empty { min-height: 100%; font-size: 15px; }
  .fd-map-card h3 { font-size: 24px; }
  .fd-map-card.is-classic h3 { font-size: 21px; }
  .fd-map-description { font-size: 14px; }
  .fd-map-hotspot { width: 34px; height: 34px; }
  .fd-map-hotspot span { min-height: 19px; padding: 1px 4px; font-size: 10.5px; }
}
.fd-map-photos { position: fixed; inset: 0; margin: auto; padding: 0; width: min(calc(100vw - 32px), 1080px); height: min(calc(100vh - 32px), 920px); height: min(calc(100dvh - 32px), 920px); max-width: none; max-height: none; box-sizing: border-box; border: 1px solid #234655; border-radius: 18px; background: #05121e; color: #fff; overflow: hidden; overscroll-behavior: contain; font-family: 'Tajawal', sans-serif; direction: rtl; }
.fd-map-photos[open] { display: flex; flex-direction: column; }
.fd-map-photos::backdrop { background: rgba(2,10,18,.96); }
.fd-map-photos button { display: grid; place-items: center; flex: none; min-width: 44px; min-height: 44px; padding: 9px; border: 1px solid #304b59; border-radius: 50%; background: #142e3c; color: #e0eff3; font-family: inherit; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.fd-map-photos button svg { width: 22px; height: 22px; }
.fd-map-photos button:focus-visible { outline: 3px solid #54cad8; outline-offset: 3px; }
.fd-map-photo-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: max(14px, env(safe-area-inset-top)) 18px 14px; flex: none; }
.fd-map-photo-header h2 { margin: 0; font-size: 18px; line-height: 1.5; font-weight: 700; }
.fd-map-photo-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; touch-action: pan-y pinch-zoom; user-select: none; -webkit-user-select: none; cursor: grab; }
.fd-map-photo-stage:active { cursor: grabbing; }
.fd-map-photo-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .15s ease; -webkit-user-drag: none; }
.fd-map-photo-image.is-ready { opacity: 1; }
.fd-map-photo-error { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: #c4d9e2; text-align: center; }
.fd-map-photo-error p { margin: 0; }
.fd-map-photo-error .fd-map-photo-retry { border-radius: 10px; padding: 9px 16px; font-size: 14px; }
.fd-map-photo-footer { display: flex; align-items: center; justify-content: center; gap: 30px; flex: none; padding: 14px 18px max(18px, env(safe-area-inset-bottom)); direction: ltr; }
.fd-map-photo-position { min-width: 135px; text-align: center; direction: rtl; }
.fd-map-photo-counter { margin: 0; color: #fff; font-size: 15px; line-height: 1.5; }
.fd-map-photo-hint { margin: 4px 0 0; color: #a9c3cd; font-size: 12px; line-height: 1.5; }
@media (max-width: 600px) {
  .fd-map-photos { width: 100vw; height: 100vh; height: 100dvh; border: 0; border-radius: 0; }
  .fd-map-photo-header { padding-inline: 14px; }
  .fd-map-photo-footer { gap: 24px; }
}
@media (max-width: 380px) {
  .fd-map-header { padding: 12px; }
  .fd-map-header h2 { font-size: 18px; }
  .fd-map-header p { font-size: 11px; }
  .fd-map-info { padding: 12px; }
  .fd-map-facts { gap: 6px; }
  .fd-map-fact { padding-inline: 9px; }
  .fd-map-fact strong { font-size: 13px; }
  .fd-map-toolbar { padding: 7px 10px; }
}
@media (min-width: 600px) {
  .fd-map-hotspot span { font-size: 10.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .fd-map-card-photo img, .fd-map-photo-image { transition: none; }
}
