/* ============================================
   Payment Page Styles - OtasukeAI
   Angular / Monochrome + Blue accent design
   ============================================ */

/* ---- Page Layout ---- */
.payment-page {
  min-height: 100vh;
  background: #ffffff;
}

.payment-hero {
  background: #111111;
  padding: 64px 0 56px;
  text-align: center;
  color: #ffffff;
  border-bottom: 4px solid #0066CC;
}

.payment-hero h1 {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 2.25rem;
  font-weight: 900;
  margin-bottom: 12px;
  letter-spacing: 0.04em;
}

.payment-hero p {
  font-size: 1.05rem;
  color: #999999;
  font-weight: 400;
}

/* ---- Plan Cards ---- */
.plans-section {
  padding: 64px 0 80px;
  background: #f7f7f7;
}

.plan-card {
  background: #ffffff;
  border-radius: 0;
  border: 1px solid #e0e0e0;
  padding: 40px 28px 36px;
  text-align: center;
  transition: border-color 0.3s, box-shadow 0.3s;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.plan-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #cccccc;
  transition: background 0.3s;
}

.plan-card:hover {
  border-color: #999999;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.plan-card:hover::before {
  background: #666666;
}

.plan-card.recommended {
  border: 2px solid #0066CC;
}

.plan-card.recommended::before {
  height: 4px;
  background: #0066CC;
}

.plan-badge {
  display: inline-block;
  background: #333333;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 20px;
  border-radius: 0;
  margin-bottom: 20px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.plan-badge.badge-recommended {
  background: #0066CC;
  color: #ffffff;
}

.plan-name {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #111111;
  margin-bottom: 12px;
  position: static;
}

.plan-name:after {
  display: none;
}

.plan-price {
  font-family: 'DM Sans', 'Noto Sans JP', sans-serif;
  margin-bottom: 4px;
}

.plan-price .amount {
  font-size: 3.2rem;
  font-weight: 900;
  color: #111111;
  line-height: 1.3;
}

.plan-card.recommended .plan-price .amount {
  color: #0066CC;
}

.plan-price .currency {
  font-size: 1rem;
  font-weight: 700;
  color: #555555;
}

.plan-price-note {
  font-size: 0.8rem;
  color: #999999;
  margin-bottom: 20px;
}

.plan-divider {
  border: none;
  border-top: 1px solid #e5e5e5;
  margin: 0 0 24px 0;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 28px 0;
  text-align: left;
  flex-grow: 1;
}

.plan-features li {
  padding: 9px 0;
  font-size: 0.95rem;
  color: #333333;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-bottom: 1px solid #f0f0f0;
}

.plan-features li:last-child {
  border-bottom: none;
}

.plan-features li::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 18px;
  min-width: 18px;
  background: #0066CC;
  border-radius: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polylyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 11px;
  margin-top: 3px;
}

.plan-cta-btn {
  display: block;
  width: 100%;
  padding: 14px 24px;
  border: 2px solid #111111;
  border-radius: 0;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  color: #111111;
  background: #ffffff;
  letter-spacing: 0.04em;
}

.plan-cta-btn:hover {
  background: #111111;
  color: #ffffff;
}

.plan-card.recommended .plan-cta-btn {
  background: #0066CC;
  color: #ffffff;
  border-color: #0066CC;
}

.plan-card.recommended .plan-cta-btn:hover {
  background: #004d99;
  border-color: #004d99;
}

/* ---- Modal ---- */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: #ffffff;
  border-radius: 0;
  padding: 44px 40px;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  border: 1px solid #e0e0e0;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: 1px solid #e0e0e0;
  font-size: 1.4rem;
  cursor: pointer;
  color: #666666;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  transition: all 0.2s;
}

.modal-close:hover {
  background: #111111;
  color: #ffffff;
  border-color: #111111;
}

.modal-title {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #111111;
  margin-bottom: 6px;
}

.modal-plan-info {
  font-size: 0.95rem;
  color: #0066CC;
  font-weight: 700;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 2px solid #111111;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: #333333;
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.form-group label .required {
  color: #0066CC;
  font-size: 0.7rem;
  margin-left: 6px;
  font-weight: 700;
}

.form-group input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d0d0d0;
  border-radius: 0;
  font-size: 0.95rem;
  font-family: 'Noto Sans JP', sans-serif;
  transition: border-color 0.2s;
  box-sizing: border-box;
  background: #fafafa;
}

