:root {
  --iz-ease: cubic-bezier(.16, 1, .3, 1);
  --iz-ease-in: cubic-bezier(.4, 0, 1, 1);
}

html { background-color: #08030a; }

@keyframes iz-fade { from { opacity: 0; } }
@keyframes iz-pop { from { opacity: 0; scale: .96; translate: 0 10px; } }
@keyframes iz-drop { from { opacity: 0; scale: .98; translate: 0 -6px; } }
@keyframes iz-rise { from { opacity: 0; translate: 0 8px; } }
@keyframes iz-shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }

@keyframes iz-toast-in { from { opacity: 0; translate: 0 14px; scale: .96; } }
@keyframes iz-toast-out { to { opacity: 0; translate: 0 8px; scale: .97; } }
@keyframes iz-out { to { opacity: 0; } }
@keyframes iz-bar { from { scale: 1 1; } to { scale: 0 1; } }
@keyframes iz-check { from { opacity: 0; scale: .3; } 60% { opacity: 1; scale: 1.18; } }
@keyframes iz-pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 61, 140, .6); } 40% { box-shadow: 0 0 0 5px rgba(255, 61, 140, .28); } 100% { box-shadow: 0 0 0 0 rgba(255, 61, 140, 0); } }
@keyframes iz-sweep { from { translate: -100% 0; } to { translate: 100% 0; } }

:where(a, button, [role="button"], input, select, textarea, .chip):focus-visible {
  outline: 2px solid rgba(255, 61, 140, .65);
  outline-offset: 2px;
}

:where(button, a, [role="button"], .chip, .nav-pill, .icon-btn, label) { touch-action: manipulation; }
.iz-pill-ind { position: absolute; pointer-events: none; }
.nav-pills .nav-pill.active.iz-pill-hold,
html.iz-nav-hold .nav-pills .nav-pill.active { background: transparent; box-shadow: none; }
@media (hover: none) {
  html { -webkit-tap-highlight-color: transparent; }
}
@media (hover: none) and (pointer: coarse) {
  .video-card-actions .icon-btn { width: 34px; height: 34px; }
}

