/* «Карта троп» — mockups WebMap (public /map) and WebMapMobile (the web app tab).
   Works on top of landing.css (the public page) and webapp-v2.css (the tab): colours come from
   their variables, with the palette as fallback. */

:root {
  --mp-ok: #4ADE80;
  --mp-partial: #FFC46B;
  --mp-down: #F87171;
  --mp-none: #262E5C;
  --mp-card: #111736;
  --mp-line: #1D2447;
}

/* the schematic */
.mp-svg { display: block; width: 100%; height: auto; }
.mp-svg text { font-family: var(--font-body, 'Manrope', sans-serif); }
.mp-lbl { fill: var(--text-1, #EEF0FF); font-size: 15px; font-weight: 700; }
.mp-sub { font-size: 12.5px; font-weight: 600; }
.mp-sub.mp-ok { fill: var(--mp-ok); }
.mp-sub.mp-partial { fill: var(--mp-partial); }
.mp-sub.mp-down { fill: var(--mp-down); }
.mp-me { fill: var(--text-1, #EEF0FF); font-size: 14px; font-weight: 700; }
.mp-more-count { fill: var(--text-2, #A9B0D6); font-size: 13px; font-weight: 600; }
.mp-runner { animation: mp-hop 1.4s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes mp-hop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-10px); } }

/* flags, statuses, the country list */
.mp-flag {
  display: inline-block; flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
  overflow: hidden; box-shadow: 0 0 0 1px rgba(255, 255, 255, .14);
}
.mp-flag svg { display: block; width: 100%; height: 100%; }
.mp-lock {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2, #1B2350); font-size: 14px;
}
.mp-status { display: flex; align-items: flex-start; gap: 8px; margin: 8px 0 0; font-size: 14px; line-height: 1.4; color: var(--text-2, #A9B0D6); }
.mp-status i { flex-shrink: 0; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--mp-ok); }
.mp-status.mp-stale i { background: var(--mp-partial); }
.mp-status.mp-none i { background: var(--text-3, #8A92BE); }
.mp-list { padding: 4px 16px; }
.mp-row { display: flex; align-items: center; gap: 12px; padding: 14px 0; }
.mp-row + .mp-row { border-top: 1px solid var(--mp-line); }
.mp-row b { flex: 1; min-width: 0; font-size: 15px; }
.mp-count { flex-shrink: 0; font-size: 13px; font-weight: 700; }
.mp-count.mp-ok { color: var(--mp-ok); }
.mp-count.mp-partial { color: var(--mp-partial); }
.mp-count.mp-down { color: var(--mp-down); }
.mp-alerts {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px;
  padding: 0 18px; border: 0; border-radius: 26px; background: #229ED9; color: #FFFFFF;
  font: inherit; font-size: 16px; font-weight: 700; text-decoration: none; cursor: pointer;
}
.mp-alerts:hover { background: #2AABEE; color: #FFFFFF; }
/* as a link in the cabinet: «.v2-page a» would paint the label yellow on blue */
.v2-page a.mp-alerts, .v2-page a.mp-alerts:hover { color: #FFFFFF; }
.mp-alerts.is-on { background: var(--surface-2, #1B2350); color: var(--text-1, #EEF0FF); }
.mp-alerts:disabled { opacity: .7; }
.mp-alerts svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mp-more { display: block; margin: 16px 0 4px; text-align: center; font-size: 14px; font-weight: 600; color: var(--accent, #F9C64A); text-decoration: none; }

/* «За последние 24 часа» */
.mp-hrow { padding: 14px 0; }
.mp-hrow + .mp-hrow { border-top: 1px solid var(--mp-line); }
.mp-hhead { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.mp-hhead b { flex: 1; font-size: 15px; }
.mp-up { font-size: 13px; font-weight: 700; color: var(--mp-ok); }
.mp-up.mp-partial { color: var(--mp-partial); }
.mp-up.mp-down { color: var(--mp-down); }
.mp-bars { display: grid; grid-template-columns: repeat(48, minmax(0, 1fr)); gap: 2px; height: 22px; }
.mp-bar { display: block; border-radius: 2px; background: var(--mp-none); }
.mp-bar.mp-ok { background: var(--mp-ok); }
.mp-bar.mp-partial { background: var(--mp-partial); }
.mp-bar.mp-down { background: var(--mp-down); }

/* «Что случалось» */
.mp-inc { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 12px; padding: 14px 0; }
.mp-inc + .mp-inc { border-top: 1px solid var(--mp-line); }
.mp-inc time { font-size: 12px; line-height: 1.5; color: var(--text-3, #8A92BE); }
.mp-inc b { display: block; font-size: 14px; line-height: 1.4; }
.mp-inc span { display: block; margin-top: 2px; font-size: 13px; line-height: 1.4; color: var(--text-2, #A9B0D6); }
.mp-quiet { margin: 10px 0 4px; font-size: 14px; color: var(--text-2, #A9B0D6); }

.mp-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 10px 0 0; padding: 0; list-style: none; font-size: 12.5px; color: var(--text-2, #A9B0D6); }
.mp-legend li::before {
  content: ""; display: inline-block; width: 16px; height: 3px; margin-right: 7px;
  vertical-align: middle; border-radius: 2px; background: var(--mp-ok);
}
.mp-legend .mp-partial::before { background: var(--mp-partial); }
.mp-legend .mp-down::before { background: var(--mp-down); }

/* the web app tab */
.mp-tabhead { padding: 18px 2px 14px; }
.mp-tabhead h1 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 28px; line-height: 1.15; }
.mp-mapcard { padding: 12px; }
.mp-tab .v2-card + .v2-card { margin-top: 12px; }
.mp-tab .mp-alerts { margin-top: 16px; }

/* the public page */
body.mp-page { min-height: 100vh; margin: 0; background: var(--bg, #0B0F24); color: var(--text-1, #EEF0FF); font-family: var(--font-body); }
.mp-wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding-inline: 24px; box-sizing: border-box; }
.mp-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 24px; }
.mp-brand { font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--text-1, #EEF0FF); text-decoration: none; }
.mp-head .mp-alerts { width: auto; min-height: 44px; font-size: 14px; }
.mp-h1 { margin: 16px 0 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(34px, 5vw, 50px); line-height: 1.1; }
.mp-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; align-items: start; margin: 24px 0 56px; }
.mp-card { padding: 18px 20px; border: 1px solid var(--mp-line); border-radius: 24px; background: var(--mp-card); }
.mp-card h2 { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; margin: 0 0 4px; font-size: 17px; font-weight: 700; }
.mp-card h2 small { font-size: 12px; font-weight: 500; color: var(--text-3, #8A92BE); }
.mp-side { display: grid; gap: 18px; }
.mp-phone-only { display: none; }
.mp-page .mp-status { font-size: 16px; }  /* the mockup's line under «Карта троп» */
.mp-empty { margin: 24px 0 56px; }

/* «Не хватает тропы?» — ask for a new country */
.mp-head-links { display: flex; align-items: center; gap: 10px; }
.mp-want-link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 22px;
  border: 1px solid var(--border-strong, #2A3360); color: var(--text-1, #EEF0FF);
  font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.mp-want-link:hover { border-color: var(--accent, #F9C64A); color: var(--accent, #F9C64A); }
.mp-want {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 28px;
  margin: 0 0 56px; padding: 24px; scroll-margin-top: 24px;
}
.mp-want-head { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.mp-want-dog { width: 150px; height: auto; flex-shrink: 0; }
.mp-want h2 { margin: 0 0 6px; font-family: var(--font-display); font-size: 26px; line-height: 1.15; }
.mp-want-lead { margin: 0; font-size: 15px; line-height: 1.5; color: var(--text-2, #A9B0D6); }
.mp-want-form { display: grid; gap: 14px; }
.mp-field { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.mp-field > span, .mp-field > legend { padding: 0; font-size: 14px; font-weight: 700; }
.mp-field small { font-weight: 500; color: var(--text-3, #8A92BE); }
.mp-field select, .mp-field input, .mp-field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--border-strong, #2A3360);
  border-radius: 14px; background: #0B0F24; color: var(--text-1, #EEF0FF);
  font: inherit; font-size: 15px;
}
.mp-field textarea { min-height: 72px; resize: vertical; }
.mp-field select:focus, .mp-field input:focus, .mp-field textarea:focus {
  outline: none; border-color: var(--accent, #F9C64A);
}
.mp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.mp-chip { position: relative; cursor: pointer; }
.mp-chip input { position: absolute; opacity: 0; pointer-events: none; }
.mp-chip span {
  display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 19px;
  border: 1px solid var(--border-strong, #2A3360); font-size: 14px; font-weight: 600;
  color: var(--text-2, #A9B0D6);
}
.mp-chip input:checked + span { border-color: var(--accent, #F9C64A); background: rgba(249, 198, 74, .12); color: var(--text-1, #EEF0FF); }
.mp-chip input:focus-visible + span { outline: 2px solid var(--accent, #F9C64A); outline-offset: 2px; }
.mp-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.mp-want [hidden] { display: none !important; }
.mp-want-btn {
  min-height: 52px; border: 0; border-radius: 26px; background: var(--accent, #F9C64A);
  color: var(--on-accent, #1A1300); font: inherit; font-size: 16px; font-weight: 800; cursor: pointer;
}
.mp-want-btn:hover { background: var(--accent-hover, #FFD970); }
.mp-want-btn:disabled { opacity: .6; cursor: default; }
.mp-want-msg { min-height: 20px; margin: 0; font-size: 14px; line-height: 1.45; color: var(--text-2, #A9B0D6); }
.mp-want-msg.is-ok { color: var(--mp-ok); }
.mp-want-msg.is-bad { color: var(--mp-down); }
.mp-want-top h3 { display: flex; align-items: baseline; gap: 8px; margin: 4px 0 10px; font-size: 17px; }
.mp-want-top h3 small { font-size: 13px; font-weight: 500; color: var(--text-3, #8A92BE); }
.mp-want-list { margin: 0; padding: 0; list-style: none; }
.mp-want-row {
  display: grid; grid-template-columns: 28px minmax(0, 1fr) minmax(60px, 1.1fr) 36px; align-items: center;
  gap: 10px; padding: 11px 0;
}
.mp-want-row + .mp-want-row { border-top: 1px solid var(--mp-line); }
.mp-want-flag { font-size: 20px; line-height: 1; }
.mp-want-row b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-want-bar { height: 8px; border-radius: 4px; background: var(--mp-none); overflow: hidden; }
.mp-want-bar i { display: block; height: 100%; border-radius: 4px; background: var(--accent, #F9C64A); }
.mp-want-count { text-align: right; font-size: 14px; font-weight: 700; color: var(--accent, #F9C64A); }

@media (max-width: 900px) {
  .mp-want { grid-template-columns: minmax(0, 1fr); padding: 18px 16px; gap: 20px; }
  .mp-want-dog { width: 110px; }
  .mp-want h2 { font-size: 22px; }
}
@media (max-width: 560px) {
  .mp-want-link { display: none; }
}

@media (max-width: 900px) {
  .mp-grid { grid-template-columns: minmax(0, 1fr); }
  .mp-desk-only { display: none; }
  .mp-phone-only { display: block; }
  .mp-wrap { padding-inline: 16px; }
  .mp-page .mp-status { font-size: 14px; }
}
@media (max-width: 560px) {
  .mp-head .mp-alerts { padding: 0 14px; font-size: 13px; }
  .mp-head .mp-alerts .mp-long { display: none; }
  .mp-card { padding: 14px 16px; }
  .mp-inc { grid-template-columns: 72px minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .mp-runner { animation: none; } }
