/* Build 696: private MyMappi-to-MyMappi memory capsule sharing. */

html body :is(.memory-share-dialog, .received-memory-dialog) {
  box-sizing: border-box !important;
  width: min(540px, calc(100vw - 28px)) !important;
  max-width: calc(100vw - 28px) !important;
  max-height: calc(100dvh - 28px) !important;
  margin: auto !important;
  padding: 0 !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 32px !important;
  color: #0b3841 !important;
  background: transparent !important;
}

html body :is(.memory-share-dialog, .received-memory-dialog)::backdrop {
  background: rgba(2, 25, 34, 0.64) !important;
  backdrop-filter: blur(12px) saturate(0.92) !important;
  -webkit-backdrop-filter: blur(12px) saturate(0.92) !important;
}

html body :is(.memory-share-panel, .received-memory-panel) {
  position: relative !important;
  box-sizing: border-box !important;
  display: grid !important;
  width: 100% !important;
  max-height: calc(100dvh - 28px) !important;
  padding: clamp(22px, 4vw, 30px) !important;
  gap: 16px !important;
  overflow-y: auto !important;
  border: 1px solid rgba(255, 255, 255, 0.82) !important;
  border-radius: 32px !important;
  background:
    radial-gradient(circle at 8% 0%, rgba(81, 216, 173, 0.15), transparent 34%),
    radial-gradient(circle at 100% 10%, rgba(92, 187, 222, 0.12), transparent 34%),
    linear-gradient(155deg, rgba(255, 255, 252, 0.995), rgba(237, 249, 244, 0.99)) !important;
  box-shadow:
    0 42px 110px rgba(2, 26, 37, 0.34),
    0 14px 36px rgba(8, 91, 83, 0.14),
    inset 0 1px rgba(255, 255, 255, 0.94) !important;
}

html body :is(.memory-share-panel, .received-memory-panel)::before {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  left: 50% !important;
  width: 124px !important;
  height: 3px !important;
  border-radius: 0 0 999px 999px !important;
  background: linear-gradient(90deg, #3db58b, #9be8c8, #5bb9d4) !important;
  transform: translateX(-50%) !important;
}

html body :is(.memory-share-heading, .received-memory-heading) {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 42px !important;
  align-items: start !important;
  gap: 14px !important;
}

html body .memory-share-heading > div {
  display: grid !important;
  gap: 4px !important;
}

html body :is(.memory-share-heading > div > span, .received-memory-eyebrow) {
  color: #15806e !important;
  font-size: 0.68rem !important;
  font-weight: 850 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
}

html body .memory-share-heading h2 {
  max-width: 18ch !important;
  margin: 0 !important;
  color: #0a3842 !important;
  font-size: clamp(1.55rem, 5vw, 2.15rem) !important;
  font-weight: 820 !important;
  letter-spacing: -0.045em !important;
  line-height: 1.02 !important;
  text-wrap: balance !important;
}

html body :is(.memory-share-close, .received-memory-close) {
  box-sizing: border-box !important;
  display: grid !important;
  place-items: center !important;
  width: 42px !important;
  height: 42px !important;
  padding: 0 !important;
  border: 1px solid rgba(7, 74, 79, 0.1) !important;
  border-radius: 50% !important;
  color: #276269 !important;
  background: rgba(255, 255, 255, 0.72) !important;
  box-shadow: 0 10px 22px rgba(8, 74, 75, 0.08) !important;
  cursor: pointer !important;
}

html body .memory-share-preview {
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-columns: 94px minmax(0, 1fr) !important;
  align-items: center !important;
  min-height: 112px !important;
  padding: 10px !important;
  gap: 14px !important;
  overflow: hidden !important;
  border: 1px solid rgba(6, 91, 87, 0.1) !important;
  border-radius: 24px !important;
  background: rgba(255, 255, 255, 0.7) !important;
  box-shadow: 0 16px 34px rgba(7, 65, 70, 0.08) !important;
}

html body .memory-share-preview-media {
  display: grid !important;
  place-items: center !important;
  width: 94px !important;
  height: 92px !important;
  overflow: hidden !important;
  border-radius: 18px !important;
  background: linear-gradient(145deg, #dff8ec, #caeced) !important;
}

html body .memory-share-preview-media img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

html body .memory-share-preview-media.is-mappi img {
  width: 84px !important;
  height: auto !important;
  object-fit: contain !important;
}

html body .memory-share-preview-copy {
  display: grid !important;
  min-width: 0 !important;
  gap: 5px !important;
}

html body .memory-share-preview-copy > span {
  color: #1b8572 !important;
  font-size: 0.66rem !important;
  font-weight: 830 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
}

html body .memory-share-preview-copy strong {
  overflow: hidden !important;
  color: #0b3a42 !important;
  font-size: 1.02rem !important;
  font-weight: 820 !important;
  line-height: 1.15 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html body .memory-share-preview-copy small {
  color: #607a7d !important;
  font-size: 0.75rem !important;
  font-weight: 620 !important;
  line-height: 1.35 !important;
}

html body .memory-share-field {
  display: grid !important;
  gap: 7px !important;
  color: #214f55 !important;
  font-size: 0.78rem !important;
  font-weight: 760 !important;
}

html body .memory-share-field > span {
  display: flex !important;
  align-items: baseline !important;
  justify-content: space-between !important;
  gap: 10px !important;
}

html body .memory-share-field > span small,
html body .memory-share-field > small {
  color: #819395 !important;
  font-size: 0.68rem !important;
  font-weight: 620 !important;
}

html body .memory-share-field :is(input, textarea) {
  box-sizing: border-box !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 13px 14px !important;
  border: 1px solid rgba(7, 87, 84, 0.13) !important;
  border-radius: 16px !important;
  outline: none !important;
  color: #143f45 !important;
  background: rgba(255, 255, 255, 0.84) !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.94) !important;
  font: inherit !important;
  font-size: 0.92rem !important;
  font-weight: 620 !important;
  line-height: 1.4 !important;
  resize: vertical !important;
}

html body .memory-share-field :is(input, textarea):focus {
  border-color: rgba(17, 145, 119, 0.5) !important;
  box-shadow: 0 0 0 4px rgba(45, 181, 144, 0.1) !important;
}

html body .memory-share-privacy {
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr) !important;
  align-items: center !important;
  padding: 11px 12px !important;
  gap: 10px !important;
  border: 1px solid rgba(19, 132, 109, 0.1) !important;
  border-radius: 16px !important;
  color: #2b6965 !important;
  background: rgba(220, 247, 236, 0.56) !important;
}

html body .memory-share-privacy > svg {
  width: 20px !important;
  justify-self: center !important;
}

html body .memory-share-privacy > span:last-child {
  display: grid !important;
  gap: 2px !important;
}

html body .memory-share-privacy strong {
  font-size: 0.74rem !important;
  font-weight: 820 !important;
}

html body .memory-share-privacy small {
  color: #6a8583 !important;
  font-size: 0.68rem !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
}

html body :is(.memory-share-status, .received-memory-status) {
  min-height: 18px !important;
  margin: -4px 0 0 !important;
  color: #267269 !important;
  font-size: 0.74rem !important;
  font-weight: 720 !important;
  line-height: 1.35 !important;
  text-align: center !important;
}

html body :is(.memory-share-status, .received-memory-status).is-error {
  color: #a23e35 !important;
}

html body :is(.memory-share-actions, .received-memory-actions) {
  display: grid !important;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr) !important;
  gap: 10px !important;
}

