/* Checkout / Auth pages restyle – login.php, create_account.php (site colors kept) */
.checkout-auth-page {
  max-width: 440px;
  width: 100%;
  margin: 1rem auto 3rem;
  padding: 0 1rem;
  box-sizing: border-box;
}

/* Shopping cart: wider layout when screen allows, but not too much */
.checkout-auth-page.checkout-cart-page {
  max-width: 900px;
}
@media (min-width: 992px) {
  .checkout-auth-page.checkout-cart-page {
    max-width: 960px;
  }
}
@media (min-width: 1200px) {
  .checkout-auth-page.checkout-cart-page {
    max-width: 1040px;
  }
}
@media (min-width: 1400px) {
  .checkout-auth-page.checkout-cart-page {
    max-width: 1120px;
  }
}

.checkout-auth-page .checkout-auth-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  box-sizing: border-box;
}

@media (max-width: 480px) {
  .checkout-auth-page {
    margin: 1rem auto 2rem;
    padding: 0 0.75rem;
  }
  .checkout-auth-page .checkout-auth-card {
    padding: 1.25rem;
    border-radius: 10px;
  }
  .checkout-auth-page h1.checkout-auth-title {
    font-size: 1.5rem;
  }
}

.checkout-auth-page h1.checkout-auth-title {
  font-size: 1.75rem;
  font-weight: 400;
  color: #301F0D;
  text-align: center;
  margin-bottom: 1.5rem;
}

.checkout-auth-page .checkout-auth-subtitle {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  color: #333;
}

.checkout-auth-page .checkout-auth-subtitle a {
  color: #663300;
  font-weight: 600;
  text-decoration: none;
}

.checkout-auth-page .checkout-auth-subtitle a:hover {
  color: #855E42;
  text-decoration: underline;
}

/* Form groups */
.checkout-auth-page .form-group-auth {
  margin-bottom: 1rem;
}

.checkout-auth-page .form-control-auth {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  line-height: 1.5;
  color: #333;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  transition: border-color 0.2s;
}

.checkout-auth-page .form-control-auth:focus {
  border-color: #663300;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(102, 51, 0, 0.15);
}

.checkout-auth-page .form-control-auth::placeholder {
  color: #999;
}

/* Password wrapper with toggle */
.checkout-auth-page .password-wrapper {
  position: relative;
}

.checkout-auth-page .password-wrapper .form-control-auth {
  padding-right: 2.75rem;
}

.checkout-auth-page .password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0.25rem;
  color: #666;
  cursor: pointer;
}

.checkout-auth-page .password-toggle:hover {
  color: #663300;
}

/* Links below fields */
.checkout-auth-page .checkout-auth-forgot {
  display: block;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: #663300;
  text-decoration: none;
}

.checkout-auth-page .checkout-auth-forgot:hover {
  color: #855E42;
  text-decoration: underline;
}

/* Primary button */
.checkout-auth-page .btn-auth-primary {
  display: block;
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  color: #fff;
  background: #663300;
  border: 1px solid #301F0D;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.checkout-auth-page .btn-auth-primary:hover {
  background: #301F0D;
  border-color: #301F0D;
  color: #fff;
}

/* Divider */
.checkout-auth-page .checkout-auth-divider {
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
  color: #666;
  font-size: 0.9rem;
}

.checkout-auth-page .checkout-auth-divider::before,
.checkout-auth-page .checkout-auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #ddd;
}

.checkout-auth-page .checkout-auth-divider span {
  padding: 0 1rem;
  white-space: nowrap;
}

/* Google button wrapper – full width, match social style */
.checkout-auth-page .checkout-auth-social-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Empty container for Google renderButton (per Google docs). Min-height avoids layout shift before GSI loads. */
.checkout-auth-page .btn-auth-social-wrapper {
  width: 100%;
  display: block;
  box-sizing: border-box;
  min-height: 44px;
  /* Google iframe often clips the right edge (internal margin/padding). Add only the missing right border so the box looks complete. Color #dadce0 matches Google outline button. */
  border-right: 1px solid #dadce0;
  border-radius: 8px;
}

