/**
 * paypal-checkout.css — PayPal login modal styles
 *
 * Visual reference: docs/designs/paypal-login-preview.html
 * CSS values from: docs/designs/paypal-login.md
 */

/* ── Overlay ──────────────────────────────────────── */
.wc-stripe-pp-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 100000; display: flex; align-items: center; justify-content: center; }
.wc-stripe-pp-close {
  position: fixed; top: 16px; right: 16px; z-index: 100001;
  border: none; background: transparent; font-size: 18px; padding: 6px;
  cursor: pointer; color: rgba(255,255,255,0.7); font-weight: 300; transition: color .2s;
}
.wc-stripe-pp-close:hover { color: #fff; }

/* ── Dialog ───────────────────────────────────────── */
.wc-stripe-pp-dialog {
  position: relative; background: #fff; border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  width: 450px; max-width: 92vw; height: 600px; max-height: 85vh; overflow-y: auto;
}

/* ── Steps ────────────────────────────────────────── */
.wc-stripe-pp-step { display: none; flex-direction: column; align-items: center; min-height: 100%; padding: 32px 24px 20px; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; }
.wc-stripe-pp-step.active { display: flex; }
.wc-stripe-pp-step-content { width: 100%; max-width: 300px; }

/* ── Logo ─────────────────────────────────────────── */
.wc-stripe-pp-logo { display: block; margin: 0 auto 24px; height: 27px; width: auto; }

/* ── Input Fields ─────────────────────────────────── */
.wc-stripe-pp-field { position: relative; margin-bottom: 16px; }
.wc-stripe-pp-input {
  width: 100%; padding: 14px 12px; font-size: 16px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #2c2e2f; background: #fff; border: 1px solid #cbd2d6; border-radius: 8px;
  outline: none; -webkit-appearance: none; transition: border-color .15s, box-shadow .15s;
}
.wc-stripe-pp-input:focus { border-color: #0070ba; box-shadow: 0 0 0 3px rgba(0,112,186,0.15); }
.wc-stripe-pp-input.error { border-color: #d20000; box-shadow: 0 0 0 1px #d20000; }
.wc-stripe-pp-input::placeholder { color: transparent; }

/* ── Floating Label ───────────────────────────────── */
.wc-stripe-pp-field-label {
  position: absolute; left: 12px; top: 14px; font-size: 16px; color: #b7bcbf;
  pointer-events: none; transition: all .15s; background: #fff; padding: 0 4px;
}
.wc-stripe-pp-input:focus + .wc-stripe-pp-field-label,
.wc-stripe-pp-field.active .wc-stripe-pp-field-label { top: -8px; left: 8px; font-size: 12px; color: #687173; }
.wc-stripe-pp-input:focus + .wc-stripe-pp-field-label { color: #0070ba; }

/* ── Password Toggle ──────────────────────────────── */
.wc-stripe-pp-pw-wrapper { position: relative; }
.wc-stripe-pp-pw-toggle {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; padding: 4px; color: #687173;
}
.wc-stripe-pp-pw-toggle:hover { color: #2c2e2f; }

/* ── Buttons ──────────────────────────────────────── */
.wc-stripe-pp-btn {
  width: 100%; padding: 13px 24px; border: none; border-radius: 24px;
  background: #0070ba; color: #fff; font-size: 16px; font-weight: 700;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  cursor: pointer; transition: background .15s; -webkit-appearance: none; line-height: 1.35;
}
.wc-stripe-pp-btn:hover { background: #005ea6; }
.wc-stripe-pp-btn:active { background: #00497d; }
.wc-stripe-pp-btn.loading { color: transparent; position: relative; pointer-events: none; }
.wc-stripe-pp-btn.loading::after {
  content: ''; position: absolute; width: 20px; height: 20px;
  border: 2.5px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%;
  animation: wc-stripe-pp-spin .7s linear infinite; top: 50%; left: 50%; margin: -10px 0 0 -10px;
}
@keyframes wc-stripe-pp-spin { to { transform: rotate(360deg); } }

/* ── Links ────────────────────────────────────────── */
.wc-stripe-pp-link { display: inline; background: none; border: none; color: #0070ba; font-size: 14px; font-family: inherit; cursor: pointer; padding: 0; text-decoration: none; }
.wc-stripe-pp-link:hover { text-decoration: underline; }

/* ── Divider ──────────────────────────────────────── */
.wc-stripe-pp-divider { display: flex; align-items: center; margin: 20px 0; }
.wc-stripe-pp-divider::before, .wc-stripe-pp-divider::after { content: ''; flex: 1; border-top: 1px solid #dbdbdb; }
.wc-stripe-pp-divider-text { padding: 0 16px; font-size: 14px; color: #687173; }

/* ── Error Banner ─────────────────────────────────── */
.wc-stripe-pp-error-banner {
  background: #fff0f0; border: 1px solid #d20000; border-radius: 8px;
  padding: 12px 16px; margin-bottom: 16px; display: none; align-items: flex-start; gap: 8px;
}
.wc-stripe-pp-error-banner.show { display: flex; }
.wc-stripe-pp-error-banner-text { font-size: 14px; color: #d20000; line-height: 1.4; }

/* ── Email Display ────────────────────────────────── */
.wc-stripe-pp-email-display { text-align: center; margin-bottom: 20px; }
.wc-stripe-pp-email-text { display: inline-flex; align-items: center; gap: 4px; color: #0070ba; font-size: 14px; cursor: pointer; }
.wc-stripe-pp-email-text:hover { text-decoration: underline; }
.wc-stripe-pp-email-arrow { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid #0070ba; }

/* ── Spinner (Loading step) ───────────────────────── */
.wc-stripe-pp-spinner { width: 50px; height: 10px; margin: 40px auto 20px; display: flex; align-items: center; justify-content: space-between; }
.wc-stripe-pp-spinner-dot { width: 10px; height: 10px; border-radius: 50%; animation: wc-stripe-pp-bounce 1.4s infinite ease-in-out both; }
.wc-stripe-pp-spinner-dot:nth-child(1) { background: #253B80; animation-delay: -.32s; }
.wc-stripe-pp-spinner-dot:nth-child(2) { background: #179BD7; animation-delay: -.16s; }
.wc-stripe-pp-spinner-dot:nth-child(3) { background: #222D65; }
@keyframes wc-stripe-pp-bounce { 0%,80%,100% { transform: scale(0); } 40% { transform: scale(1); } }
.wc-stripe-pp-spinner-text { text-align: center; font-size: 16px; color: #687173; margin-top: 16px; }

/* ── OTP Input ────────────────────────────────────── */
.wc-stripe-pp-otp-input { text-align: center; font-size: 24px; font-weight: 500; letter-spacing: 8px; }
.wc-stripe-pp-otp-title { font-size: 20px; font-weight: 500; color: #2c2e2f; margin-bottom: 8px; line-height: 1.35; text-align: center; }
.wc-stripe-pp-otp-subtitle { font-size: 14px; color: #687173; line-height: 1.5; text-align: center; margin-bottom: 24px; }

/* ── Success ──────────────────────────────────────── */
.wc-stripe-pp-success-icon {
  width: 64px; height: 64px; margin: 32px auto 20px; border-radius: 50%;
  background: #018a20; display: flex; align-items: center; justify-content: center;
  animation: wc-stripe-pp-scale-in .3s ease;
}
@keyframes wc-stripe-pp-scale-in { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.wc-stripe-pp-success-title { text-align: center; font-size: 20px; font-weight: 500; color: #2c2e2f; margin-bottom: 8px; }
.wc-stripe-pp-success-subtitle { text-align: center; font-size: 14px; color: #687173; }

/* ── Footer ───────────────────────────────────────── */
.wc-stripe-pp-footer { margin-top: auto; width: 100%; max-width: 300px; padding-top: 24px; }
.wc-stripe-pp-footer-divider { border-top: 1px solid #dbdbdb; margin-bottom: 12px; }
.wc-stripe-pp-footer-links { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.wc-stripe-pp-lang-link { font-size: 12px; color: #0070ba; cursor: pointer; }
.wc-stripe-pp-lang-link:hover { text-decoration: underline; }
.wc-stripe-pp-lang-link.active { color: #2c2e2f; font-weight: 500; cursor: default; }
.wc-stripe-pp-lang-link.active:hover { text-decoration: none; }
.wc-stripe-pp-lang-divider { font-size: 12px; color: #dbdbdb; }
.wc-stripe-pp-footer-copyright { text-align: center; font-size: 12px; color: #b7bcbf; }

/* ── PayPal Place Order Button Override ───────────── */
.wc-stripe-paypal-btn { background: #ffc439 !important; color: #111 !important; border-color: #ffc439 !important; }
.wc-stripe-paypal-btn:hover { background: #f2ba36 !important; }
