.share-flow {
  --cycle: 9s;
}
.share-preview, .share-vault {
  border-radius: 20px;
  border: 1px solid #7898ca;
  overflow: hidden;
}
.share-preview {
  position: relative;
  min-height: 320px;
  background: #e8eef8;
  color: #172137;
}
.share-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid #ccd8e9;
  background: #f8faff;
  font-size: 13px;
  font-weight: 600;
}
.share-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  color: #234992;
  border-radius: 7px;
  background: #e4edfd;
  font-size: 12px;
}
.share-trigger svg { width: 17px; height: 17px; }
.share-paper {
  display: grid;
  gap: 9px;
  padding: 18px 14px;
  margin: 17px auto;
  width: min(53%, 175px);
  height: 125px;
  border-radius: 4px;
  background: white;
  box-shadow: 0 4px 12px #18315018;
}
.share-paper b { color: #2a4774; font-size: 12px; }
.share-paper i { width: 90%; height: 3px; background: #d4deed; border-radius: 4px; }
.share-paper i:last-child { width: 55%; }
.share-drawer {
  position: relative;
  padding: 15px 14px;
  margin: 0 7px 7px;
  border: 1px solid #cad5e6;
  border-radius: 16px;
  background: #f8faff;
  box-shadow: 0 -5px 18px #213a6820;
}
.share-drawer::before {
  content: '';
  display: block;
  width: 27px;
  height: 3px;
  margin: -8px auto 9px;
  border-radius: 5px;
  background: #9baac1;
}
.share-drawer-title { font-size: 12px; font-weight: 600; }
.share-destinations {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 15px;
  margin-top: 10px;
}
.share-app {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: 48px;
  font-size: 10px;
  font-weight: 600;
}
.share-app img, .share-app-symbol {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
}
.share-app-symbol { background: #dce8fa; color: #325b9d; }
.share-app-symbol svg { width: 19px; height: 19px; }
.share-app-tresorly img { box-shadow: 0 0 0 2px #709ae8; }
.share-save-panel {
  display: grid;
  justify-items: center;
  gap: 7px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #d3deef;
  font-size: 12px;
}
.share-save-action {
  padding: 8px 13px;
  border-radius: 8px;
  color: #fff;
  background: #2855bd;
  font-weight: 600;
  text-align: center;
}
.share-vault {
  margin-top: 17px;
  padding: 13px;
  border-color: #4579cf;
  background: linear-gradient(145deg, #173b78, #112544);
}
.share-saved {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 10px;
  padding: 9px;
  border: 1px solid #496fab;
  border-radius: 10px;
  background: #183663;
  font-size: 12px;
}
.share-saved strong { overflow-wrap: anywhere; }
.share-saved svg { width: 17px; height: 17px; color: #bacdf3; }
.share-saved svg:last-child { margin-left: auto; color: #96e4bf; }

.motion-ready .share-preview { display: grid; grid-template-rows: auto 1fr; }
.motion-ready .share-drawer {
  position: absolute;
  inset: auto 0 0;
  display: grid;
  min-height: 123px;
}
.motion-ready .share-drawer::before { grid-area: 1 / 1; }
.motion-ready .share-picker, .motion-ready .share-save-panel { grid-area: 2 / 1; }
.motion-ready .share-save-panel { margin-top: 0; padding-top: 0; border-top: 0; align-content: center; }
.motion-ready .share-trigger { animation: tapShare var(--cycle) ease infinite; }
.motion-ready .share-drawer { animation: openShareDrawer var(--cycle) ease infinite; }
.motion-ready .share-picker { animation: showShareApps var(--cycle) ease infinite; }
.motion-ready .share-app-tresorly img { animation: chooseTresorly var(--cycle) ease infinite; }
.motion-ready .share-save-panel { animation: showSavePanel var(--cycle) ease infinite; }
.motion-ready .share-save-action { animation: confirmSave var(--cycle) ease infinite; }
.motion-ready .share-saved { animation: slideSharedPDF var(--cycle) ease infinite; }
.motion-ready .share-flow * { animation-play-state: paused; }
.motion-ready .share-flow.is-running * { animation-play-state: running; }

@keyframes tapShare {
  0%, 8%, 19%, 100% { transform: scale(1); }
  12% { transform: scale(.92); background: #b9d1ff; }
}
@keyframes openShareDrawer {
  0%, 13%, 100% { opacity: 0; transform: translateY(100%); }
  21%, 65% { opacity: 1; transform: translateY(0); }
  73% { opacity: 0; transform: translateY(100%); }
}
@keyframes showShareApps {
  0%, 39% { opacity: 1; }
  44%, 100% { opacity: 0; }
}
@keyframes chooseTresorly {
  0%, 30%, 45%, 100% { transform: scale(1); }
  36% { transform: scale(.92); box-shadow: 0 0 0 5px #90b8ff; }
}
@keyframes showSavePanel {
  0%, 43% { opacity: 0; }
  49%, 100% { opacity: 1; }
}
@keyframes confirmSave {
  0%, 57%, 66%, 100% { transform: scale(1); }
  61% { transform: scale(.94); background: #173c91; }
}
@keyframes slideSharedPDF {
  0%, 64% { opacity: 0; transform: translateY(-105px) scale(.89); }
  69% { opacity: 1; }
  79%, 96% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .motion-ready .share-drawer { position: relative; inset: auto; display: block; }
  .motion-ready .share-save-panel { margin-top: 12px; padding-top: 10px; border-top: 1px solid #d3deef; }
  .motion-ready .share-flow * { animation: none; }
}
