/* GripCloud 플레이어와 로딩·오류 상태를 전체 화면에 배치하는 스타일 */
:root {
  color: #ffffff;
  background: #000000;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #000000;
}

body {
  min-width: 320px;
}

#embed {
  position: absolute;
  inset: 0;
  width: 100vw;
  height: 100%;
  min-width: 320px;
  margin: 0 auto;
  background: #000000;
}

.state-layer {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding:
    calc(env(safe-area-inset-top) + 24px)
    calc(env(safe-area-inset-right) + 24px)
    calc(env(safe-area-inset-bottom) + 24px)
    calc(env(safe-area-inset-left) + 24px);
  text-align: center;
  background: #000000;
}

.state-layer[hidden] {
  display: none;
}

#loading {
  opacity: 1;
  visibility: visible;
  transition:
    opacity 0.24s ease,
    visibility 0s linear 0s;
}

#loading.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.24s ease,
    visibility 0s linear 0.24s;
}

.state-layer h1,
.state-layer p {
  margin: 0;
}

.state-layer h1 {
  font-size: 20px;
  line-height: 1.4;
}

.state-layer p {
  color: #b8b8bd;
  font-size: 15px;
  line-height: 1.5;
}

.spinner {
  width: 34px;
  height: 34px;
  border: 3px solid rgb(255 255 255 / 28%);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

#retry-button {
  min-width: 112px;
  min-height: 44px;
  margin-top: 8px;
  padding: 10px 20px;
  border: 1px solid rgb(255 255 255 / 28%);
  border-radius: 12px;
  color: #ffffff;
  background: #242428;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

#retry-button:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}

.noscript-message {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 24px;
  color: #ffffff;
  text-align: center;
  background: #000000;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation: none;
  }

  #loading,
  #loading.is-hidden {
    transition: none;
  }
}