.checkout-auth-page .btn-auth-social-wrapper > div {
  width: 100% !important;
  max-width: 100% !important;
}

/* Force iframe to fill wrapper and reset Google's negative margin so content isn't shifted. */
.checkout-auth-page .btn-auth-social-wrapper iframe {
  margin: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  display: block !important;
}

/* Fallback Google button (visible until GSI replaces it) – full width, border on all sides */
.checkout-auth-page .btn-auth-google-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  color: #333;
  background: #fff;
}

.checkout-auth-page .btn-auth-google-fallback:hover {
  background: #f9f9f9;
  border-color: #bb9966;
}

/* Social buttons */
.checkout-auth-page .btn-auth-social {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  color: #333;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.checkout-auth-page .btn-auth-social:hover {
  background: #f9f9f9;
  border-color: #bb9966;
  color: #333;
}

.checkout-auth-page .btn-auth-social img,
.checkout-auth-page .btn-auth-social svg {
  width: 20px;
  height: 20px;
  margin-right: 10px;
}

/* Create account link at bottom */
.checkout-auth-page .checkout-auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.95rem;
  color: #333;
}

.checkout-auth-page .checkout-auth-footer a {
  color: #663300;
  font-weight: 600;
  text-decoration: none;
}

.checkout-auth-page .checkout-auth-footer a:hover {
  color: #855E42;
  text-decoration: underline;
}

/* Create account: password requirements list */
.checkout-auth-page .password-requirements {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 1rem 0;
  font-size: 0.875rem;
  color: #555;
}

.checkout-auth-page .password-requirements li {
  padding: 0.2rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.checkout-auth-page .password-requirements li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1px solid #999;
  background: transparent;
}

/* Checkboxes */
.checkout-auth-page .form-check-auth {
  margin-bottom: 1rem;
}

.checkout-auth-page .form-check-auth label {
  font-size: 0.9rem;
  color: #333;
  cursor: pointer;
}

.checkout-auth-page .form-check-auth input[type="checkbox"] {
  margin-right: 0.5rem;
}

.checkout-auth-page .form-check-auth .small-text {
  display: block;
  margin-top: 0.25rem;
  margin-left: 1.5rem;
  font-size: 0.8rem;
  color: #666;
}

.checkout-auth-page .form-check-auth .small-text a {
  color: #663300;
  text-decoration: none;
}

.checkout-auth-page .form-check-auth .small-text a:hover {
  text-decoration: underline;
}

/* Message stack inside auth card */
.checkout-auth-page .alert {
  border-radius: 8px;
}

.checkout-auth-page .messageStackError {
  background: #f8d7da;
  border-color: #f5c6cb;
  color: #721c24;
}

/* Checkout step pages (e.g. checkout_shipping_address) – same look, slightly wider */
.checkout-auth-page.checkout-step-page {
  max-width: 800px;
}

.checkout-auth-page .checkout-step-heading {
  font-size: 1.1rem;
  font-weight: 600;
  color: #301F0D;
  margin: 1.25rem 0 0.75rem 0;
}

.checkout-auth-page .checkout-step-heading:first-of-type {
  margin-top: 0;
}

/* Target by ID so styles apply regardless of parent .checkout-auth-page */
#checkout-address-form-container .contentText .form-group.row,
.checkout-auth-page .contentContainer-checkout-step .contentText .form-group.row {
  margin-bottom: 0;
  display: block;
}

#checkout-address-form-container .contentText .form-group.row .col-sm-3,
#checkout-address-form-container .contentText .form-group.row .col-sm-9,
.checkout-auth-page .contentContainer-checkout-step .contentText .form-group.row .col-sm-3,
.checkout-auth-page .contentContainer-checkout-step .contentText .form-group.row .col-sm-9 {
  max-width: 100%;
  flex: none;
}

