.gparpreview-wrapper {
  margin: 14px 0;
}

.gparpreview-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 6px;
  border: 2px solid #e91e8c;
  background: #fff;
  color: #e91e8c;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}

.gparpreview-btn:hover {
  background: #e91e8c;
  color: #fff;
}

.gparpreview-btn svg {
  flex-shrink: 0;
}

.gparpreview-note {
  margin-top: 6px;
  font-size: 12px;
  color: #888;
}

.gparpreview-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: #000;
  display: flex;
  flex-direction: column;
}

.gparpreview-overlay[hidden] {
  display: none;
}

.gparpreview-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  position: relative;
  z-index: 2;
}

.gparpreview-title {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gparpreview-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 0 6px;
}

.gparpreview-permission,
.gparpreview-calibration {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: #fff;
  text-align: center;
  padding: 24px;
}

.gparpreview-permission[hidden],
.gparpreview-calibration[hidden] {
  display: none;
}

.gparpreview-btn-primary {
  background: #e91e8c;
  color: #fff;
}

.gparpreview-btn-primary:hover {
  background: #c8177a;
  border-color: #c8177a;
}

.gparpreview-btn-link {
  background: none;
  border: none;
  color: #ccc;
  text-decoration: underline;
  font-size: 13px;
  cursor: pointer;
}

.gparpreview-error {
  color: #ff8080;
  font-size: 13px;
  max-width: 320px;
}

.gparpreview-calib-card {
  width: 200px;
  height: 126px; /* ~ bankpas 85.6 x 54 mm ratio */
  border: 3px dashed #fff;
  border-radius: 10px;
  resize: both;
  overflow: auto;
  min-width: 100px;
  min-height: 63px;
}

.gparpreview-stage {
  position: relative;
  flex: 1;
  overflow: hidden;
  touch-action: none;
}

.gparpreview-stage[hidden] {
  display: none;
}

#gparpreview-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gparpreview-product-img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(0deg);
  cursor: grab;
  user-select: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45));
  touch-action: none;
}

.gparpreview-product-img:active {
  cursor: grabbing;
}

.gparpreview-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 0 16px;
}

.gparpreview-controls button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, .9);
  color: #333;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.gparpreview-controls input[type="range"] {
  width: 120px;
}

.gparpreview-shot {
  width: 56px !important;
  height: 56px !important;
  background: #fff !important;
  border: 4px solid #e91e8c !important;
}

.gparpreview-hint {
  position: absolute;
  top: 12px;
  left: 0;
  right: 0;
  text-align: center;
  color: #fff;
  font-size: 12px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .7);
  padding: 0 16px;
  pointer-events: none;
}

@media (max-width: 480px) {
  .gparpreview-controls input[type="range"] {
    width: 90px;
  }
}
