body {
  background-color: #0f033d; /* Matches login night sky */
  font-family: "ChalkboardSE", "Comic Sans MS", Arial, sans-serif;
  margin: 0;
  padding: 0;
}

.checkout-container {
  background-color: #cef0fd; /* Light pastel workspace */
  width: 90%;
  max-width: 1400px;
  margin: 0px auto;
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
 zoom: 0.9; /* shrinks both rendering *and* layout box */
  transform-origin: top center; /* keep it centered at the top */
}

/* Responsive tweak for mobile */
@media (max-width: 768px) {
  .checkout-container {
    width: 95%;
    padding: 20px;
  }
}
.main-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.left-grid,
.right-grid {
  display: grid;
  gap: 20px;
}

.left-grid {
  grid-template-rows: auto auto;
}

.right-grid {
  grid-template-rows: auto auto;
}

.grid-box {
  display: flex;
  flex-direction: column; /* ✅ stack label and content vertically */
  gap: 10px;               /* spacing between label and content */
  padding: 20px;
  border-radius: 12px;
  
  
  
  
  font-size: 18px;
  font-weight: bold;
    color: #5645a1;





}


/* Responsive stacking */
@media (max-width: 768px) {
  .main-grid {
    display: flex;
    flex-direction: column;
    height: auto;
  }

  .left-grid,
  .right-grid {
    grid-template-rows: auto auto;
  }

  .grid-box {
    min-height: 150px;
  }
}
.checkout-input {
  background-color: #e6e0ff;
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 2px solid #5944a7;
  font-size: 16px;
  margin-top: 4px;
  font-family: 'Chalkboard SE', 'Comic Sans MS', Arial, sans-serif;
}

#shipping-form {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

#shipping-form label {
  font-size: 16px;
  font-weight: normal;
  color: #5645a1;
  text-align: left;
}

.checkout-input {
  background-color: #e6e0ff;
  padding: 8px 10px;
  border-radius: 8px;
  border: 2px solid #5944a7;
  font-size: 14px;
  font-family: 'Chalkboard SE', 'Comic Sans MS', Arial, sans-serif;
  width: 100%;
}


.field-row {
  display: flex;
  gap: 20px;
}

.field-row label {
  flex: 1;
  font-size: 16px;
  font-weight: normal;
  color: #5645a1;
  text-align: left;
  display: flex;
  flex-direction: column;
}

.checkout-input {
  background-color: #e6e0ff;
  padding: 8px 10px;
  border-radius: 8px;
  border: 2px solid #5944a7;
  font-size: 14px;
  font-family: 'Chalkboard SE', 'Comic Sans MS', Arial, sans-serif;
  width: 100%;
}

/* Responsive: stack columns on small screens */
@media (max-width: 768px) {
  .field-row {
    flex-direction: column;
  }
}

.section-label {
  font-family: 'Chalkboard SE', 'Comic Sans MS', Arial, sans-serif;
  font-size: 28px;
  font-weight: bold;
  text-decoration: underline;
  text-align: left;
}








.cart-lineitem {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid #ccc;
    gap: 15px;
}

.cli-thumb img {
    width: 60px;
    height: auto;
    border-radius: 5px;
}

.cli-info {
    flex: 1;
}

.cli-name {
    font-weight: bold;
    text-decoration: none;
    color: inherit;
}

.cli-meta {
    font-size: 8px;
    color: #777;
}

.cli-price {
    min-width: 80px;
    text-align: right;
}

.cli-actions {
    display: flex;
    align-items: center;
    gap: 35px;
}

.cli-qty-form {
    display: flex;
    align-items: center;
    gap: 3px;
}

.cli-btn {
    background: none;        /* no background */
    border: none;            /* no border */
    padding: 0;              /* no extra space */
    font-size: 10px;          /* adjust size of the + / − */
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    color: #000;              /* set symbol color */
}

.cli-btn:hover {
    color: red;               /* change color on hover */
}

