/* Build 739: first-memory location is explicit, private, and user initiated. */
html body .app-shell #memoryForm .first-memory-location-consent,
html body main.app-shell #memoryForm#memoryForm .first-memory-location-consent {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 11px;
  padding: 13px;
  border: 1px solid rgba(9, 116, 116, 0.2);
  border-radius: 18px;
  color: #073746;
  background: linear-gradient(145deg, rgba(242, 252, 250, 0.98), rgba(229, 246, 247, 0.97));
  box-shadow: 0 12px 26px rgba(3, 48, 65, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

html body .app-shell #memoryForm .first-memory-location-consent[hidden],
html body main.app-shell #memoryForm#memoryForm .first-memory-location-consent[hidden] {
  display: none !important;
}

.first-memory-location-consent-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #ffffff;
  background: linear-gradient(135deg, #075965, #18a978);
  box-shadow: 0 8px 18px rgba(7, 89, 101, 0.18);
}

.first-memory-location-consent-icon svg {
  width: 19px;
  height: 19px;
}

.first-memory-location-consent-copy {
  display: grid;
  gap: 2px;
}

.first-memory-location-consent-copy small {
  color: #0b7e78;
  font-size: 0.61rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.first-memory-location-consent-copy strong {
  color: #073746;
  font-size: 0.91rem;
}

.first-memory-location-consent-copy > span {
  color: #5d787c;
  font-size: 0.72rem;
  line-height: 1.4;
}

.first-memory-location-consent-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.first-memory-location-consent-actions button {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 13px;
  font-weight: 800;
  cursor: pointer;
}

.first-memory-location-allow {
  border: 0;
  color: #ffffff;
  background: linear-gradient(112deg, #075965, #18a978);
  box-shadow: 0 8px 18px rgba(7, 89, 101, 0.15);
}

.first-memory-location-skip {
  border: 1px solid rgba(9, 100, 110, 0.14);
  color: #547175;
  background: rgba(255, 255, 255, 0.72);
}

.first-memory-location-consent.is-waiting .first-memory-location-consent-icon svg {
  animation: first-memory-location-pulse 1.2s ease-in-out infinite;
}

.first-memory-location-consent.is-error {
  border-color: rgba(178, 105, 45, 0.25) !important;
  background: linear-gradient(145deg, rgba(255, 249, 239, 0.98), rgba(249, 240, 226, 0.96)) !important;
}

/* Successful placement is reassurance, not a warning. Keep red reserved for
   errors and use the same mint/teal language as MyMappi's positive actions. */
html body .app-shell .memory-editor .memory-editor-inline-notice.is-success,
html body main.app-shell .memory-editor .memory-editor-inline-notice.is-success {
  border-color: rgba(24, 155, 112, 0.26) !important;
  color: #0b5e4e !important;
  background: linear-gradient(135deg, #eafaf2 0%, #f5fcf8 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82) !important;
}

html body .app-shell .memory-editor .memory-editor-inline-notice.is-success > span:first-child,
html body main.app-shell .memory-editor .memory-editor-inline-notice.is-success > span:first-child {
  color: #0d8b67 !important;
  background: rgba(29, 174, 121, 0.12) !important;
}

html body .app-shell .memory-editor .memory-editor-inline-notice.is-success small,
html body main.app-shell .memory-editor .memory-editor-inline-notice.is-success small {
  color: #4b7167 !important;
}

@keyframes first-memory-location-pulse {
  50% { opacity: 0.45; transform: scale(0.88); }
}

@media (max-width: 420px) {
  .first-memory-location-consent-actions {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .first-memory-location-consent.is-waiting .first-memory-location-consent-icon svg {
    animation: none;
  }
}
