/* Checkout — Casa de Ancianos Santiago Apóstol (EUR → CenterPag) */

.checkout-page {
  min-height: 100vh;
  background: linear-gradient(180deg, #faf8f4 0%, #ebe6dc 55%, #e4ddd2 100%);
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #0f172a;
  padding-bottom: 2rem;
  -webkit-font-smoothing: antialiased;
}

.checkout-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.checkout-header__back {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: #f0f4fa;
  color: #0074d9;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.checkout-header__back:hover {
  background: #e0ebf7;
}

.checkout-header__title {
  flex: 1;
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  color: #0f172a;
}

.checkout-logo {
  text-align: center;
  padding: 1rem 1rem 0.5rem;
}

.checkout-logo img {
  max-height: 52px;
  height: auto;
}

.checkout-main {
  max-width: 440px;
  margin: 0 auto;
  padding: 0 1rem 1.5rem;
}

.checkout-step {
  display: none;
  animation: checkoutFade 0.25s ease;
}

.checkout-step.is-active {
  display: block;
}

@keyframes checkoutFade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.checkout-hero {
  text-align: center;
  margin-bottom: 1.25rem;
}

.checkout-hero__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  background: linear-gradient(145deg, #e8f4fc, #cfe4f7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0074d9;
  box-shadow: 0 4px 14px rgba(0, 116, 217, 0.12);
}

.checkout-hero__icon--emoji {
  font-size: 1.65rem;
  line-height: 1;
}

.checkout-hero h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 0.35rem;
  line-height: 1.25;
}

.checkout-hero p {
  margin: 0;
  color: #64748b;
  font-size: 0.95rem;
}

.checkout-card {
  background: #fff;
  border-radius: 16px;
  padding: 1.1rem;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06), 0 1px 0 rgba(255, 255, 255, 0.8) inset;
  border: 1px solid rgba(0, 116, 217, 0.1);
  margin-bottom: 1rem;
}

.checkout-amounts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.55rem;
}

.checkout-amount-btn {
  padding: 0.85rem 0.5rem;
  border-radius: 10px;
  border: 2px solid #c8d9ff;
  background: #f8fbff;
  color: #004aad;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.checkout-amount-btn:hover {
  border-color: #0074d9;
  background: #eef6ff;
}

.checkout-amount-btn.is-selected {
  background: #0074d9;
  border-color: #0074d9;
  color: #fff;
}

.checkout-custom {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.checkout-custom label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
}

.checkout-custom-row {
  display: flex;
  align-items: center;
  border: 2px solid #c8d9ff;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.checkout-custom-row span {
  padding: 0.65rem 0.85rem;
  background: #eaf2ff;
  font-weight: 700;
  color: #004aad;
  border-right: 1px solid #c8d9ff;
}

.checkout-custom-row input {
  flex: 1;
  border: none;
  padding: 0.65rem;
  font-size: 1rem;
  min-width: 0;
}

.checkout-custom-row input:focus {
  outline: none;
}

.checkout-custom-hint {
  margin: 0.4rem 0 0;
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.35;
}

.checkout-btn-primary {
  width: 100%;
  margin-top: 1.25rem;
  padding: 0.95rem 1rem;
  border: none;
  border-radius: 12px;
  background: #0074d9;
  color: #fff;
  font-family: inherit;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.checkout-btn-primary:active:not(:disabled) {
  transform: scale(0.99);
}

.checkout-btn-primary:hover:not(:disabled) {
  background: #005fa8;
}

.checkout-btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.checkout-btn-primary.is-loading {
  background: #005fa8;
  animation: btnPulse 1.5s ease-in-out infinite;
}

@keyframes btnPulse {
  0%, 100% { opacity: 0.65; }
  50% { opacity: 0.85; }
}

.checkout-option {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  width: 100%;
  text-align: left;
  padding: 1rem;
  margin-bottom: 0.65rem;
  border-radius: 12px;
  border: 2px solid #e2e8f0;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.checkout-option:last-of-type {
  margin-bottom: 0;
}

.checkout-option:hover {
  border-color: #94a3b8;
}

.checkout-option.is-selected {
  border-color: #0074d9;
  background: linear-gradient(180deg, #f5f9ff 0%, #eef6ff 100%);
  box-shadow: 0 0 0 2px rgba(0, 116, 217, 0.2);
}

.checkout-option__ico {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #e8f4fc;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #0074d9;
}

.checkout-option__svg {
  display: block;
}

.checkout-option.is-selected .checkout-option__ico {
  background: #0074d9;
  color: #fff;
}

.checkout-option__text strong {
  display: block;
  font-size: 1rem;
  color: #0f172a;
  margin-bottom: 0.2rem;
}

.checkout-option__text span {
  font-size: 0.88rem;
  color: #64748b;
  line-height: 1.35;
}

.checkout-summary {
  background: #f8fafc;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin-top: 1rem;
  font-size: 0.95rem;
}

.checkout-summary__row {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0;
  color: #475569;
}

.checkout-summary__row strong {
  color: #0f172a;
}

.checkout-summary__total {
  border-top: 1px solid #e2e8f0;
  margin-top: 0.35rem;
  padding-top: 0.5rem;
  font-weight: 700;
  color: #0f172a;
}

.checkout-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.85rem;
}

.checkout-field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
}

