/*
  Mafatih Website Prototype v20260628-06
  Integrated mobile video mockup inside the invoice screenshot showcase.
*/

.invoice-story-dock {
  position: absolute;
  z-index: 7;
  right: -14px;
  bottom: 70px;
  width: 172px;
  display: grid;
  gap: 10px;
  pointer-events: auto;
}

body.rtl-mode .invoice-story-dock {
  right: auto;
  left: -14px;
}

.invoice-phone {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 28px;
  padding: 8px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.18), rgba(255,255,255,.035)),
    #06090c;
  box-shadow:
    0 24px 60px rgba(0,0,0,.38),
    inset 0 0 0 1px rgba(255,255,255,.08);
}

body.light-mode .invoice-phone {
  border-color: rgba(65,87,102,.18);
  background:
    linear-gradient(145deg, rgba(255,255,255,.94), rgba(230,237,241,.86)),
    #f7fafb;
  box-shadow:
    0 24px 54px rgba(65,87,102,.2),
    inset 0 0 0 1px rgba(255,255,255,.74);
}

.invoice-phone-speaker {
  position: absolute;
  z-index: 3;
  top: 12px;
  left: 50%;
  width: 48px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  transform: translateX(-50%);
}

body.light-mode .invoice-phone-speaker {
  background: rgba(65,87,102,.22);
}

.invoice-story-video {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 21px;
  background: #050505;
  object-fit: cover;
}

.invoice-story-play {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 50%;
  padding: 0;
  cursor: pointer;
  background: rgba(5,5,5,.62);
  box-shadow: 0 16px 34px rgba(0,0,0,.28);
  backdrop-filter: blur(14px);
  transform: translate(-50%, -50%);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}

.invoice-story-play span {
  width: 0;
  height: 0;
  margin-left: 4px;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 15px solid #fff;
}

.invoice-phone.is-playing .invoice-story-play {
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -50%) scale(.92);
}

.invoice-story-play:focus-visible {
  outline: 3px solid rgba(255,106,0,.62);
  outline-offset: 3px;
}

.invoice-story-switcher {
  display: flex;
  justify-content: center;
  gap: 7px;
}

.invoice-story-tab {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  padding: 0;
  cursor: pointer;
  color: var(--text);
  background: rgba(5,5,5,.58);
  font-size: .72rem;
  font-weight: 900;
  backdrop-filter: blur(12px);
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

body.light-mode .invoice-story-tab {
  border-color: rgba(65,87,102,.16);
  background: rgba(255,255,255,.86);
}

.invoice-story-tab:hover,
.invoice-story-tab.active {
  transform: translateY(-1px);
  border-color: rgba(255,106,0,.55);
  background: rgba(255,106,0,.22);
}

body.rtl-mode .invoice-story-dock {
  direction: rtl;
}

@media (max-width: 1180px) {
  .invoice-story-dock {
    right: 8px;
    bottom: 54px;
    width: 158px;
  }

  body.rtl-mode .invoice-story-dock {
    right: auto;
    left: 8px;
  }
}

@media (max-width: 720px) {
  .invoice-story-dock {
    position: relative;
    right: auto;
    left: auto;
    bottom: auto;
    width: min(68vw, 224px);
    margin: 14px auto 2px;
  }

  body.rtl-mode .invoice-story-dock {
    right: auto;
    left: auto;
  }

  .invoice-phone {
    border-radius: 30px;
    padding: 10px;
  }

  .invoice-story-video {
    border-radius: 22px;
  }
}
