/* styles.css */

* { box-sizing: border-box; }

body {
  background: #f6f9fc;
  font-family: system-ui, -apple-system;
}

/* Layout */
.checkout {
  max-width: 980px;
  margin: 60px auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: white;
  border-radius: 8px;
  overflow: hidden;
}

.summary {
  padding: 40px;
  background: #fafafa;
}

.payment {
  padding: 40px;
}

/* Left side */
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo {
  width: 28px;
  height: 28px;
  background: #111;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.test {
  background: #ffe3a3;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
}

h1 {
  font-size: 32px;
  margin: 12px 0 24px;
}

.item, .total {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.divider {
  height: 1px;
  background: #e6ebf1;
  margin: 24px 0;
}

/* Right side */
.apple-pay {
  width: 100%;
  background: black;
  color: white;
  padding: 14px;
  border-radius: 6px;
  border: none;
  font-size: 16px;
  margin-bottom: 16px;
  cursor: pointer;
}

.or {
  text-align: center;
  color: #8898aa;
  margin-bottom: 16px;
}

label {
  font-size: 13px;
  margin-top: 16px;
  display: block;
}

input, select {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccd0d5;
  border-radius: 6px;
  margin-top: 6px;
}

/* --- Stripe-style grouped card field --- */

.field-label{
  display:block;
  font-size:13px;
  margin:16px 0 6px;
  color:#111827;
}

.card-fieldset{
  width: 100%;
  border:1px solid #ccd0d5;
  border-radius:6px;
  overflow:hidden;
  background:#fff;
}

.card-fieldset:focus-within{
  border-color:#93c5fd;
  box-shadow:0 0 0 3px rgba(59,130,246,.15);
}

.card-row{
  display:flex;
  align-items:center;
  height:40px;
}

.card-row-top{
  padding-right:8px;
}

.card-input{
  flex:1;
  height:100%;
  border:0 !important;
  outline:0;
  padding:0 12px;
  margin:0 !important;
  border-radius:0 !important;
  background:transparent;
  font-size:13px;
  color:#111827;
}

.card-input::placeholder{
  color:#9ca3af;
}

.card-icons{
  display:flex;
  align-items:center;
  gap:6px;
  padding-left:8px;
  padding-right:4px;
}

/* icon placeholders */
.card-icons img{
  display:block;
  height:14px;
  width:auto;
}

.icon-visa{
  height:14px;
  padding:2px 6px;
  background:#fff;
}

.icon-brand{
  height:14px;
  width:18px;
  object-fit:contain;
}

.card-h-divider{
  height:1px;
  background:#ccd0d5;
}

.card-row-bottom{
  padding:0;
}

.card-v-divider{
  width:1px;
  height:100%;
  background:#ccd0d5;
}

.cvc-wrap{
  flex:1;
  display:flex;
  align-items:center;
}

.cvc-icon-img{
  height:16px;
  width:16px;
  object-fit:contain;
  margin-right:10px;
  opacity:.75;
}

/* Pay button */
#submit {
  margin-top: 24px;
  width: 100%;
  padding: 14px;
  background: #000000;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
}

.cvc-wrap {
  position: relative;
  flex: 1;              /* keeps it sizing nicely in your row */
}

.cvc-wrap .card-input {
  width: 100%;
  padding-right: 56px;  /* space so text doesn’t overlap icon */
}

.cvc-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.6;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  color: #111;          /* matches input icon color */
}


.brand{
  display:flex;
  align-items:center;
  gap:10px;
}

.logo-badge{
  width:28px;          /* match screenshot */
  height:28px;
  border-radius:999px;
  background:#111;
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 28px;
}

.infinity-svg{
  width:16px;
  height:16px;
  color:#fff;          /* makes stroke white */
}

/* =========================
   Mobile layout fixes
   Paste at the BOTTOM
   ========================= */

.checkout{
  width: calc(100% - 24px);
  max-width: 520px;         /* prevents giant stretched look on phones */
  margin: 18px auto;
  grid-template-columns: 1fr; /* stack summary + payment */
  border-radius: 12px;
}

.summary,
.payment{
  padding: 20px;
}

h1{
  font-size: 28px;
}

/* inputs a bit more touch-friendly */
input, select{
  font-size: 16px; /* prevents iOS zoom-on-focus */
}

/* card field becomes a bit taller on mobile */
.card-row{
  height: 44px;
}

.card-icons img{
  height: 13px;
}

/* keep icons from squeezing the card number on small widths */
.card-icons{
  gap: 5px;
}

/* make sure nothing overflows the screen */
.checkout, .summary, .payment, .card-fieldset{
  max-width: 100%;
}

/* Desktop: go back to 2 columns */
@media (min-width: 900px){
  .checkout{
    max-width: 980px;
    margin: 60px auto;
    grid-template-columns: 1fr 1fr;
    border-radius: 8px;
  }

  .summary,
  .payment{
    padding: 40px;
  }

  h1{
    font-size: 32px;
  }

  .card-row{
    height: 40px;
  }

  .card-icons img{
    height: 14px;
  }
}

.logo { color: #fff; }        /* ensures currentColor is white */
.logo-svg { width:16px; height:16px; display:block; }

.checkout-footer {
  margin-top: 14px;
  text-align: center;
  font-size: 12px;
  color: #6b7c93;
}

.checkout-footer a {
  color: inherit;
  text-decoration: underline;
}

.checkout-legal {
  margin: 8px 0 12px;
}

.checkout-powered {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.checkout-powered strong {
  font-weight: 600;
}

.checkout-sep {
  color: #cfd7df;
}
