@font-face {
  font-family: "Google Sans";
  src: url("/fonts/GoogleSans/GoogleSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Google Sans";
  src: url("/fonts/GoogleSans/GoogleSans-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Google Sans";
  src: url("/fonts/GoogleSans/GoogleSans-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Google Sans";
  src: url("/fonts/GoogleSans/GoogleSans-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --foreground: #222222;
  --muted-foreground: #666666;
  --primary: #000000;
  --primary-foreground: #ffffff;
  --input-fill: #efefef;
  --input-border: #efefef;
  --gray-100: #f3f4f6;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --red-50: #fef2f2;
  --red-200: #fecaca;
  --red-500: #ef4444;
  --red-700: #b91c1c;
  --font-sans: "Google Sans", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--foreground);
  background: #f8f8f8;
  -webkit-font-smoothing: antialiased;
}

.payment-page {
  padding: 1.5rem 1.25rem 3rem;
}

@media (min-width: 640px) {
  .payment-page {
    padding: 2rem 2rem 3rem;
  }
}

@media (min-width: 1024px) {
  .payment-page {
    padding: 2.5rem 3rem 3rem;
  }
}

.payment-form-root {
  margin: 0 auto;
  width: 100%;
  max-width: 620px;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.payment-banner {
  margin-bottom: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--red-700);
  background: var(--red-50);
  border: 1px solid var(--red-200);
  border-radius: 0.75rem;
}

.payment-banner[hidden] {
  display: none !important;
}

.payment-banner-title {
  margin: 0;
  font-weight: 500;
}

.payment-banner-body {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
}

.fields-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.field-block {
  display: flex;
  flex-direction: column;
}

.field-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
}

.field-label .req {
  color: var(--red-500);
}

/* Matches Tailwind/shadcn outline-none: no ring box-shadow; border shows focus (focus:border-primary). */
.input-filled,
.select-filled {
  width: 100%;
  height: 3rem;
  padding: 0 1rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--foreground);
  background: var(--input-fill);
  border: 1px solid var(--input-border);
  border-radius: 0.75rem;
  outline: 2px solid #0000;
  outline-offset: 2px;
  transition: border-color 0.15s ease;
}

.input-filled::placeholder {
  color: var(--gray-500);
}

.input-filled:focus,
.input-filled:focus-visible,
.select-filled:focus,
.select-filled:focus-visible {
  border-color: var(--primary);
}

.input-filled.is-invalid,
.select-filled.is-invalid {
  border-color: var(--red-500);
}

.input-filled.is-invalid:focus,
.input-filled.is-invalid:focus-visible,
.select-filled.is-invalid:focus,
.select-filled.is-invalid:focus-visible {
  border-color: var(--red-500);
}

.select-filled {
  padding-right: 2.5rem;
  padding-left: 1rem;
  cursor: pointer;
  appearance: none;
  background-color: var(--input-fill);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.field-error {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--red-500);
}

.field-error[hidden] {
  display: none !important;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.grid-2-responsive {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .grid-2-responsive {
    grid-template-columns: 1fr 1fr;
  }
}

.price-summary {
  padding: 1rem 1rem;
  font-size: 0.875rem;
  color: var(--gray-700);
  background: var(--gray-100);
  border: 0;
  border-radius: 22px;
}

@media (min-width: 640px) {
  .price-summary {
    padding: 1.25rem 1.25rem;
  }
}

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.price-row-label {
  color: var(--gray-500);
}

.price-row-value {
  font-size: 1.25rem;
  font-weight: 500;
}

.price-note {
  margin: 0.75rem 0 0;
  font-size: 0.75rem;
  color: var(--gray-600);
}

.actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 0.5rem;
}

.btn-text {
  padding: 0.25rem 0.5rem;
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  color: var(--muted-foreground);
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 0.375rem;
}

.btn-text:hover {
  color: var(--foreground);
}

.btn-text:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.btn-primary {
  min-width: 112px;
  padding: 0.75rem 2rem;
  font-size: 1.125rem;
  font-weight: 500;
  font-family: inherit;
  line-height: 1.25;
  color: var(--primary-foreground);
  background: var(--primary);
  border: none;
  border-radius: 18px;
  cursor: pointer;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-primary:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.btn-primary:disabled {
  opacity: 0.5;
  pointer-events: none;
}

.state-slot [hidden] {
  display: none !important;
}
