/*!
 * Copyright (c) 2026 Tekantis Limited. All rights reserved.
 * Icon Map (https://www.icon-map.com) is a trademark of Tekantis Limited.
 * Proprietary and confidential. This file and the methods in it are not licensed for copying, modification,
 * reuse or redistribution, in whole or in part, without written permission from Tekantis Limited.
 */
/* Maritime and Ports page: the live Port of Helsinki twin, the chokepoint globe, the voyage planner and the fleet. */

.sol-hero--maritime { background: #07101d; }
.mar-ops .pp-mapframe { position: relative; }
.pp .mar-ops .pp-mapframe { height: 700px; min-height: 0; }
.mar-panel { height: 700px; overflow: auto; overscroll-behavior: contain; gap: 10px; }
.pp .mar-ops--globe .pp-mapframe, .mar-ops--globe .mar-panel { height: 640px; }
.pp .mar-ops--voyage .pp-mapframe, .mar-ops--voyage .mar-panel,
.pp .mar-ops--fleet .pp-mapframe, .mar-ops--fleet .mar-panel { height: clamp(460px, 62vh, 600px); }
.mar-ops--globe .pp-mapframe { background: #050a14; }

.mar-bar { position: absolute; left: 12px; top: 12px; z-index: 3; display: flex; align-items: center; gap: 14px; max-width: calc(100% - 24px); padding: 8px 12px; border-radius: 12px; background: rgba(7, 14, 26, 0.78); backdrop-filter: blur(8px); color: rgba(255, 255, 255, 0.78); font: 500 12px/1.2 var(--pp-font); }
.mar-bar b { color: #fff; font-weight: 800; font-variant-numeric: tabular-nums; }
.mar-status { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; color: #fff; white-space: nowrap; }
.mar-status i { width: 8px; height: 8px; border-radius: 50%; background: #64748b; }
.mar-status.is-live i { background: #34d399; box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6); animation: mar-pulse 1.8s infinite; }
.mar-status.is-replay i { background: #fbbf24; }
.mar-status.is-stale i { background: #f97316; }
@keyframes mar-pulse { 0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6); } 70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
@media (prefers-reduced-motion: reduce) { .mar-status.is-live i { animation: none; } }

.mar-views { position: absolute; left: 12px; bottom: 30px; z-index: 3; display: flex; flex-wrap: wrap; gap: 6px; max-width: calc(100% - 80px); }
.mar-views button { padding: 6px 10px; border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 999px; background: rgba(7, 14, 26, 0.72); backdrop-filter: blur(8px); color: #fff; font: 600 12px/1.2 var(--pp-font); cursor: pointer; }
.mar-views button:hover { background: rgba(56, 189, 248, 0.3); border-color: #38bdf8; }

.mar-tabs { display: flex; gap: 4px; padding: 3px; border-radius: 10px; background: var(--pp-off); }
.mar-tabs button { flex: 1; padding: 7px 8px; border: 0; border-radius: 8px; background: transparent; color: var(--pp-sub); font: 700 12px/1.2 var(--pp-font); cursor: pointer; }
.mar-tabs button[aria-selected="true"] { background: #fff; color: var(--pp-text); box-shadow: 0 1px 4px rgba(7, 17, 46, 0.12); }
.mar-page { display: flex; flex-direction: column; gap: 10px; }
.mar-page[hidden] { display: none; }
.mar-chart svg { display: block; width: 100%; height: auto; }
.mar-axis { display: flex; justify-content: space-between; font-size: 10px; color: var(--pp-sub); }
.mar-key { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: -4px; }
.mar-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; vertical-align: -1px; }
.mar-dot--ring { background: transparent; border: 1.5px dashed #64748b; width: 8px; height: 8px; }
.mar-week { font-size: 12px; color: var(--pp-sub); font-variant-numeric: tabular-nums; }

.mar-types li { padding: 3px 8px; }
.mar-types label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.mar-types input { width: 14px; height: 14px; margin: 0; accent-color: var(--pp-blue); }
.mar-types i { margin-right: 2px; }

.mar-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.mar-list button { width: 100%; display: flex; align-items: center; gap: 8px; text-align: left; padding: 6px 8px; border: 1px solid var(--pp-border); border-radius: 8px; background: #fff; color: var(--pp-text); font: 12px/1.3 var(--pp-font); cursor: pointer; }
.mar-list button:hover, .mar-list button[aria-pressed="true"] { border-color: var(--pp-blue); }
.mar-list button[aria-pressed="true"] { background: #f0f7ff; }
.mar-list button b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mar-list small { color: var(--pp-sub); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mar-list .is-empty { font-size: 12px; color: var(--pp-sub); padding: 4px 2px; }
.mar-list .mar-when { min-width: 40px; font-weight: 800; font-variant-numeric: tabular-nums; }
.mar-list .mar-up { color: #059669; }
.mar-list .mar-down { color: #dc2626; }
.mar-chip { display: inline-block; min-width: 26px; padding: 2px 6px; border-radius: 6px; color: #0b1220; font: 800 11px/1.2 var(--pp-font); text-align: center; white-space: nowrap; }
.mar-spark { flex: 0 0 64px; height: 18px; }
.mar-spark svg { display: block; width: 64px; height: 18px; }

/* ship card on the map */
.mar-card { position: absolute; left: 0; top: 0; z-index: 4; display: grid; gap: 6px; width: 260px; padding: 10px 12px; border-radius: 12px; background: rgba(7, 14, 26, 0.86); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.18); color: #fff; font: 12px/1.4 var(--pp-font); translate: -50% calc(-100% - 16px); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4); pointer-events: auto; }
.mar-card__body { display: grid; gap: 2px; }
.mar-card__head { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.mar-card__head b { font-size: 14px; }
.mar-card span { color: rgba(255, 255, 255, 0.85); }
.mar-card small { color: rgba(255, 255, 255, 0.6); }
.mar-card__actions { display: flex; gap: 6px; }
.mar-card__actions button { padding: 5px 10px; border: 0; border-radius: 7px; background: #38bdf8; color: #0b1220; font: 700 12px/1.2 var(--pp-font); cursor: pointer; }
.mar-card__actions [data-mar-close], .mar-card__actions [data-fleet-close] { margin-left: auto; background: rgba(255, 255, 255, 0.14); color: #fff; }

/* the berth plan */
.mar-areas { flex-wrap: wrap; }
.mar-gantt { display: grid; gap: 3px; font: 11px/1.2 var(--pp-font); }
.mar-gantt__axis { position: relative; height: 14px; margin-left: 58px; color: var(--pp-sub); font-size: 10px; }
.mar-gantt__axis span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; font-variant-numeric: tabular-nums; }
.mar-gantt__row { display: flex; align-items: center; gap: 6px; }
.mar-gantt__row > b { flex: 0 0 52px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--pp-sub); font-weight: 700; }
.mar-gantt__lane { position: relative; flex: 1; height: 20px; border-radius: 5px; background: var(--pp-off); overflow: hidden; }
.mar-gantt__bar { position: absolute; top: 2px; bottom: 2px; min-width: 3px; padding: 0 5px; border: 0; border-radius: 4px; color: #0b1220; font: 700 10px/16px var(--pp-font); text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.mar-gantt__bar.is-plan { background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.55) 0 4px, transparent 4px 8px); }
.mar-gantt__bar:hover { outline: 2px solid var(--pp-blue); }
.mar-gantt__now { position: absolute; top: 0; bottom: 0; width: 2px; background: #ef4444; z-index: 1; pointer-events: none; }
.mar-gantt .is-empty { font-size: 12px; color: var(--pp-sub); padding: 4px 2px; }

/* chokepoint timeline */
.mar-timeline { position: absolute; left: 12px; right: 60px; bottom: 30px; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: rgba(5, 10, 20, 0.8); backdrop-filter: blur(8px); color: #fff; font: 600 12px/1.2 var(--pp-font); }
.mar-play { flex: 0 0 30px; height: 30px; border: 0; border-radius: 50%; background: #38bdf8; color: #0b1220; cursor: pointer; display: grid; place-items: center; }
.mar-play svg { width: 14px; height: 14px; fill: currentColor; }
.mar-timeline__track { position: relative; flex: 1; height: 34px; cursor: pointer; touch-action: none; }
.mar-timeline__track svg { display: block; width: 100%; height: 100%; }
.mar-timeline__date { flex: 0 0 auto; min-width: 86px; text-align: right; font-variant-numeric: tabular-nums; }
.mar-mix { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--pp-off); }
.mar-mix span { display: block; height: 100%; }
.mar-mixkey { display: flex; flex-wrap: wrap; gap: 3px 10px; font-size: 11px; color: var(--pp-sub); }

/* voyage planner */
.mar-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
.mar-form label { display: grid; gap: 3px; font: 600 11px/1.2 var(--pp-font); color: var(--pp-sub); }
.mar-form select { width: 100%; padding: 6px 8px; border: 1px solid var(--pp-border); border-radius: 8px; background: #fff; color: var(--pp-text); font: 600 12px/1.3 var(--pp-font); }
.mar-form__speed, .mar-form__check { grid-column: 1 / -1; }
.mar-form__speed b { color: var(--pp-text); }
.mar-form__speed input { width: 100%; accent-color: var(--pp-blue); }
.mar-form__check { display: flex !important; align-items: center; gap: 6px; }
.mar-form__check input { margin: 0; accent-color: var(--pp-blue); }
.mar-routes { display: grid; gap: 8px; }
.mar-route { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--pp-border); border-left: 4px solid var(--route, #38bdf8); border-radius: 10px; background: #fff; text-align: left; font: 12px/1.35 var(--pp-font); color: var(--pp-text); cursor: pointer; }
.mar-route[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--route, #38bdf8); }
.mar-route__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.mar-route__head b { font-size: 13px; }
.mar-route__head small { color: var(--pp-sub); }
.mar-route dl { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 0; }
.mar-route dt { font-size: 10px; color: var(--pp-sub); }
.mar-route dd { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; }
.mar-route__risk { font-size: 11px; color: #b91c1c; }
.mar-route__risk.is-clear { color: #047857; }
.mar-route__extra { font-size: 11px; color: var(--pp-sub); }

/* fleet list */
.mar-fleet button { flex-wrap: wrap; gap: 2px 8px; }
.mar-fleet .mar-fleet__sub { flex-basis: 100%; color: var(--pp-sub); font-size: 11px; }

@media (max-width: 1000px) {
  .pp .mar-ops .pp-mapframe { height: 560px; }
  .pp .mar-ops--globe .pp-mapframe { height: 520px; }
  .mar-panel, .mar-ops--globe .mar-panel, .mar-ops--voyage .mar-panel, .mar-ops--fleet .mar-panel { height: auto; max-height: none; }
  .mar-bar__wide { display: none; }
}
@media (max-width: 760px) {
  .mar-views { bottom: 34px; }
  .mar-views button { padding: 5px 8px; font-size: 11px; }
  .mar-timeline { right: 12px; bottom: 36px; }
  .mar-timeline__date { min-width: 70px; }
}

/* the daylight hero: a deep-water gradient behind the headline, the harbor clear on the right */
.sol-hero--maritime .sol-hero__shade { background: linear-gradient(90deg, rgba(3, 12, 26, 0.9) 0%, rgba(3, 12, 26, 0.72) 34%, rgba(3, 12, 26, 0.18) 62%, rgba(3, 12, 26, 0) 78%), linear-gradient(0deg, rgba(3, 12, 26, 0.55) 0%, rgba(3, 12, 26, 0) 22%); }
@media (max-width: 800px) { .sol-hero--maritime .sol-hero__shade { background: linear-gradient(0deg, rgba(3, 12, 26, 0.92) 0%, rgba(3, 12, 26, 0.75) 50%, rgba(3, 12, 26, 0.1) 80%); } }

/* ship cards: the Pro visual's frosted-glass card labels (pro-page.css .pp-lcard), compact, over each ship */
.mar-lcards { z-index: 3; }
.mar-lcard { transition: opacity 0.35s ease; }
.mar-lcard__box { width: 206px; padding: 8px 11px 7px; border-radius: 12px; bottom: 13px; }
.mar-lcard__head { display: flex; align-items: center; gap: 7px; margin-bottom: 3px; }
.mar-lcard__head i { flex: 0 0 9px; height: 9px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.7); }
.mar-lcard__head b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 800; letter-spacing: 0.01em; }
.mar-lcard__row { font-size: 11px; line-height: 1.35; color: #3a4668; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mar-lcard__live { display: flex; gap: 8px; margin-top: 2px; font-weight: 700; color: #0f1a38; font-variant-numeric: tabular-nums; }
.mar-lcard__where { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 600; color: #3a4668; }
.mar-lcard__eta { color: #0c62a6; font-weight: 600; }
.mar-lcard .pp-lcard__tail { bottom: 2px; width: 18px; height: 11px; }
@media (max-width: 640px) { .mar-lcard__box { width: 170px; } }
