/* 完了画面コンテナ */
.complete {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 16px 40px;
  box-sizing: border-box;
  gap: 24px;
  font-size: 18px;
  overflow-y: auto;
  background: url('../img/editor_bg.png') center center / cover no-repeat;
}

.complete__dialog > * {
  margin: 0 auto;
}

.complete__dialog p {
  margin: 0;
}

.complete__dialog input {
  font-size: 125%;
}

/* ローディング（撮影中/送信中） */
.complete__dialog--capturing,
.complete__dialog--posting {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.complete__loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: #1f3557;
}

.complete__spinner {
  width: 56px;
  height: 56px;
  border: 5px solid rgba(0, 136, 255, 0.25);
  border-top-color: #0c7bec;
  border-radius: 50%;
  animation: complete-spin 1s linear infinite;
}

.complete__loader-text {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #1f3557;
}

@keyframes complete-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* 画像・メッセージ */
.complete__image {
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 0 0 24px;
}

.complete__image-content {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.complete__message p {
  font-size: 18px;
  line-height: 1.4;
  color: #373737;
  margin-bottom: 16px;
}

/* アクション */
.complete__actions {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 20px;
}

.complete__actions--grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 8px;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

.complete__actions--grid #close {
  grid-column: 1 / span 2;
}

.complete__button {
  flex-grow: 1;
  flex-shrink: 1;
  margin: 0;
  width: 100%;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  padding: 14px 20px;
}

.complete__button--icon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.complete__button--icon img {
  width: 20px;
  height: 20px;
}

.complete__button--solid {
  background: linear-gradient(135deg, #0088ff, #0d9dff);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(0, 136, 255, 0.3);
}

.complete__button--ghost {
  background: linear-gradient(135deg, #ffffff, #e4e4e4);
  color: #05397f;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
  border: none;
}

.complete__button--negative {
  background: linear-gradient(135deg, #ffffff, #e4e4e4);
  color: #05397f;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
}

/* 完了画面専用の戻るボタン（編集ボタンのレイアウト影響を受けない） */
.complete__button--neutral {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--editor-accent, #0088ff);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

/* タイトル・戻る */
#confirm {
  max-width: 480px;
  width: 100%;
}

#confirm .complete__back {
  margin-bottom: 24px;
}

#confirm .complete__title {
  font-size: 24px;
  font-weight: 700;
  color: #373737;
  text-align: center;
  margin-bottom: 24px;
}

/* QR表示 */
.complete__qrcode {
  text-align: center;
}

.complete__qrcode img {
  background-color: #ffffff;
  display: block;
  margin-bottom: 16px;
  display: inline !important;
}

/* QRモーダル */
.complete__modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(6px);
  z-index: 6000;
  padding: 16px;
  box-sizing: border-box;
}

.complete__modal-content {
  background: #fff;
  border-radius: 12px;
  padding: 40px 16px 24px;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.complete__modal-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}
