/* Build 745: a short, understandable path to making MyMappi feel personal. */

html body .customize-mymappi-panel > .customize-mymappi-heading { order: 0; }
html body .customize-mymappi-panel > .customize-safety-note { order: 1; }
html body .customize-mymappi-panel > .customize-live-preview { order: 2; }
html body .customize-mymappi-panel > .customize-view-switcher { order: 3; }
html body .customize-mymappi-panel > .customize-view-note { order: 4; }
html body .customize-mymappi-panel > .customize-map-section { order: 5; }
html body .customize-mymappi-panel > .customize-pin-section { order: 6; }
html body .customize-mymappi-panel > .customize-cover-section { order: 7; }
html body .customize-mymappi-panel > .customize-identity-section { order: 8; }
html body .customize-mymappi-panel > .customize-category-builder-section { order: 9; }
html body .customize-mymappi-panel > .customize-chapter-section { order: 10; }
html body .customize-mymappi-panel > .customize-route-section { order: 11; }
html body .customize-mymappi-panel > .customize-capsule-section { order: 12; }
html body .customize-mymappi-panel > .customize-mymappi-actions { order: 20; }

html body .customize-mymappi-dialog[data-customization-view="quick"] .customize-advanced-section {
  display: none;
}

html body .customize-safety-note,
html body .customize-view-note {
  margin: 0;
}

html body .customize-safety-note {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(28, 143, 128, 0.14);
  border-radius: 15px;
  color: #54737a;
  background: rgba(235, 249, 244, 0.72);
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.35;
}

html body .customize-safety-note > svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: #148c7d;
}

html body .customize-safety-note strong {
  color: #174e58;
  font-weight: 850;
}

