/* Sol alt köşe videolu tanıtım widget'ı (ikas tarzı) */

.torx-video-guide {
  --tvg-blue: #2b41f1;
  --tvg-option-h: 36px;
  --tvg-option-gap: 5px;
  --tvg-shadow-collapsed: 0 10px 28px rgba(0, 0, 0, 0.22), 0 4px 14px rgba(43, 65, 241, 0.14);
  --tvg-shadow-expanded: 0 22px 52px rgba(0, 0, 0, 0.28), 0 10px 28px rgba(43, 65, 241, 0.12);
  position: fixed;
  left: max(18px, env(safe-area-inset-left));
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 9985;
  font-family: "Manrope", system-ui, sans-serif;
  touch-action: manipulation;
}

body.torx-mobile-nav-open .torx-video-guide {
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.torx-video-guide__shell {
  position: relative;
  overflow: hidden;
  background: #0a0a12;
  border: 0;
  outline: 0;
  isolation: isolate;
  transition:
    width 0.38s cubic-bezier(0.34, 1.2, 0.64, 1),
    height 0.38s cubic-bezier(0.34, 1.2, 0.64, 1),
    border-radius 0.38s cubic-bezier(0.34, 1.2, 0.64, 1),
    box-shadow 0.38s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.torx-video-guide.is-collapsed .torx-video-guide__shell {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: var(--tvg-shadow-collapsed);
}

.torx-video-guide.is-expanded .torx-video-guide__shell {
  width: min(300px, calc(100vw - 36px));
  height: min(560px, calc(100vh - 120px));
  border-radius: 24px;
  box-shadow: var(--tvg-shadow-expanded);
  background: #eef6f3;
}

.torx-video-guide__media {
  position: absolute;
  inset: -3px;
  overflow: hidden;
  background: #eef6f3;
}

.torx-video-guide.is-collapsed .torx-video-guide__media {
  inset: 0;
  border-radius: 50%;
}

.torx-video-guide.is-expanded .torx-video-guide__media {
  border-radius: 0;
}

.torx-video-guide__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  background: #eef6f3;
}

.torx-video-guide.is-collapsed .torx-video-guide__video {
  object-position: center 14%;
  transform: scale(1.1);
  transform-origin: center 22%;
}

.torx-video-guide.is-expanded .torx-video-guide__video {
  object-position: center 12%;
  transform: none;
  border-radius: 0;
}

.torx-video-guide__trigger {
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.torx-video-guide.is-expanded .torx-video-guide__trigger {
  display: none;
}

.torx-video-guide__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  color: #1a1a2e;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.85);
  transition: opacity 0.22s ease, transform 0.22s ease, background 0.18s ease;
}

.torx-video-guide.is-expanded .torx-video-guide__close {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.torx-video-guide__close:hover {
  background: #fff;
}

.torx-video-guide__close svg {
  display: block;
}

.torx-video-guide__overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  padding: 10px 10px 12px;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.18) 16%,
    rgba(0, 0, 0, 0.62) 52%,
    rgba(0, 0, 0, 0.88) 100%
  );
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.28s ease 0.06s, transform 0.28s ease 0.06s;
}

.torx-video-guide.is-expanded .torx-video-guide__overlay {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.torx-video-guide__options {
  display: flex;
  flex-direction: column;
  gap: var(--tvg-option-gap);
  max-height: calc(var(--tvg-option-h) * 4 + var(--tvg-option-gap) * 3);
  padding: 3px 6px 3px 3px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.35) transparent;
}

.torx-video-guide__options::-webkit-scrollbar {
  width: 4px;
}

.torx-video-guide__options::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
}

.torx-video-guide__option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: var(--tvg-option-h);
  flex: 0 0 auto;
  padding: 6px 10px 6px 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #141428;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.torx-video-guide__option:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.torx-video-guide__option.is-active:hover {
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.18),
    inset 0 0 0 2px var(--tvg-blue);
}

.torx-video-guide__option.is-active {
  background: #fff;
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.14),
    inset 0 0 0 2px var(--tvg-blue);
}

.torx-video-guide__option-letter {
  flex: 0 0 24px;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 2px solid var(--tvg-blue);
  border-radius: 50%;
  color: var(--tvg-blue);
  font-size: 11px;
  font-weight: 900;
}

.torx-video-guide__option-label {
  flex: 1;
}

.torx-video-guide__pulse {
  position: absolute;
  inset: 0;
  border: 0;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 0 0 0 rgba(43, 65, 241, 0.35);
}

.torx-video-guide.is-collapsed .torx-video-guide__pulse {
  animation: torx-video-guide-pulse 2.4s ease-out infinite;
}

@keyframes torx-video-guide-pulse {
  0% {
    transform: scale(1);
    opacity: 0.7;
    box-shadow: 0 0 0 0 rgba(43, 65, 241, 0.35);
  }
  100% {
    transform: scale(1.18);
    opacity: 0;
    box-shadow: 0 0 0 14px rgba(43, 65, 241, 0);
  }
}

@media (max-width: 640px) {
  .torx-video-guide {
    --tvg-option-h: 34px;
  }

  .torx-video-guide.is-collapsed .torx-video-guide__shell {
    width: 76px;
    height: 76px;
  }

  .torx-video-guide.is-expanded .torx-video-guide__shell {
    width: min(280px, calc(100vw - 28px));
    height: min(520px, calc(100vh - 100px));
  }

  .torx-video-guide__option {
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .torx-video-guide__shell,
  .torx-video-guide__overlay,
  .torx-video-guide__close,
  .torx-video-guide__option {
    transition: none;
  }

  .torx-video-guide.is-collapsed .torx-video-guide__pulse {
    animation: none;
  }
}
