/* Popup s akcemi - podle Figma designu */
#svag-action-popup {
  position: fixed;
  display: none;
  background: transparent;
  z-index: 2147483647 !important; /* Maximální z-index s !important */
  opacity: 0;
  transform: translateY(0) scale(1); /* Začátek pod kurzorem */
  transition: none; /* Vypnout transition, použijeme keyframes */
  gap: 8px; /* Sjednoceno s popup.css */
  align-items: center;
  isolation: isolate; /* Vytvoří vlastní stacking context */
  pointer-events: auto; /* Zajistí, že je interaktivní */
}

#svag-action-popup.svag-visible {
  opacity: 1;
  display: flex;
  animation: popup-appear 0.15s ease-out forwards;
}

/* Animace objevení popup - subtilní */
@keyframes popup-appear {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

:root {
  --svag-bg: #ffffff;
  --svag-border: #000000;
  --svag-icon: #000000;
}

.svag-action-item {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--svag-bg);
  border: 2px solid var(--svag-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  --fill-percent: 0;
  z-index: 2147483647; /* Zajistí, že buttony jsou nahoře */
  isolation: isolate; /* Vlastní stacking context pro každý button */
  opacity: 0;
  transform: translateY(8px) scale(0.95);
}

/* Animace pro první button (gallery) - vlevo */
.svag-visible .svag-action-item:first-child {
  animation: button-fan-left 0.19s ease-out 0.04s forwards;
}

/* Animace pro druhý button (download) - vpravo */
.svag-visible .svag-action-item:last-child {
  animation: button-fan-right 0.19s ease-out 0.06s forwards;
}

/* Keyframes pro subtilní vějířovitý efekt - levý button */
@keyframes button-fan-left {
  0% {
    opacity: 0;
    transform: translateY(8px) translateX(-4px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
  }
}

/* Keyframes pro subtilní vějířovitý efekt - pravý button */
@keyframes button-fan-right {
  0% {
    opacity: 0;
    transform: translateY(8px) translateX(4px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
  }
}

/* Pseudo-element pro fill efekt */
.svag-action-item::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200%;
  height: 200%;
  background: var(--svag-border);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(var(--fill-percent));
  transition: transform 0.15s ease-out;
  z-index: 0;
}

.svag-action-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.svag-action-icon svg {
  display: block;
  position: relative;
  z-index: 1;
}

/* Změna barvy stroke podle fill */
.svag-action-item svg path {
  stroke: var(--svag-icon);
  transition: stroke 0.15s ease-out;
}

/* Když je button vyplněný, změň barvu ikon na opačnou */
.svag-action-item.svag-filled svg path {
  stroke: var(--svag-bg);
}

/* Změna barvy fill u bookmark ikony */
.svag-action-item svg path[fill] {
  fill: var(--svag-bg);
  transition: fill 0.15s ease-out;
}

.svag-action-item.svag-filled svg path[fill] {
  fill: var(--svag-bg);
}

/* Notifikace - minimalistické, černé */
.svag-notification {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #000000;
  color: #ffffff;
  padding: 4px 8px;
  border-radius: 6px;
  font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  z-index: 2147483646; /* Sníženo o 1, aby bylo pod buttony */
  opacity: 0;
  transform: translateY(10px) scale(0.95);
  transition: all 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate; /* Vytvoří nový stacking context pro z-index */
}

/* Skeleton loading animace v pozadí */
.svag-notification::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.15) 50%,
    transparent 100%
  );
  animation: skeleton-loading 1500ms ease-in-out forwards;
  z-index: 0;
  border-radius: 4px;
}

@keyframes skeleton-loading {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

.svag-notification.svag-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Animace při zmizení */
.svag-notification.svag-hiding {
  opacity: 0;
  transform: translateY(-10px) scale(0.7);
  transition: all 0.2s ease;
}

/* Kurzor pro SVG elementy při držení Command - VYPNUTO */
/* Používáme defaultní cursor
.svag-cursor-copy {
  cursor: copy !important;
}

.svag-cursor-copy * {
  cursor: copy !important;
}
*/