html body .customize-live-preview {
  position: sticky;
  z-index: 12;
  top: 8px;
  isolation: isolate;
  background:
    radial-gradient(circle at 10% 0%, #dff8ed 0, transparent 38%),
    linear-gradient(145deg, #fffefb, #eaf6f3);
  box-shadow:
    0 16px 36px rgba(5, 61, 71, 0.14),
    0 0 0 6px rgba(244, 251, 248, 0.9);
}

html body .customize-view-switcher {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  padding: 5px;
  border: 1px solid rgba(11, 91, 99, 0.12);
  border-radius: 18px;
  background: rgba(229, 242, 239, 0.76);
}

html body .customize-view-switcher button {
  display: grid;
  min-width: 0;
  min-height: 52px;
  gap: 1px;
  align-content: center;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: #58767c;
  background: transparent;
  text-align: left;
}

html body .customize-view-switcher button strong {
  color: inherit;
  font-size: 0.77rem;
  font-weight: 850;
}

html body .customize-view-switcher button small {
  overflow: hidden;
  color: inherit;
  font-size: 0.62rem;
  font-weight: 630;
  opacity: 0.78;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html body .customize-view-switcher button[aria-pressed="true"] {
  border-color: rgba(17, 151, 133, 0.26);
  color: #075965;
  background: rgba(255, 255, 252, 0.96);
  box-shadow: 0 7px 17px rgba(6, 70, 77, 0.09);
}

html body .customize-view-switcher button:focus-visible {
  outline: 3px solid rgba(27, 166, 177, 0.24);
  outline-offset: 2px;
}

html body .customize-view-note {
  color: #648086;
  font-size: 0.68rem;
  font-weight: 680;
  line-height: 1.35;
  text-align: center;
}

html body .customize-step-label {
  display: block;
  margin: 0 0 2px;
  color: #0c8b7d;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.095em;
  line-height: 1;
  text-transform: uppercase;
}

html body .customize-quick-section {
  scroll-margin-top: 132px;
}

html body .customize-quick-section .customize-choice-card {
  height: 100%;
}

html body .customize-theme-grid .customize-choice-card::before {
  grid-column: 1 / -1;
  width: 100%;
  height: 34px;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(5, 55, 66, 0.06);
}

html body .customize-theme-grid .customize-choice-card:has(input[value="classic"])::before {
  background: linear-gradient(145deg, #bfe4d8 0 46%, #98cbd9 47% 100%);
}

html body .customize-theme-grid .customize-choice-card:has(input[value="paper"])::before {
  background: linear-gradient(145deg, #f2ead5 0 46%, #d8d3c1 47% 100%);
}

html body .customize-theme-grid .customize-choice-card:has(input[value="midnight"])::before {
  background: linear-gradient(145deg, #183b4c 0 46%, #102f48 47% 100%);
}

html body .customize-theme-grid .customize-choice-card:has(input[value="adventure"])::before {
  background: linear-gradient(145deg, #91d9aa 0 46%, #78c6e2 47% 100%);
}

html body .customize-mymappi-dialog[data-pin-color-mode="feeling"] .customize-category-palette {
  display: none;
}

html body .customize-mymappi-actions {
  position: sticky;
  z-index: 16;
  bottom: -1px;
  grid-template-columns: minmax(120px, 0.72fr) minmax(170px, 1.28fr);
  padding: 11px;
  border: 1px solid rgba(13, 91, 100, 0.13);
  border-radius: 20px;
  background: rgba(250, 253, 250, 0.99);
  box-shadow: 0 -12px 30px rgba(6, 60, 69, 0.1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

html body .customize-mymappi-actions .customize-mymappi-status {
  grid-column: 1 / -1;
  min-height: 0;
}

html body .customize-mymappi-actions .customize-mymappi-status[data-tone="success"] {
  color: #087565;
}

html body .customize-mymappi-actions .customize-mymappi-status[data-tone="error"] {
  color: #a54542;
}

html body .customize-mymappi-reset,
html body .customize-mymappi-save {
  justify-content: center;
}

@media (max-width: 620px) {
  html body .customize-mymappi-heading {
    gap: 12px;
  }

  html body .customize-mymappi-heading h2 {
    font-size: clamp(1.32rem, 6.2vw, 1.68rem);
  }

  html body .customize-mymappi-heading p {
    max-width: 270px;
    font-size: 0.79rem;
  }

  html body .customize-live-preview {
    top: 5px;
    box-shadow:
      0 13px 28px rgba(5, 61, 71, 0.14),
      0 0 0 5px rgba(244, 251, 248, 0.9);
  }

  html body .customize-theme-grid,
  html body .customize-color-mode-grid,
  html body .customize-pin-style-grid,
  html body .customize-cover-section .customize-choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  html body .customize-theme-grid .customize-choice-card,
  html body .customize-pin-style-grid .customize-choice-card {
    min-height: 102px;
    padding: 9px;
  }

  html body .customize-color-mode-grid .customize-choice-card,
  html body .customize-cover-section .customize-choice-card {
    min-height: 78px;
    padding: 9px;
  }

  html body .customize-theme-grid .customize-choice-card strong,
  html body .customize-pin-style-grid .customize-choice-card strong,
  html body .customize-color-mode-grid .customize-choice-card strong,
  html body .customize-cover-section .customize-choice-card strong {
    font-size: 0.76rem;
  }

  html body .customize-theme-grid .customize-choice-card small,
  html body .customize-pin-style-grid .customize-choice-card small,
  html body .customize-color-mode-grid .customize-choice-card small,
  html body .customize-cover-section .customize-choice-card small {
    font-size: 0.62rem;
  }

  html body .customize-mymappi-actions {
    grid-template-columns: minmax(104px, 0.72fr) minmax(156px, 1.28fr);
    gap: 8px;
    padding: 9px;
    border-radius: 18px;
  }

  html body .customize-mymappi-actions button {
    min-height: 46px;
    padding: 0 12px;
    font-size: 0.75rem;
  }

  html body .customize-mymappi-reset {
    order: initial;
  }
}

@media (max-width: 360px) {
  html body .customize-color-mode-grid,
  html body .customize-cover-section .customize-choice-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  html body .customize-view-switcher button {
    padding-inline: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html body .customize-live-preview,
  html body .customize-view-switcher button {
    transition: none !important;
  }
}
