@import 'react-rg-designsystem/style/variables.scss';
@import './variables.scss';

.SceneView360 {
  position: absolute;
  top: 0px;
  left: $retailToolbarWidth;
  width: calc(100% - $retailToolbarWidth);
  height: 100%;
  background-color: rgb(247, 247, 247);
  z-index: 3;

  .RGContainerButton.close {
    position: absolute;
    top: 30px;
    right: 40px;
    z-index: 100;
  }

  iframe {
    border: none;
    width: 100%;
    height: 100%;
    background-color: rgb(247, 247, 247);
  }

  .shadow-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 4;
    box-shadow: inset 6px 0 6px -5px rgba(0, 0, 0, 0.10);
    pointer-events: none;
  }

  .loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: rgb(247, 247, 247);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    pointer-events: none;
    // z-index: 3;

    &.loading-overlay--visible {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
      transition: opacity 0s, visibility 0s; // Show immediately, no transition
    }

    .view360-spinner {
      width: 40px;
      height: 40px;
      border: 4px solid #f3f3f3;
      border-top: 4px solid var(--primary-zero);
      border-radius: 50%;
      animation: view360-spin 1s linear infinite;
      margin-bottom: 16px;
    }

    p {
      color: #666;
      font-size: 16px;
      font-weight: 500;
      margin: 0;
    }
  }

  @keyframes view360-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
}