html body :is(.memory-share-actions, .received-memory-actions)[hidden] {
  display: none !important;
}

html body :is(.memory-share-actions, .received-memory-actions) button {
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 0 !important;
  min-height: 50px !important;
  margin: 0 !important;
  padding: 11px 14px !important;
  gap: 8px !important;
  border-radius: 16px !important;
  font: inherit !important;
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  cursor: pointer !important;
}

html body :is(.memory-share-cancel, .received-memory-decline) {
  border: 1px solid rgba(7, 78, 80, 0.12) !important;
  color: #3f676b !important;
  background: rgba(255, 255, 255, 0.68) !important;
}

html body :is(.memory-share-send, .received-memory-save) {
  border: 1px solid rgba(255, 255, 255, 0.34) !important;
  color: #fff !important;
  background: linear-gradient(135deg, #075b64, #0a8678 62%, #28aa76) !important;
  box-shadow: 0 15px 28px rgba(7, 108, 94, 0.22), inset 0 1px rgba(255, 255, 255, 0.18) !important;
}

html body :is(.memory-share-actions, .received-memory-actions) button:disabled {
  cursor: wait !important;
  opacity: 0.58 !important;
}

html body .received-memory-panel {
  gap: 14px !important;
}

html body .received-memory-heading {
  align-items: center !important;
}

html body .received-memory-content {
  display: grid !important;
  gap: 14px !important;
}

html body .received-memory-loading {
  display: grid !important;
  place-items: center !important;
  min-height: 280px !important;
  gap: 12px !important;
  color: #4a7376 !important;
  text-align: center !important;
}

html body .received-memory-loading svg {
  width: 30px !important;
  height: 30px !important;
  animation: memoryShareSpin 900ms linear infinite !important;
}

html body .received-memory-card {
  position: relative !important;
  display: grid !important;
  min-height: 340px !important;
  overflow: hidden !important;
  border: 1px solid rgba(255, 255, 255, 0.84) !important;
  border-radius: 27px !important;
  background: #0b4b54 !important;
  box-shadow: 0 24px 54px rgba(4, 41, 49, 0.2) !important;
}

html body .received-memory-media {
  position: absolute !important;
  inset: 0 !important;
}

html body .received-memory-media img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

html body .received-memory-media.is-mappi {
  display: grid !important;
  place-items: center !important;
  background: linear-gradient(145deg, #d7f6e8, #bfe5e8) !important;
}

html body .received-memory-media.is-mappi img {
  width: min(230px, 58%) !important;
  height: auto !important;
  object-fit: contain !important;
}

html body .received-memory-card::after {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  background: linear-gradient(180deg, rgba(2, 26, 34, 0.04) 18%, rgba(2, 30, 39, 0.86) 82%, rgba(2, 28, 37, 0.96)) !important;
  pointer-events: none !important;
}

html body .received-memory-copy {
  position: relative !important;
  z-index: 1 !important;
  align-self: end !important;
  display: grid !important;
  padding: 25px !important;
  gap: 7px !important;
  color: #fff !important;
}

html body .received-memory-from {
  justify-self: start !important;
  padding: 7px 10px !important;
  border: 1px solid rgba(226, 255, 245, 0.22) !important;
  border-radius: 999px !important;
  color: #dcfff2 !important;
  background: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(12px) !important;
  font-size: 0.68rem !important;
  font-weight: 800 !important;
}

html body .received-memory-copy h2 {
  max-width: 17ch !important;
  margin: 3px 0 0 !important;
  color: #fff !important;
  font-size: clamp(1.65rem, 6vw, 2.45rem) !important;
  font-weight: 820 !important;
  letter-spacing: -0.05em !important;
  line-height: 0.98 !important;
  text-wrap: balance !important;
}

html body .received-memory-copy > small {
  color: rgba(236, 255, 249, 0.78) !important;
  font-size: 0.76rem !important;
  font-weight: 650 !important;
}

html body .received-memory-story,
html body .received-memory-note {
  margin: 0 !important;
  line-height: 1.48 !important;
}

html body .received-memory-story {
  display: -webkit-box !important;
  overflow: hidden !important;
  color: rgba(248, 255, 252, 0.9) !important;
  font-size: 0.83rem !important;
  font-weight: 580 !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 3 !important;
}

html body .received-memory-note {
  padding: 11px 12px !important;
  border-left: 2px solid rgba(137, 241, 199, 0.74) !important;
  color: #37696b !important;
  background: rgba(225, 248, 239, 0.66) !important;
  font-size: 0.76rem !important;
  font-weight: 650 !important;
}

html body .memory-capsule-shared-credit {
  display: inline-flex !important;
  align-items: center !important;
  align-self: start !important;
  margin-bottom: 8px !important;
  padding: 8px 11px !important;
  gap: 7px !important;
  border: 1px solid rgba(14, 121, 103, 0.12) !important;
  border-radius: 999px !important;
  color: #236d65 !important;
  background: rgba(222, 248, 237, 0.72) !important;
  font-size: 0.7rem !important;
  font-weight: 760 !important;
}

html body .memory-capsule-send-action {
  color: #155c5b !important;
}

html body .memory-capsule-send-action > span:first-child {
  color: #138673 !important;
  background: rgba(208, 247, 233, 0.78) !important;
}

@keyframes memoryShareSpin {
  to { transform: rotate(360deg); }
}

@media (max-width: 560px) {
  html body :is(.memory-share-dialog, .received-memory-dialog) {
    width: min(100% - 20px, 520px) !important;
    max-width: calc(100% - 20px) !important;
    max-height: calc(100dvh - 20px) !important;
  }

  html body :is(.memory-share-panel, .received-memory-panel) {
    max-height: calc(100dvh - 20px) !important;
    padding: 21px 17px 18px !important;
    gap: 13px !important;
    border-radius: 28px !important;
  }

  html body .memory-share-preview {
    grid-template-columns: 76px minmax(0, 1fr) !important;
    min-height: 94px !important;
    gap: 11px !important;
    border-radius: 20px !important;
  }

  html body .memory-share-preview-media {
    width: 76px !important;
    height: 74px !important;
    border-radius: 15px !important;
  }

  html body .received-memory-card {
    min-height: min(390px, 46dvh) !important;
  }

  html body .received-memory-copy {
    padding: 20px !important;
  }
}

@media (max-width: 350px) {
  html body :is(.memory-share-actions, .received-memory-actions) {
    grid-template-columns: 1fr !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html body .received-memory-loading svg {
    animation: none !important;
  }
}
