/* styles.css */

:root {
  --ui-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto",
             "Helvetica Neue", "Ubuntu", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  font-family: var(--ui-font) !important;
}

body {
  min-height: 100vh;
  margin: 0;
  background: #ffffff;
  font-family: var(--ui-font);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.summary {
  padding: 40px;
  background: transparent;
}
.mobile-price { display: none; }

.payment {
  padding: 30px;
  width: 100%;
  max-width: 420px;   /* 🔑 THIS is the key */
  margin: 0 auto;
}

/* 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: 14px;                 /* slightly bulkier */
  border-radius: 8px;

  background: #fcfcfd;          /* Stripe light gray fill */
  border: 1.9px solid #d1d5db;     /* softer border */

  font-size: 16px;
  font-weight: 500;              /* tiny bit bulky */
  color: #374151;                /* Stripe gray text */

  margin-top: 6px;
}


/* placeholder example text */
input::placeholder,
select::placeholder {
  color:  #585e68;            /* darker gray like Stripe */
  opacity: 1;                  /* IMPORTANT for iPhone Safari */
}


/* labels above inputs */
label,
.field-label {
  color: #374151;
}

/* --- 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:16px;
  line-height: 1.2;
  color:#111827; 
}

.card-input::placeholder{
  color: #585e68;
  opacity:1;
}

.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: 18px;
  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;
  margin-top: 0;
}

.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: 100%;
  max-width: 980px;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: white;
  border-radius: 8px;
  overflow: hidden;
}

.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%;
}

/* MOBILE */

@media (max-width: 640px){
  .checkout {
    width: calc(100% - 0px);   /* 👈 THIS is the “wider on mobile” */
    max-width: 100%;
    margin: 0;
    grid-template-columns: 1fr;
    border-radius: 12px;
  }

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

  h1 {
    font-size: 28px;
  }

  .card-row{
    height: 40px;
  }

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

  .mobile-price{
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: -60px 0 55px; /* nice spacing above Apple Pay */
  }

  .price-label{
    font-size: 15px;
    font-weight: 550;
    color: rgba(0,0,0,0.55);
    margin-bottom: 6px;

  }

  .price-amount{
    font-size: 30px;
    font-weight: 600;
    color: #111;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin: -4px;
    color: rgba(0,0,0,0.95)
  }


}

.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;
}

.section-title {
  font-size: 15px;
      /* semibold, not bold */
  color: #1f2937;      /* Stripe-style dark gray */
  margin-bottom: 8px;
}

label[for="email"]{ margin-top: 0; }
#email{ margin-bottom: 10px; }  /* keeps space before Payment method */



/* Make Country select look like Stripe (single chevron, same height as inputs) */
#country{
  height: 48px;                 /* makes it taller like Stripe */
  font-size: 16px;              /* bigger text */
  color: #111827;
  background: #fff;             /* removes the grayish bar look */
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  padding: 12px 44px 12px 12px; /* right padding for chevron */
  line-height: 1.2;

  -webkit-appearance: none;     /* kills iOS default arrows */
  -moz-appearance: none;
  appearance: none;

  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M6 8l4 4 4-4' stroke='%23111827' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center; /* single arrow */
  background-size: 18px 18px;
}

/* --- Stripe polish override (safe) --- */
.card-fieldset{
  background:#fcfcfd;
  border-color:#d1d5db;
}

.card-fieldset:focus-within{
  background:#fff;
}

.field-label{
  color:#374151;
  font-weight:500;
}

.card-h-divider,
.card-v-divider{
  background:#e5e7eb;
}



/* Force all text */
html, body, input, select, textarea, button, label {
  font-family: var(--ui-font) !important;
  font-weight: 400 !important;
}

/* Placeholders often look “heavier” or different */
input::placeholder,
textarea::placeholder,
select::placeholder {
  font-family: var(--ui-font) !important;
  font-weight: 400 !important;
  opacity: 1;
}

/* Make it *feel* thinner like Stripe */
html, body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Lighter, whiter inputs 
   FINAL OVERRIDES       */
input, select, .card-fieldset{
  background: #ffffff !important;      /* was #fcfcfd */
  border-color: #e5e7eb !important;    /* was #d1d5db */
}


.logo {
  width: 28px;
  height: 28px;
  background: #ffffff;
  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;

  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.12),
    0 2px 6px rgba(0, 0, 0, 0.08);
}

.logo-svg {
  width: 15px;
  height: 15px;
  color: #7a7a7a; /* controls stroke color */
}

.store {

  font-size:15px;
  color: rgba(0, 0, 0, 0.88); /* a touch darker */
  font-weight: 550;          /* medium-ish (not bold) */
}


.stripe-footer{
  margin-top: 1px;
  padding-bottom: 16px;

  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;

  font-size: 12.5px;
  line-height: 1.4;
  color: rgba(0,0,0,0.45);
  flex-wrap: wrap;
}