/* Reserved zone for validation message so height doesn’t change when errors show */
#checkout-address-form-container .contentText .form-group.row .col-sm-9,
.checkout-auth-page .contentContainer-checkout-step .contentText .form-group.row .col-sm-9 {
  position: relative;
  padding-bottom: 1.4rem;
}

/* Labels on the left – override Bootstrap .text-sm-right (use ID + !important) */
#checkout-address-form-container .contentText .form-group.row label,
#checkout-address-form-container .contentText label.col-form-label,
#checkout-address-form-container .contentText label.text-sm-right,
.checkout-auth-page .contentContainer-checkout-step .contentText label.col-form-label,
.checkout-auth-page .contentContainer-checkout-step .contentText label.text-sm-right {
  font-size: 0.95rem;
  color: #333;
  margin-bottom: 0;
  display: block;
  text-align: left !important;
}

#checkout-address-form-container .contentText input[type="text"],
#checkout-address-form-container .contentText input[type="tel"],
#checkout-address-form-container .contentText select,
.checkout-auth-page .contentContainer-checkout-step .contentText input[type="text"],
.checkout-auth-page .contentContainer-checkout-step .contentText input[type="tel"],
.checkout-auth-page .contentContainer-checkout-step .contentText select {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  line-height: 1.5;
  color: #333;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

select#inputCountry {
  min-height: 3rem;
}

/* Country dropdown – full width so "Please Select" and long names are visible */
#checkout-address-form-container .contentText select#inputCountry,
.checkout-auth-page .contentContainer-checkout-step .contentText select#inputCountry {
  width: 100% !important;
  min-width: 100%;
  max-width: 100%;
}

.checkout-auth-page .contentContainer-checkout-step .contentText input:focus,
.checkout-auth-page .contentContainer-checkout-step .contentText select:focus,
.checkout-auth-page .contentContainer-checkout-step .contentText textarea:focus {
  border-color: #663300;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(102, 51, 0, 0.15);
}

.checkout-auth-page .contentContainer-checkout-step .contentText textarea.form-control {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  line-height: 1.5;
  color: #333;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.checkout-auth-page .contentContainer-checkout-step .contentText .table {
  margin-bottom: 1.25rem;
}

.checkout-auth-page .contentContainer-checkout-step .contentText .table td {
  vertical-align: middle;
  padding: 0.75rem 0.5rem;
}

.checkout-auth-page .contentContainer-checkout-step .contentText .form-check-inline {
  margin-right: 1rem;
}

.checkout-auth-page .contentContainer-checkout-step .contentText .form-check-inline label {
  font-size: 0.95rem;
  color: #333;
}

.checkout-auth-page .card-checkout-step {
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.checkout-auth-page .card-checkout-step .card-header {
  font-weight: 600;
  color: #301F0D;
  border-radius: 8px 8px 0 0;
}

.checkout-auth-page .buttonSet-checkout-step {
  margin: 1.5rem 0 1rem 0;
}

.checkout-auth-page .progressBarHook-checkout-step {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
}

/* Checkout address form – validation error state */
#checkout-address-form-container .contentText input.is-invalid,
#checkout-address-form-container .contentText select.is-invalid,
.checkout-auth-page .contentContainer-checkout-step .contentText input.is-invalid,
.checkout-auth-page .contentContainer-checkout-step .contentText select.is-invalid {
  border-color: #dc3545;
}

/* Validation message along bottom edge of field – no extra height */
#checkout-address-form-container .contentText .invalid-feedback-checkout,
.checkout-auth-page .contentContainer-checkout-step .contentText .invalid-feedback-checkout {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0;
  font-size: 0.75rem;
  color: #dc3545;
  line-height: 1.3;
}
.invalid-feedback-checkout {
  padding-left: 15px;
}