.form-group input:focus {
  outline: none;
  border-color: #0066CC;
  background: #ffffff;
}

.form-group input.error {
  border-color: #cc0000;
}

.form-error {
  font-size: 0.8rem;
  color: #cc0000;
  margin-top: 4px;
  display: none;
}

.form-error.visible {
  display: block;
}

.payment-methods {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-credit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px 24px;
  border: none;
  border-radius: 0;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  background: #0066CC;
  color: #ffffff;
  transition: background 0.2s;
  letter-spacing: 0.04em;
}

.btn-credit:hover {
  background: #004d99;
}

.btn-credit:disabled,
.btn-invoice:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-invoice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px 24px;
  border: 2px solid #333333;
  border-radius: 0;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  background: #ffffff;
  color: #333333;
  transition: all 0.2s;
  letter-spacing: 0.04em;
}

.btn-invoice:hover {
  background: #111111;
  color: #ffffff;
  border-color: #111111;
}

.invoice-form-heading {
  font-size: 0.9rem;
  color: #555555;
  font-weight: 500;
  margin-bottom: 20px;
}

.btn-back {
  display: block;
  width: 100%;
  padding: 12px 24px;
  border: 1px solid #d0d0d0;
  border-radius: 0;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  background: #ffffff;
  color: #666666;
  transition: all 0.2s;
  text-align: center;
}

.btn-back:hover {
  background: #f5f5f5;
  border-color: #999999;
  color: #333333;
}

/* ---- Success & Cancel Pages ---- */
.result-page {
  min-height: 100vh;
  background: #f7f7f7;
  display: flex;
  align-items: center;
  justify-content: center;
}

.result-card {
  background: #ffffff;
  border-radius: 0;
  padding: 64px 48px;
  max-width: 560px;
  width: 100%;
  text-align: center;
  border: 1px solid #e0e0e0;
  margin: 20px;
}

.result-icon {
  width: 72px;
  height: 72px;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 28px;
}

.result-icon.success {
  background: #111111;
}

.result-icon.cancel {
  background: #f7f7f7;
  border: 2px solid #cccccc;
}

.result-card h1 {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #111111;
  margin-bottom: 16px;
}

.result-card p {
  font-size: 0.95rem;
  color: #666666;
  line-height: 1.9;
  margin-bottom: 36px;
}

.result-btn {
  display: inline-block;
  padding: 14px 44px;
  border-radius: 0;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  color: #ffffff;
  background: #0066CC;
  transition: background 0.2s;
  letter-spacing: 0.04em;
}

.result-btn:hover {
  background: #004d99;
  color: #ffffff;
  text-decoration: none;
}

.result-btn-outline {
  display: inline-block;
  padding: 14px 44px;
  border-radius: 0;
  border: 2px solid #333333;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  color: #333333;
  background: #ffffff;
  transition: all 0.2s;
  margin-left: 12px;
  letter-spacing: 0.04em;
}

.result-btn-outline:hover {
  background: #111111;
  color: #ffffff;
  border-color: #111111;
  text-decoration: none;
}

/* ---- Loading Spinner ---- */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.6s linear infinite;
}

.btn-invoice .spinner {
  border: 2px solid rgba(51, 51, 51, 0.3);
  border-top-color: #333333;
}

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

/* ---- Toast notification ---- */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #111111;
  color: #ffffff;
  padding: 14px 28px;
  border-radius: 0;
  font-size: 0.95rem;
  font-weight: 500;
  z-index: 10001;
  opacity: 0;
  transition: all 0.3s;
  border-left: 4px solid #0066CC;
}

.toast.toast-success {
  border-left-color: #2D8B4E;
}

.toast.toast-error {
  border-left-color: #cc0000;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---- Responsive ---- */
@media (max-width: 991px) {
  .payment-hero h1 {
    font-size: 1.75rem;
  }
  .plan-card {
    margin-bottom: 24px;
  }
}

@media (max-width: 767px) {
  .payment-hero {
    padding: 44px 0 40px;
  }
  .payment-hero h1 {
    font-size: 1.5rem;
  }
  .plans-section {
    padding: 40px 0 60px;
  }
  .modal-content {
    padding: 28px 20px;
  }
  .result-card {
    padding: 40px 24px;
  }
  .result-btn,
  .result-btn-outline {
    display: block;
    width: 100%;
    text-align: center;
  }
  .result-btn-outline {
    margin-left: 0;
    margin-top: 12px;
  }
}