.powered{
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.stripe-logo{
  height: 21px;      /* 🔑 the “little” size */
  width: auto;
  max-width: 48px;   /* prevents giant logo */
  display: block;    /* fixes baseline weirdness */
  margin-left: -6px
}

.sep{ color: rgba(0,0,0,0.3); font-size: 20px; margin-bottom: 8px; margin-top: 3px; font-weight: 100;}

.stripe-footer a{
  color: rgba(0,0,0,0.45);
  text-decoration: none;
  white-space: nowrap;
}
.stripe-footer a:hover{ text-decoration: underline; }



.apple-pay-btn {
  width: 100%;
  height: 48px;
  border-radius: 10px;
  background: #000;
  color: #fff;
  border: none;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  cursor: not-allowed;
  opacity: 0.65;

  margin: 0 0 10px; /* sits above email nicely */
}

.apple-pay-inner {
  display: flex;
  align-items: center;
  gap: 1px;
  margin: 0 auto;
  margin-top: 2px;
}

.apple-logo {
  width: 25px;
  height: 25px;
  margin-top: -3px;
  margin-right: -1px;
}

.apple-pay-text {
  font-size: 20px;
  margin: 0;
  margin-top: 0px;
}

.apple-pay-note {
  font-size: 11px;
  opacity: 0.75;
  text-align: center;

  margin-top: -5px;
}

/* OR line */
.or-divider {
  position: relative;
  margin: 6px 0 14px;
  text-align: center;
}

.or-divider::before,
.or-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 45%;
  height: 1px;
  background: rgba(0,0,0,0.12);
}

.or-divider::before { left: 0; }
.or-divider::after  { right: 0; }

.or-divider span {
  display: inline-block;
  padding: 0 10px;
  font-size: 12px;
  color: rgba(0,0,0,0.45);
  background: #fff;
}
.checkout-legal a {
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;

    color: rgba(0,0,0,0.55);              /* text */
  text-decoration-color: rgba(0,0,0,0.6); 
}



@media (min-width: 900px) {
  .summary {
    background: #ffffff;
  }

  .checkout {
    max-width: 980px;
    margin: 0;
    display: grid;
    grid-template-columns: 360px 420px;
    gap: 48px;
  }

  .apple-pay-btn {
    display: none;
  }
  
  .apple-pay-note {
    display: none;
  }

  .or-divider {
    display: none;
  }

}


/* Reference structure override */
body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
}

.checkout {
  width: 100%;
  max-width: 1040px;
  min-height: 720px;
  margin: 0;
  display: grid;
  grid-template-columns: minmax(360px, 1fr) 420px;
  gap: 48px;
  border-radius: 0;
  overflow: visible;
}

.summary {
  min-height: 720px;
  padding: 48px 48px 40px;
  background: #ffffff;
}

.payment {
  width: 100%;
  max-width: 420px;
  min-height: 720px;
  padding: 48px 0 24px;
  margin: 0;
  display: flex;
  flex-direction: column;
}

#payment-form {
  width: 100%;
}

.checkout-footer {
  margin-top: auto;
}

@media (min-width: 900px) {
  .label {
    margin-top: 92px;
    font-size: 15px;
    color: rgba(0,0,0,0.58);
  }

  .label:empty::before {
    content: "Camera Roll";
  }

  h1:empty::before {
    content: "$4.00";
  }

  h1 {
    margin: 4px 0 28px;
    font-size: 44px;
    line-height: 1.08;
    font-weight: 560 !important;
    color: rgba(0,0,0,0.92);
  }

  .item,
  .total {
    max-width: 340px;
  }

  .item div:empty::before {
    content: "Camera Roll";
  }

  .item span:empty::before,
  .total strong:empty::before {
    content: "$4.00";
  }

  .total span:empty::before {
    content: "Total due";
  }
}

@media (max-width: 899px) {
  body {
    align-items: flex-start;
  }

  .checkout {
    max-width: 100%;
    min-height: 100vh;
    grid-template-columns: 1fr;
    gap: 0;
  }

  .summary {
    min-height: auto;
    padding: 24px 20px 0;
    background: #ffffff;
  }

  .summary .label,
  .summary h1,
  .summary .item,
  .summary .total {
    display: none;
  }

  .payment {
    max-width: 420px;
    min-height: auto;
    padding: 24px 20px 22px;
    margin: 0 auto;
  }

  .mobile-price {
    margin: 2px 0 28px;
  }
}

/* Payment method box */
.payment-method-box {
  width: 100%;
  margin-top: 10px;
  padding: 14px 14px 16px;
  border: 1px solid #d9dce1;
  border-radius: 7px;
  background: #ffffff;
}

.method-option {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 24px;
  margin-bottom: 17px;
  color: #111827;
  font-size: 14px;
}

.method-radio {
  position: relative;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #000000;
  flex: 0 0 auto;
}

.method-radio::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: inherit;
  background: #ffffff;
}

.method-card-icon {
  position: relative;
  width: 16px;
  height: 12px;
  border-radius: 1px;
  background: #111111;
  flex: 0 0 auto;
}

.method-card-icon::before {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  top: 3px;
  height: 2px;
  background: #ffffff;
}

.payment-method-box .field-label {
  margin: 0 0 6px;
}

.payment-method-box label {
  margin-top: 16px;
}

.payment-method-box .card-fieldset,
.payment-method-box input,
.payment-method-box select {
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.payment-method-box .card-fieldset input {
  box-shadow: none;
}

@media (max-width: 640px) {
  .payment-method-box {
    padding: 14px 14px 16px;
    border-radius: 7px;
  }
}

/* Mobile summary spacing */
@media (max-width: 899px) {
  .summary {
    min-height: auto;
    padding: 16px;
    padding-bottom: 16px;
    margin-bottom: 16px;
    background: #ffffff;
  }

  .brand {
    margin-top: 0;
  }
}
