@import url("https://voi.0101.co.jp/voi/content/dam/01/renew/common/style/variables.css");

/* =========================
  ボタン
========================= */
[data-component-button] * {
  all: revert-layer !important;
}

@layer component-button {
  [data-component-button] {
    .wc-btn-wrapper {
      display: flex;
      justify-content: center;
      margin-bottom: 30px;
    }
    .wc-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      text-align: center;
      padding: 15px 20px;
      border-radius: 6px;
      font-size: 14px;
      font-weight: bold;
      font-family:
        "Hiragino Kaku Gothic ProN",
        "Hiragino Kaku Gothic Pro W3",
        "Hiragino Sans",
        "Noto Sans JP",
        -apple-system,
        blinkmacsystemfont,
        roboto,
        meiryo,
        arial,
        sans-serif;
      text-decoration: none;
      color: var(--neutral-white);
      background-color: var(--main-purple);
      min-width: 335px;
      max-width: 335px;
      cursor: pointer;
      width: 100%;
      height: 50px;
      border: none;
      box-shadow: 0 4px 6px 0 rgba(0, 0, 0, 0.25);
      --size: 16px;
      --dot: calc(var(--size) * 0.16);
      --border: calc(var(--size) * 0.16);
      --color: var(--neutral-white);
    }
    .wc-btn::after {
      display: none;
    }
    .wc-btn.loading {
      pointer-events: none;
      cursor: not-allowed;
    }

    .wc-btn.disabled {
      background-color: var(--neutral-gray-200);
      color: var(--neutral-white) !important;
      cursor: not-allowed;
      pointer-events: none;
      --color: var(--neutral-white);
    }
    .wc-btn--coupon-prefix {
      display: flex;
      justify-content: center;
      align-items: center;
    }
    .wc-loader {
      width: var(--size);
      aspect-ratio: 1;
      border-radius: 50%;

      background:
        radial-gradient(farthest-side, var(--color) 94%, #0000) top/var(--dot)
          var(--dot) no-repeat,
        conic-gradient(#0000 30%, var(--color));

      -webkit-mask: radial-gradient(
        farthest-side,
        #0000 calc(100% - var(--border)),
        #000 0
      );

      animation: l13 1s infinite linear;
    }
    @keyframes l13 {
      100% {
        transform: rotate(1turn);
      }
    }
    .animated-check {
      display: block;
      width: 20px;
      height: 20px;
      flex-shrink: 0;
    }

    @media screen and (min-width: 641px) {
      .wc-btn {
        width: 100%;
        min-width: 340px;
        max-width: 340px;
      }
    }
  }
}
/* エラーモーダルのオーバーレイ */
.error-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.error-modal-overlay.show {
  opacity: 1;
}

/* モーダル本体 */
.error-modal {
  background: #ffffff;
  border-radius: 12px;
  max-width: 335px;
  width: 90%;
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.3s ease;
  font-family:
    "Hiragino Kaku Gothic ProN",
    "Hiragino Kaku Gothic Pro W3",
    "Hiragino Sans",
    "Noto Sans JP",
    -apple-system,
    blinkmacsystemfont,
    roboto,
    meiryo,
    arial,
    sans-serif;
}

.error-modal-inner {
  display: flex;
  flex-direction: column;
  padding: 30px 20px 20px 20px;
}

.error-modal-overlay.show .error-modal {
  transform: scale(1);
}

/* エラーアイコン */
.error-modal-icon {
  font-size: 48px;
  margin-bottom: 16px;
  animation: shake 0.5s ease;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-10px);
  }
  75% {
    transform: translateX(10px);
  }
}

/* タイトル */
.error-modal-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 14px;
  font-weight: bold;
  color: #ff5c5a;
  margin-bottom: 15px;
  line-height: 24px;
  text-align: center;
  letter-spacing: 0.7px;
}

/* メッセージ */
.error-modal-message {
  font-size: 12px;
  color: var(--neutral-gray-900);
  line-height: 23px;
  text-align: center;
}

.error-modal-link {
  font-size: 14px;
  box-sizing: border-box !important;
  line-height: 20px;
  padding: 15px 20px;
  border-radius: 6px;
  border: 1px solid #333;
  background-color: #fff;
  color: #333;
  text-decoration: none !important;
  max-height: 50px;
  text-align: center;
  width: 100%;
  margin-top: 15px;
}

.error-modal-bottom {
  height: 50px;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  border-top: 1px solid var(--neutral-gray-200);
  overflow: hidden;
}

/* OKボタン */
.error-modal-button {
  color: var(--neutral-gray-900);
  border: none;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  background-color: var(--neutral-white);
  width: 100%;
  height: 100%;
  transition: background-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.error-modal-button:hover {
  background-color: var(--neutral-gray-50);
}

.error-modal-button:active {
  background-color: var(--neutral-gray-50);
}

/* WebView用の追加調整 */
@media (max-width: 480px) {
  .error-modal {
    max-width: 375px;
  }

  .error-modal-icon {
    font-size: 40px;
  }

  .error-modal-title {
    font-size: 16px;
  }

  .error-modal-message {
    font-size: 14px;
    line-height: 24px;
  }
}