.cli-remove {
    color: #a9bcd1;
    font-size: 18px;
    text-decoration: none;
}

.cli-remove:hover {
    color: #0c0335;
}



/* Tooltip bubble for the remove X */
.cli-remove {
  position: relative;               /* anchor for the tooltip */
}

.cli-remove::after {
  content: "Remove item";
  position: absolute;
  right: 0;                         /* aligns bubble to the X */
  top: -36px;                       /* raises the bubble above the X */
  background: #5944a7;              /* matches your purple accents */
  color: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;             /* ignore mouse so it doesn't flicker */
  transition: opacity .15s ease, transform .15s ease;
  z-index: 5;
}

.cli-remove::before {
  content: "";
  position: absolute;
  right: 6px;                       /* arrow position under the bubble */
  top: -8px;
  border-width: 6px;
  border-style: solid;
  border-color: #5944a7 transparent transparent transparent; /* little arrow */
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .15s ease, transform .15s ease;
  z-index: 5;
}

/* Show on hover/focus (mouse + keyboard accessible) */
.cli-remove:hover::after,
.cli-remove:focus-visible::after,
.cli-remove:hover::before,
.cli-remove:focus-visible::before {
  opacity: 1;
  transform: translateY(0);
}



/* Price grid used by line items */
.cli-price .price-box {
  color: #000;
font-family: 'Chalkboard SE', 'Comic Sans MS', Arial, sans-serif;
  text-align: left;
  font-weight: bold;
}

.cli-price .price-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.cli-price .current-price {
  font-size: 1em;
  font-weight: bold;
}

.cli-price .fixed-price {
  display: flex;
  align-items: flex-end;
  font-size: 0.5em;
  color: #ae645f;
}

.cli-price .you-save {
  font-size: 0.5em;
}

.cli-price .savings {
  font-size: 0.5em;
  color: #f28d85;
}

.cli-price .save-label {
  font-size: 0.8em;
  background-color: red;
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  display: inline-block;
}

.cli-qty-display {
    display: inline-block;
    min-width: 24px;
    text-align: center;
    font-weight: bold;
    font-size: 22px;
}


.checkout-form {
  border: 2px dashed red;
  padding: 20px;
}

.clear-cart-link {
  background: none;
  border: none;
  padding: 0;
  margin-top: 10px;
  cursor: pointer;
  font-family: "Chalkboard SE", "Comic Sans MS", Arial, sans-serif;
  font-size: 1rem;
  color: #acbbcf;
  text-decoration: underline;
}

.clear-cart-link:hover {
  text-decoration: none;
  opacity: 0.8;
}




.credit-card-box {
  background: linear-gradient(135deg, #5944a7, #8a6be7);
  border-radius: 16px;
  padding: 20px;
  color: white;
  position: relative;
  font-family: "Chalkboard SE", "Comic Sans MS", Arial, sans-serif;
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
  margin-bottom: 20px;
}

.credit-card-box #card-element {
  background: rgba(255,255,255,0.15);
  padding: 12px;
  border-radius: 8px;
  margin-top: 20px;
}

.credit-card-box #card-errors {
  margin-top: 10px;
  font-size: 0.9rem;
  color: #ffdddd;
}

.card-chip {
  width: 50px;
  height: 35px;
  background: linear-gradient(135deg, #e0c96f, #caa84b);
  border-radius: 6px;
  margin-bottom: 15px;
}

.card-brand {
  font-size: 0.9rem;
  font-weight: bold;
  opacity: 0.8;
  text-align: right;
}


body::after {
  content: "TESTING CSS LOADED";
  position: fixed;
  bottom: 10px;
  right: 10px;
  background: red;
  color: white;
  padding: 5px;
  font-size: 14px;
  z-index: 9999;
}


.pay-button {
  display: inline-block;
  background: #ed70c8; /* purple gradient */
  color: #fff;
  font-family: "Chalkboard SE", "Comic Sans MS", Arial, sans-serif;
  font-size: 20px;
  font-weight: bold;
  padding: 14px 28px;
  border: none;
  border-radius: 999999px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  margin-top: 15px;
  width: 100%; /* full width inside the payment box */
  text-align: center;
}

.pay-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.pay-button:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.pay-button:disabled {
  background: #ccc;
  cursor: not-allowed;
  box-shadow: none;
}


.card-zip-label {
  margin-top: 15px;
  font-size: 0.9rem;
  color: #fff;
  font-family: "Chalkboard SE", "Comic Sans MS", Arial, sans-serif;
}

.card-zip-input {
  margin-top: 6px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid #fff;
  border-radius: 8px;
  padding: 10px;
  color: #fff;
  font-size: 1rem;
  width: 100%;
  box-sizing: border-box;
}

.card-zip-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}


