:root {
  --border-offset: 50px;
  --border-thickness: 1px;
}

@media (max-width: 768px) {
  :root {
    --border-offset: 15px;
  }
}
@media (max-width: 768px) {
  .website-preview-container {
    display: none !important;
  }
}

.website-preview {
  position: relative;
  padding: var(--border-offset);
  margin: 0 auto;
  max-width: 1550px;
  /* Base styles for the scroll control (vertical for all screens) */
  /* Add a speech bubble arrow */
  /* Make the handle glow slightly to draw attention */
  /* Optional: Hide the hint after user interaction */
  /* We're not using this class now, but keep it for later */
}
.website-preview .border-line {
  background-color: var(--wp--preset--color--neutral-30);
  position: absolute;
}
.website-preview .border-line:first-child {
  top: var(--border-offset);
  left: 0;
  right: 0;
  height: var(--border-thickness);
}
.website-preview .border-line:nth-child(2) {
  bottom: var(--border-offset);
  left: 0;
  right: 0;
  height: var(--border-thickness);
}
.website-preview .border-line:nth-child(3) {
  width: var(--border-thickness);
  top: 0;
  bottom: 0;
  left: var(--border-offset);
}
.website-preview .border-line:nth-child(4) {
  width: var(--border-thickness);
  top: 0;
  bottom: 0;
  right: var(--border-offset);
}
.website-preview-container {
  position: relative;
  width: 100%; /* Fixed width for desktop */
  max-width: 100%;
  aspect-ratio: 16/9;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--wp--preset--color--neutral-30);
}
.website-preview-image-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  padding-right: 50px; /* Adjusted for scrollbar */
}
.website-preview-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  -webkit-transform: translateY(0);
  transform: translateY(0);
  will-change: transform;
  -webkit-transition: -webkit-transform 0.1s ease-out;
  transition: -webkit-transform 0.1s ease-out;
  transition: transform 0.1s ease-out;
  transition: transform 0.1s ease-out, -webkit-transform 0.1s ease-out;
}
.website-preview-placeholder {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background-color: #f0f0f0;
  color: #666;
  font-size: 1.2em;
}
.website-preview .website-preview-scroll-control {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 30px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  background: rgba(240, 240, 240, 0.5);
  z-index: 10;
}
.website-preview .website-preview-scroll-track {
  height: 80%;
  width: 6px;
  background: rgba(180, 180, 180, 0.5);
  border-radius: 3px;
  position: relative;
}
.website-preview .website-preview-scroll-handle {
  width: 18px;
  height: 60px;
  background: #444;
  border-radius: 9px;
  position: absolute;
  left: 50%;
  -webkit-transform: translateX(-50%);
          transform: translateX(-50%);
  top: 0;
  cursor: pointer;
  -webkit-box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
          box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
  -webkit-transition: background 0.2s, width 0.2s;
  transition: background 0.2s, width 0.2s;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
}
@media (max-width: 768px) {
  .website-preview .website-preview-scroll-hint {
    right: 40px; /* Adjust for better positioning on mobile */
    white-space: nowrap;
  }
}
.website-preview-scroll-hint {
  position: absolute;
  right: 24px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 13px;
  white-space: nowrap;
  pointer-events: none; /* Allow clicks to pass through */
  -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
          box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  z-index: 10;
}
@media (max-width: 768px) {
  .website-preview-scroll-hint {
    right: 30px;
    padding: 6px 10px;
    font-size: 12px;
  }
}
.website-preview .website-preview-scroll-hint:after {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  -webkit-transform: translateY(-50%);
          transform: translateY(-50%);
  border-width: 6px 0 6px 6px;
  border-style: solid;
  border-color: transparent transparent transparent rgba(0, 0, 0, 0.8);
}
@-webkit-keyframes pulse-glow {
  0% {
    -webkit-box-shadow: 0 0 0 rgba(255, 255, 255, 0);
            box-shadow: 0 0 0 rgba(255, 255, 255, 0);
  }
  50% {
    -webkit-box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
            box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  }
  100% {
    -webkit-box-shadow: 0 0 0 rgba(255, 255, 255, 0);
            box-shadow: 0 0 0 rgba(255, 255, 255, 0);
  }
}
@keyframes pulse-glow {
  0% {
    -webkit-box-shadow: 0 0 0 rgba(255, 255, 255, 0);
            box-shadow: 0 0 0 rgba(255, 255, 255, 0);
  }
  50% {
    -webkit-box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
            box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  }
  100% {
    -webkit-box-shadow: 0 0 0 rgba(255, 255, 255, 0);
            box-shadow: 0 0 0 rgba(255, 255, 255, 0);
  }
}
.website-preview .website-preview-scroll-handle {
  -webkit-animation: pulse-glow 2s infinite;
          animation: pulse-glow 2s infinite;
}
.website-preview .website-preview-scroll-handle.used .website-preview-scroll-hint {
  opacity: 0;
  -webkit-transition: opacity 0.5s ease-out;
  transition: opacity 0.5s ease-out;
}
.website-preview .website-preview-scroll-hint.fade-out {
  opacity: 0;
}