.checkout-field input {
  border: 2px solid #c8d9ff;
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  font-size: 1rem;
}

.checkout-field input:focus {
  outline: none;
  border-color: #0074d9;
  box-shadow: 0 0 0 3px rgba(0, 116, 217, 0.15);
}

.checkout-field-note {
  font-size: 0.8rem;
  color: #64748b;
  margin: -0.35rem 0 0.85rem;
  line-height: 1.35;
}

.checkout-pay-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin-bottom: 0.35rem;
}

.checkout-pay-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.checkout-pay-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 2px solid #e2e8f0;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.checkout-pay-card:hover {
  border-color: #94a3b8;
}

.checkout-pay-card:focus-visible {
  outline: 2px solid #0074d9;
  outline-offset: 2px;
}

.checkout-pay-card.is-active {
  border-color: #0074d9;
  background: #f0f7ff;
  box-shadow: 0 0 0 2px rgba(0, 116, 217, 0.18);
}

.checkout-pay-logo {
  display: block;
  max-width: 100%;
  width: auto;
  max-height: 44px;
  height: auto;
  object-fit: contain;
  pointer-events: none;
}

.checkout-pay-card:not(.is-active) .checkout-pay-logo {
  opacity: 0.88;
}

.checkout-turbo {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px dashed rgba(0, 116, 217, 0.35);
}

.checkout-turbo__title {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
  font-weight: 800;
  color: #0f172a;
}

.checkout-turbo__text {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  color: #475569;
  line-height: 1.45;
}

.checkout-btn-turbo {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 2px solid #0074d9;
  background: #fff;
  color: #0074d9;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}

.checkout-btn-turbo:hover:not(:disabled) {
  background: #0074d9;
  color: #fff;
}

.checkout-btn-turbo:disabled,
.checkout-btn-turbo.is-used {
  opacity: 0.55;
  cursor: default;
}

.checkout-turbo__done {
  margin: 0.65rem 0 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: #0d7a52;
}

.checkout-loading {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  color: #0074d9;
}

.checkout-loading.is-visible {
  display: flex;
}

.checkout-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #c8d9ff;
  border-top-color: #0074d9;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.checkout-donation-line {
  text-align: center;
  font-size: 0.95rem;
  color: #475569;
  margin-bottom: 0.75rem;
}

.checkout-donation-line strong {
  color: #0074d9;
  font-size: 1.05rem;
}

/* Página Obrigado / contribuição confirmada */
.obrigado-page .checkout-header__title {
  text-align: center;
  padding-right: 40px;
}

.obrigado-wrap {
  max-width: 440px;
  margin: 0 auto;
  padding: 0 1rem 2rem;
}

.obrigado-card {
  background: #fff;
  border-radius: 16px;
  padding: 2rem 1.5rem;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06), 0 1px 0 rgba(255, 255, 255, 0.8) inset;
  border: 1px solid rgba(0, 116, 217, 0.1);
  text-align: center;
}

.obrigado-badge {
  width: 88px;
  height: 88px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: linear-gradient(145deg, #e8f4fc 0%, #d4e9f7 100%);
  border: 3px solid #0074d9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0074d9;
}

.obrigado-badge__svg {
  width: 40px;
  height: 40px;
  display: block;
}

.obrigado-card h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 0.75rem;
  line-height: 1.25;
}

.obrigado-card .obrigado-lead {
  font-size: 1.05rem;
  color: #475569;
  line-height: 1.55;
  margin: 0 0 1.5rem;
}

.obrigado-card .obrigado-note {
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.45;
  margin: 0 0 1.75rem;
  padding: 0.85rem 1rem;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.obrigado-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.obrigado-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.obrigado-btn--primary {
  background: #0074d9;
  color: #fff;
  border: none;
  cursor: pointer;
}

.obrigado-btn--primary:hover {
  background: #005fa8;
  color: #fff;
}

.obrigado-btn--ghost {
  background: transparent;
  color: #0074d9;
  border: 2px solid #c8d9ff;
}

.obrigado-btn--ghost:hover {
  background: #f0f7ff;
}