.credit-card-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.card-field {
  padding: 10px;
  background: #2b2b2b;
  border-radius: 6px;
}


.card-label-row {
  display: flex;
  justify-content: space-between; /* pushes left + right apart */
  align-items: center;            /* keeps them aligned vertically */
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 6px;
}

.card-label-left {
  color: #ffffff;  /* darker for label */
}

.card-brand {
  color: #ffffff;  /* lighter for brands */
}


.card-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.card-field {
  flex: 1;
}

.card-labels {
  margin-top: 4px;
  font-size: 13px;
  color: #ffffff;
  font-weight: bold;
}

.card-labels .card-label {
  flex: 1;
  text-align: center;
}


.back-to-store-container {
  text-align: left;
  margin: 20px 0;
  padding-left: 10%; /* always 10% of the container width */
}

.back-to-store {
  display: inline-block;
  padding: 10px 18px;
  font-size: 16px;
  font-weight: bold;
  color: #fff;
  background: linear-gradient(135deg, #ed70c8, #9b5de5); /* pink → violet */
  text-decoration: none;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  transition: background 0.3s, transform 0.2s;
}

.back-to-store:hover {
  background: linear-gradient(135deg, #f48ad2, #7b4ac9); /* lighter pink → deeper violet */
  transform: translateY(-2px);
}

/* Shipping Options Box */
.grid-box.shipping-options {
  background: #fff;                /* white background */
  border: 3px solid #f5c518;       /* bright yellow border */
  border-radius: 12px;             /* rounded corners */
padding: 20px 20px 55px 20px;
font-weight: normal;
}

.grid-box.shipping-options .section-label {
  font-size: 22px;
  font-weight: bold;
  color: #5645a1;                  /* keep your purple accent */
  margin-bottom: 10px;             /* small gap under title */
  text-decoration: underline;
}

.grid-box.shipping-options label {
  display: flex;
  align-items: center;
  gap: 8px;                        /* space between radio & text */
  font-size: 16px;
  margin-bottom: -37px;              /* tighten vertical spacing */
  cursor: pointer;
}

.grid-box.shipping-options input[type="radio"] {
  accent-color: #f5c518;           /* yellow radio button (modern browsers) */
  transform: scale(1.2);           /* make them a little larger */
}


/* Loader fade + rainbow spinner */
#checkout-loading {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 9999;
  color: #fff;
  font-size: 1.2em;

  display: flex;               /* always flex */
  align-items: center;
  justify-content: center;
  flex-direction: column;

  opacity: 0;                  /* start invisible */
  pointer-events: none;        /* block clicks when hidden */
  transition: opacity 0.3s ease;
}

#checkout-loading.show {
  opacity: 1;                  /* fade in */
  pointer-events: auto;        /* clickable while shown */
}

.spinner {
  border: 6px solid #f3f3f3;
  border-top: 6px solid red; /* starting color */
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite, rainbow 2s linear infinite;
}

@keyframes spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes rainbow {
  0%   { border-top-color: red; }
  20%  { border-top-color: orange; }
  40%  { border-top-color: yellow; }
  60%  { border-top-color: green; }
  80%  { border-top-color: blue; }
  100% { border-top-color: violet; }
}