.iz-toasts {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  translate: -50% 0;
  z-index: 2147483000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: calc(100vw - 32px);
  pointer-events: none;
}
.iz-toast {
  position: relative;
  overflow: hidden;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  max-width: 460px;
  padding: 8px 8px 8px 12px;
  background: rgba(30, 14, 25, .94);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(255, 200, 225, .14);
  border-radius: 14px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .5), 0 0 0 1px rgba(0, 0, 0, .2);
  color: #fde8f3;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.4;
}
.iz-toast-ic {
  flex: none;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 61, 140, .16);
  color: #ff5fa0;
}
.iz-toast-ic svg { width: 13px; height: 13px; }
.iz-toast-success .iz-toast-ic { background: rgba(168, 230, 160, .14); color: #a8e6a0; }
.iz-toast-error .iz-toast-ic { background: rgba(255, 90, 106, .16); color: #ff7a8a; }
.iz-toast-error { border-color: rgba(255, 90, 106, .3); }
.iz-toast-msg { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; padding: 2px 0; }
.iz-toast-act {
  flex: none;
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  background: rgba(255, 61, 140, .14);
  color: #ff7fb2;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.iz-toast-act:hover { background: rgba(255, 61, 140, .24); color: #ffa3c8; }
.iz-toast-x {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(253, 232, 243, .45);
  cursor: pointer;
}
.iz-toast-x svg { width: 14px; height: 14px; }
.iz-toast-x:hover { background: rgba(255, 255, 255, .06); color: #fde8f3; }
.iz-toast-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, #ff3d8c, #ff7fb2);
  transform-origin: left center;
  animation-name: iz-bar;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
  opacity: .8;
}

.iz-dlg-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147482000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(10, 4, 9, .62);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.iz-dlg {
  width: 100%;
  max-width: 380px;
  padding: 22px;
  background: linear-gradient(180deg, #25111e, #1a0b15);
  border: 1px solid rgba(255, 200, 225, .14);
  border-radius: 18px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .6);
  color: #fde8f3;
  font-family: inherit;
}
.iz-dlg-title { font-size: 17px; font-weight: 700; line-height: 1.3; text-wrap: balance; }
.iz-dlg-text { margin-top: 6px; font-size: 13.5px; line-height: 1.5; color: #c79cb5; }
.iz-dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }
.iz-dlg-btn {
  height: 40px;
  padding: 0 18px;
  border-radius: 11px;
  border: 1px solid rgba(255, 200, 225, .16);
  background: rgba(255, 220, 235, .06);
  color: #fde8f3;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.iz-dlg-btn:hover { background: rgba(255, 220, 235, .1); }
.iz-dlg-btn.primary { background: #ff3d8c; border-color: #ff3d8c; color: #fff; }
.iz-dlg-btn.primary:hover { background: #ff5fa0; }
.iz-dlg-btn.danger { background: #e8405f; border-color: #e8405f; color: #fff; }
.iz-dlg-btn.danger:hover { background: #f25672; }
@media (max-width: 520px) {
  .iz-dlg-overlay { align-items: flex-end; padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px)); }
  .iz-dlg-actions { flex-direction: column-reverse; }
  .iz-dlg-btn { width: 100%; height: 46px; }
  .iz-toast { max-width: none; width: calc(100vw - 32px); }
}

.iz-tip {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 2147483001;
  pointer-events: none;
  padding: 5px 8px;
  border-radius: 7px;
  background: rgba(244, 244, 250, .97);
  color: #14141c;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity .12s ease, transform .12s ease;
  box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .6);
}
.iz-tip.below { transform: translateY(-3px); }
.iz-tip.on { opacity: 1; transform: none; }

.iz-acking { opacity: 1 !important; overflow: hidden; }
.iz-acking > :not(.iz-ack-layer) { visibility: hidden; }
.iz-ack-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: inherit;
  background: inherit;
  color: #fff;
  font: inherit;
  font-weight: 700;
  pointer-events: none;
}
.iz-ack-layer svg { width: 15px; height: 15px; flex: none; }

.iz-skel {
  border: 1.5px solid rgba(255, 255, 255, .08);
  cursor: default;
  background: linear-gradient(100deg, rgba(255, 255, 255, .04) 30%, rgba(255, 255, 255, .13) 50%, rgba(255, 255, 255, .04) 70%);
  background-size: 220% 100%;
}

.iz-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 56px 20px 64px;
  color: #c79cb5;
}
.iz-empty-ic {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  margin-bottom: 6px;
  border-radius: 18px;
  background: radial-gradient(circle at 30% 25%, rgba(255, 95, 160, .32), rgba(255, 61, 140, .08) 70%);
  border: 1px solid rgba(255, 120, 180, .25);
  box-shadow: 0 10px 34px rgba(255, 61, 140, .18);
  color: #ff7fb2;
}
.iz-empty-ic svg { width: 26px; height: 26px; }
.iz-empty-title { font-size: 16px; font-weight: 700; color: #fde8f3; }
.iz-empty-text { max-width: 340px; font-size: 13px; line-height: 1.55; }
.iz-empty-btn {
  margin-top: 8px;
  height: 38px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: #ff3d8c;
  color: #fff;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(255, 61, 140, .35);
}
.iz-empty-btn:hover { background: #ff5fa0; }

@media (prefers-reduced-motion: no-preference) {
  .auth-overlay.visible,
  .info-overlay.visible,
  .video-overlay.visible,
  .tools-overlay.open,
  .ph-info-overlay.visible,
  .ph-lightbox.visible,
  .del-overlay.visible,
  .izg-popup-overlay.visible,
  .izgens-topup-overlay.visible,
  .fs-lb,
  #supportOverlay {
    animation: iz-fade .22s ease-out;
  }

  .ph-lb-card,
  .auth-modal,
  .profile-modal,
  .tools-modal,
  .info-popover,
  .ph-info-popover,
  .del-modal,
  .izg-popup,
  .izgens-topup-modal,
  .vlb-card,
  .fs-lb-stage,
  #supportOverlay > div {
    animation: iz-pop .34s var(--iz-ease);
  }

  .phcam-menu,
  .cam-dd.open .cam-menu,
  .preset-menu.open,
  .izd-menu:not([hidden]),
  .izg-drop.visible,
  .tools-popup > div {
    animation: iz-drop .2s var(--iz-ease);
    transform-origin: top center;
  }

  .auth-overlay:not(.visible),
  .info-overlay:not(.visible),
  .video-overlay:not(.visible),
  .tools-overlay:not(.open),
  .ph-info-overlay:not(.visible),
  .ph-lightbox:not(.visible),
  .del-overlay:not(.visible),
  .izg-popup-overlay:not(.visible),
  .izgens-topup-overlay:not(.visible) {
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease-in, display .2s allow-discrete;
  }
  .auth-overlay:not(.visible) :is(.auth-modal, .profile-modal),
  .info-overlay:not(.visible) .info-popover,
  .video-overlay:not(.visible) .vlb-card,
  .tools-overlay:not(.open) .tools-modal,
  .ph-info-overlay:not(.visible) .ph-info-popover,
  .ph-lightbox:not(.visible) .ph-lb-card,
  .del-overlay:not(.visible) .del-modal,
  .izg-popup-overlay:not(.visible) .izg-popup,
  .izgens-topup-overlay:not(.visible) .izgens-topup-modal {
    opacity: 0;
    scale: .96;
    translate: 0 8px;
    transition: opacity .2s ease-in, scale .2s var(--iz-ease-in), translate .2s var(--iz-ease-in);
  }

  .preset-menu:not(.open),
  .phcam-dd:not(.open) .phcam-menu,
  .cam-dd:not(.open) .cam-menu,
  .izg-drop:not(.visible),
  .izd-menu[hidden] {
    opacity: 0;
    scale: .98;
    translate: 0 -4px;
    pointer-events: none;
    transition: opacity .14s ease-in, scale .14s ease-in, translate .14s ease-in, display .14s allow-discrete;
  }

  .iz-ack-layer { animation: iz-fade .16s ease-out; }
  .iz-ack-layer svg { animation: iz-check .42s var(--iz-ease); }
  .iz-ack-layer.out { animation: iz-out .18s ease-in forwards; }
  .iz-pulse { animation: iz-pulse .9s cubic-bezier(.2, .8, .2, 1); }
  .iz-skel { animation: iz-shimmer 1.1s linear infinite; }
  .iz-sending { position: relative; overflow: hidden; }
  .iz-sending::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .16) 50%, transparent 70%);
    animation: iz-sweep 1.3s linear infinite;
    pointer-events: none;
  }

  .current-job.visible,
  .history-bulk-bar.visible,
  .ph-bulk-bar.visible {
    animation: iz-rise .3s var(--iz-ease);
  }

  :where(button, [role="button"], .nav-pill, .chip, .icon-btn) {
    transition: scale .14s var(--iz-ease);
  }
  :where(button, [role="button"], .nav-pill, .chip, .icon-btn):not(:disabled):active {
    scale: .97;
  }

  .iz-media-fade { animation: iz-fade .2s ease-out; }

  .iz-toast { animation: iz-toast-in .38s var(--iz-ease); }
  .iz-toast.out { animation: iz-toast-out .2s var(--iz-ease-in) forwards; pointer-events: none; }
  .iz-dlg-overlay { animation: iz-fade .2s ease-out; }
  .iz-dlg-overlay .iz-dlg { animation: iz-pop .32s var(--iz-ease); }
  .iz-dlg-overlay.out { animation: iz-out .16s ease-in forwards; pointer-events: none; }
  .iz-empty > * { animation: iz-rise .5s var(--iz-ease) backwards; }
  .iz-empty > :nth-child(2) { animation-delay: .05s; }
  .iz-empty > :nth-child(3) { animation-delay: .1s; }
  .iz-empty > :nth-child(4) { animation-delay: .15s; }

  .video-tile:not(:has(.iz-media-ready)),
  .ph-tile:has(img):not(:has(.iz-media-ready)):not(.expired),
  .recent-item:has(img, video):not(:has(.iz-media-ready)) {
    background-image: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .06) 50%, transparent 70%);
    background-size: 220% 100%;
    background-repeat: no-repeat;
    animation: iz-shimmer 1.5s linear infinite;
  }
}
