/* =========================================================
   MAKS Marina – havnekort, in the MAKS Marina theme's design (colours, type, rounded cards)
   Everything is scoped to .mmk, so the page's theme is not touched.
   ========================================================= */

.mmk {
  --mmk-blue: #0069b4;
  --mmk-blue2: #004b83;
  --mmk-navy: #071b32;
  --mmk-cyan: #18a0df;
  --mmk-bg: #f4f8fb;
  --mmk-text: #172536;
  --mmk-muted: #64748b;
  --mmk-line: #dbe7ef;
  position: relative;
  max-width: 1240px;
  margin: 0 auto 24px;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--mmk-line);
  border-radius: 24px;
  box-shadow: 0 18px 55px rgba(15, 23, 42, .08);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--mmk-text);
  font-size: 15px;
  line-height: 1.5;
  box-sizing: border-box;
}

.mmk *, .mmk *::before, .mmk *::after { box-sizing: border-box; }

.mmk-loading { padding: 40px; text-align: center; color: var(--mmk-muted); }

/* ---------------------------------------------------------- the title and the legend */

.mmk-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.mmk-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: .15em;
  font-weight: 900;
  font-size: 12px;
  color: var(--mmk-blue);
}

.mmk-eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }

.mmk .mmk-title {
  margin: 8px 0 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.05;
  letter-spacing: -.04em;
  font-weight: 900;
  color: var(--mmk-text);
}

.mmk .mmk-desc { margin: 8px 0 0; color: var(--mmk-muted); max-width: 640px; }

.mmk-legend { display: flex; gap: 8px; flex-wrap: wrap; }

.mmk-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--mmk-line);
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
}

.mmk-chip i { width: 11px; height: 11px; border-radius: 50%; box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(15, 23, 42, .08); }
.mmk-chip b { color: var(--mmk-text); font-weight: 900; }

/* ---------------------------------------------------------- the toolbar */

.mmk-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.mmk-tabs { display: flex; gap: 6px; flex-wrap: wrap; padding: 4px; border-radius: 14px; background: var(--mmk-bg); }

.mmk .mmk-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #334155;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.mmk .mmk-tab:hover { background: #fff; }
.mmk .mmk-tab.is-active { background: #fff; color: var(--mmk-blue2); box-shadow: 0 4px 14px rgba(15, 23, 42, .08); }
.mmk-tab-count { padding: 1px 8px; border-radius: 999px; background: rgba(34, 160, 107, .12); color: #157a52; font-size: 12px; font-weight: 800; }

.mmk-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-left: auto; }

.mmk .mmk-search {
  width: 210px;
  padding: 10px 14px;
  border: 1px solid var(--mmk-line);
  border-radius: 12px;
  background: #fff;
  color: var(--mmk-text);
  font: inherit;
  font-size: 14px;
}

.mmk .mmk-search:focus { outline: none; border-color: var(--mmk-cyan); box-shadow: 0 0 0 4px rgba(24, 160, 223, .15); }
.mmk .mmk-search.is-missing { border-color: #e5484d; box-shadow: 0 0 0 4px rgba(229, 72, 77, .15); }

.mmk-free { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: #334155; cursor: pointer; user-select: none; }
.mmk-free input { width: 18px; height: 18px; margin: 0; accent-color: var(--mmk-blue); }

.mmk-zoom { display: inline-flex; border: 1px solid var(--mmk-line); border-radius: 12px; overflow: hidden; }

.mmk .mmk-btn {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 0;
  border-right: 1px solid var(--mmk-line);
  background: #fff;
  color: var(--mmk-blue2);
  font: inherit;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.mmk .mmk-btn:last-child { border-right: 0; }
.mmk .mmk-btn:hover { background: #f6fbff; }
.mmk .mmk-btn-text { font-size: 14px; }

/* ---------------------------------------------------------- the map */

.mmk-stage {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--mmk-line);
  border-radius: 18px;
  background: radial-gradient(circle at 30% 20%, #eef6fc, #e3eef7);
  touch-action: none;
}

.mmk-canvas { position: absolute; inset: 0; }
.mmk-canvas > div { outline: none; }

.mmk-hint {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(7, 27, 50, .72);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  pointer-events: none;
  transition: opacity .4s;
}

.mmk-hint.is-hidden { opacity: 0; }

.mmk-message {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--mmk-muted);
  font-weight: 600;
  text-align: center;
  background: rgba(244, 248, 251, .85);
}

.mmk-message[hidden] { display: none; }

/* the berth's card */
.mmk-card {
  position: absolute;
  top: 14px;
  right: 14px;
  width: min(280px, calc(100% - 28px));
  padding: 18px 18px 16px;
  border: 1px solid var(--mmk-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(7, 27, 50, .2);
}

.mmk-card[hidden] { display: none; }

.mmk .mmk-card-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: var(--mmk-bg);
  color: var(--mmk-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.mmk .mmk-card-close:hover { background: #e4f5ff; color: var(--mmk-blue2); }

.mmk-card-label { text-transform: uppercase; letter-spacing: .15em; font-weight: 900; font-size: 11px; color: var(--mmk-blue); }
.mmk-card-title { margin: 2px 0 8px; font-size: 28px; font-weight: 900; letter-spacing: -.04em; color: var(--mmk-text); }

.mmk-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--c) 14%, #fff);
  color: color-mix(in srgb, var(--c) 75%, #000);
  font-size: 13px;
  font-weight: 800;
}

.mmk-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }

.mmk-card dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 14px 0 0; }
.mmk-card dt { color: var(--mmk-muted); font-size: 14px; }
.mmk-card dd { margin: 0; font-weight: 700; text-align: right; }
.mmk-card-note { margin: 14px 0 0; padding: 10px 12px; border-radius: 12px; background: #eaf6ff; color: #24506e; font-size: 13px; }

.mmk-foot { margin-top: 10px; color: var(--mmk-muted); font-size: 13px; }

/* ---------------------------------------------------------- phones */

@media (max-width: 640px) {
  .mmk { padding: 16px; border-radius: 18px; }
  .mmk-tools { width: 100%; margin-left: 0; }
  .mmk .mmk-search { flex: 1 1 140px; width: auto; }
  .mmk-card { top: auto; bottom: 12px; right: 12px; left: 12px; width: auto; }
  .mmk-hint { display: none; }
}
