/* Build 739: extend the logo's midnight-ocean gradient through the app.
   This is intentionally a paint-only layer: established spacing and geometry
   continue to belong to each feature stylesheet. */
:root {
  --mymappi-action-gradient: linear-gradient(112deg, #00243f 0%, #075965 54%, #0b806e 100%);
  --mymappi-action-ink: #f7fffc;
  --mymappi-action-border: rgba(72, 187, 168, 0.34);
  --mymappi-action-shadow:
    0 12px 25px rgba(4, 52, 74, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  --mymappi-action-shadow-raised:
    0 15px 30px rgba(4, 52, 74, 0.27),
    inset 0 1px 0 rgba(255, 255, 255, 0.23);
  --mymappi-action-focus: rgba(49, 139, 176, 0.42);
  --mymappi-utility-gradient: linear-gradient(145deg, #063149 0%, #07556a 100%);
}

/* One unmistakable primary action per surface. */
html body .app-shell #firstTimeOnboardingPrimary,
html body .app-shell #homeStarter .home-starter-primary,
html body .app-shell #addMemoryButton.add-memory-button,
html body .app-shell .capture-choice-action.is-primary,
html body .app-shell .first-memory-location-allow,
html body .app-shell .memory-editor #saveMemoryButton,
html body .customize-mymappi-save,
html body :is(.memory-share-send, .received-memory-save),
html body .app-shell .life-chapter-editor-save,
html body .active-trip-primary,
html body .trip-entry-primary,
html body .app-shell :is(.trip-import-next, .trip-import-save),
html body .app-shell .return-loop-settings-save,
html body .app-shell [data-chapter-journey-resume],
html body .app-shell .saved-place-capsule-callout [data-sheet-action="complete-memory"] {
  border-color: var(--mymappi-action-border) !important;
  color: var(--mymappi-action-ink) !important;
  background: var(--mymappi-action-gradient) !important;
  box-shadow: var(--mymappi-action-shadow) !important;
  transition:
    filter 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease !important;
}

/* The central capture button gets the same identity without changing its
   carefully balanced navigation position or size. */
html body .app-shell #addMemoryButton.add-memory-button {
  box-shadow:
    0 13px 28px rgba(4, 52, 74, 0.28),
    0 0 0 5px rgba(47, 145, 178, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.24) !important;
}

@media (hover: hover) {
  html body .app-shell #firstTimeOnboardingPrimary:hover,
  html body .app-shell #homeStarter .home-starter-primary:hover,
  html body .app-shell #addMemoryButton.add-memory-button:hover,
  html body .app-shell .capture-choice-action.is-primary:hover,
  html body .app-shell .first-memory-location-allow:hover,
  html body .app-shell .memory-editor #saveMemoryButton:hover,
  html body .customize-mymappi-save:hover,
  html body :is(.memory-share-send, .received-memory-save):hover,
  html body .app-shell .life-chapter-editor-save:hover,
  html body .active-trip-primary:hover,
  html body .trip-entry-primary:hover,
  html body .app-shell :is(.trip-import-next, .trip-import-save):hover,
  html body .app-shell .return-loop-settings-save:hover,
  html body .app-shell [data-chapter-journey-resume]:hover,
  html body .app-shell .saved-place-capsule-callout [data-sheet-action="complete-memory"]:hover {
    filter: brightness(1.055) saturate(1.035) !important;
    box-shadow: var(--mymappi-action-shadow-raised) !important;
  }
}

html body .app-shell #firstTimeOnboardingPrimary:focus-visible,
html body .app-shell #homeStarter .home-starter-primary:focus-visible,
html body .app-shell #addMemoryButton.add-memory-button:focus-visible,
html body .app-shell .capture-choice-action.is-primary:focus-visible,
html body .app-shell .first-memory-location-allow:focus-visible,
html body .app-shell .memory-editor #saveMemoryButton:focus-visible,
html body .customize-mymappi-save:focus-visible,
html body :is(.memory-share-send, .received-memory-save):focus-visible,
html body .app-shell .life-chapter-editor-save:focus-visible,
html body .active-trip-primary:focus-visible,
html body .trip-entry-primary:focus-visible,
html body .app-shell :is(.trip-import-next, .trip-import-save):focus-visible,
html body .app-shell .return-loop-settings-save:focus-visible,
html body .app-shell [data-chapter-journey-resume]:focus-visible,
html body .app-shell .saved-place-capsule-callout [data-sheet-action="complete-memory"]:focus-visible {
  outline: 3px solid var(--mymappi-action-focus) !important;
  outline-offset: 3px !important;
}

html body .app-shell #firstTimeOnboardingPrimary:active,
html body .app-shell #homeStarter .home-starter-primary:active,
html body .app-shell #addMemoryButton.add-memory-button:active,
html body .app-shell .capture-choice-action.is-primary:active,
html body .app-shell .first-memory-location-allow:active,
html body .app-shell .memory-editor #saveMemoryButton:active,
html body .customize-mymappi-save:active,
html body :is(.memory-share-send, .received-memory-save):active,
html body .app-shell .life-chapter-editor-save:active,
html body .active-trip-primary:active,
html body .trip-entry-primary:active,
html body .app-shell :is(.trip-import-next, .trip-import-save):active,
html body .app-shell .return-loop-settings-save:active,
html body .app-shell [data-chapter-journey-resume]:active,
html body .app-shell .saved-place-capsule-callout [data-sheet-action="complete-memory"]:active {
  filter: brightness(0.94) saturate(1.02) !important;
  box-shadow:
    0 7px 16px rgba(4, 52, 74, 0.19),
    inset 0 1px 0 rgba(255, 255, 255, 0.16) !important;
}

html body :is(
  #firstTimeOnboardingPrimary,
  #saveMemoryButton,
  .first-memory-location-allow,
  .customize-mymappi-save,
  .memory-share-send,
  .received-memory-save,
  .life-chapter-editor-save,
  .active-trip-primary,
  .trip-entry-primary,
  .trip-import-next,
  .trip-import-save,
  .return-loop-settings-save,
  [data-chapter-journey-resume]
):disabled {
  opacity: 0.56 !important;
  filter: saturate(0.72) !important;
  box-shadow: none !important;
}

/* Search, Edit, and Route are important utilities, not competing calls to
   action. Midnight blue ties them to the logo while keeping the hierarchy calm. */
html body .app-shell #pinSearchPanel #pinSearchGoButton.pin-search-go-button,
html body .app-shell #memoryForm .memory-place-search-button,
html body .app-shell .full-memory-capsule .memory-capsule-edit-action,
html body main.app-shell .full-memory-capsule .memory-capsule-edit-action,
html body .app-shell .full-memory-capsule .memory-capsule-route-action,
html body main.app-shell .full-memory-capsule .memory-capsule-route-action {
  border-color: rgba(78, 154, 178, 0.25) !important;
  color: #f5fbfc !important;
  background: var(--mymappi-utility-gradient) !important;
  box-shadow:
    0 8px 18px rgba(2, 43, 62, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.14) !important;
}

html body .app-shell #pinSearchPanel #pinSearchGoButton.pin-search-go-button:focus-visible,
html body .app-shell #memoryForm .memory-place-search-button:focus-visible,
html body .app-shell .full-memory-capsule :is(.memory-capsule-edit-action, .memory-capsule-route-action):focus-visible,
html body main.app-shell .full-memory-capsule :is(.memory-capsule-edit-action, .memory-capsule-route-action):focus-visible {
  outline: 3px solid var(--mymappi-action-focus) !important;
  outline-offset: 2px !important;
}

@media (prefers-reduced-motion: reduce) {
  html body :is(
    #firstTimeOnboardingPrimary,
    #addMemoryButton,
    #saveMemoryButton,
    .home-starter-primary,
    .capture-choice-action.is-primary,
    .first-memory-location-allow,
    .customize-mymappi-save,
    .memory-share-send,
    .received-memory-save,
    .life-chapter-editor-save,
    .active-trip-primary,
    .trip-entry-primary,
    .trip-import-next,
    .trip-import-save,
    .return-loop-settings-save,
    [data-chapter-journey-resume]
  ) {
    transition: none !important;
  }
}
