/* =========================================
   SINGLE PRODUCT FORM LAYOUT
========================================= */

.single-product form.cart {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

/* ── ORDER: quantity first, rental fields second, button third ── */
.single-product form.cart .quantity                  { order: 1; }
.single-product form.cart .wer-single-product-fields { order: 2; align-self: stretch; width: 100% !important; box-sizing: border-box !important; }
.single-product form.cart .single_add_to_cart_button { order: 3; }

/* ── QUANTITY: full custom [−][input][+] control ─────────── */
.single-product form.cart .quantity {
  align-self: flex-start;
  display: flex !important;
  align-items: stretch;
  border: 1px solid #ccc;
  border-radius: 6px;
  overflow: hidden;
  width: auto !important;
  background: #fff;
}

/* Hide any existing theme +/- buttons so they don't duplicate */
.single-product form.cart .quantity button:not(.wer-qty-dec):not(.wer-qty-inc),
.single-product form.cart .quantity a:not(.wer-qty-dec):not(.wer-qty-inc) {
  display: none !important;
}

/* Our injected − and + buttons */
.single-product form.cart .quantity .wer-qty-dec,
.single-product form.cart .quantity .wer-qty-inc {
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
  border: none;
  width: 40px;
  min-width: 40px;
  height: 44px;
  font-size: 22px;
  font-weight: bold;
  cursor: pointer;
  color: #333;
  padding: 0;
  line-height: 1;
  transition: background 0.2s;
  flex-shrink: 0;
}

.single-product form.cart .quantity .wer-qty-dec:hover,
.single-product form.cart .quantity .wer-qty-inc:hover {
  background: #e0e0e0;
}

/* The quantity input — centered, no native spin arrows */
.single-product form.cart .quantity input.qty,
.single-product form.cart .quantity input[type="number"] {
  display: block !important;
  border: none !important;
  border-left: 1px solid #ccc !important;
  border-right: 1px solid #ccc !important;
  border-radius: 0 !important;
  text-align: center !important;
  width: 52px !important;
  height: 44px !important;
  padding: 0 !important;
  font-size: 16px !important;
  box-shadow: none !important;
  outline: none !important;
  background: #fff !important;
  -moz-appearance: textfield;
}

.single-product form.cart .quantity input.qty::-webkit-outer-spin-button,
.single-product form.cart .quantity input.qty::-webkit-inner-spin-button,
.single-product form.cart .quantity input[type="number"]::-webkit-outer-spin-button,
.single-product form.cart .quantity input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ── ADD TO CART: left-aligned ─────────────────────────────── */
.single-product form.cart .single_add_to_cart_button {
  align-self: flex-start !important;
  width: auto !important;
  min-width: 160px;
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
}

/* =========================================
   RENTAL FIELDS WRAPPER
========================================= */

.wer-single-product-fields {
  padding: 16px;
  background: #ffffff;
  border: 2px solid #0073aa;
  border-radius: 10px;
  width: 100%;
  box-sizing: border-box;
  box-shadow: 0 2px 8px rgba(0, 115, 170, 0.1);
}

.wer-single-product-fields h3 {
  margin: 0 0 16px 0 !important;
  padding: 0 0 10px 0 !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #333 !important;
  border-bottom: 2px solid #0073aa !important;
  line-height: 1.4 !important;
  word-wrap: break-word !important;
  display: block !important;
  max-width: 100%;
}

/* =========================================
   LABELS & INPUTS
========================================= */

.wer-label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 14px;
  color: #333;
}

.wer-input {
  width: 100% !important;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 10px 12px;
  outline: none;
  box-sizing: border-box !important;
  font-size: 16px;
  font-family: inherit;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  min-width: 0;
}

.wer-input:focus {
  border-color: #0073aa;
  box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.15);
}

.wer-input[required] {
  background-image: linear-gradient(to right, transparent 94%, #ff0000 95%);
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 4px 4px;
  padding-right: 20px;
}

/* =========================================
   LAYOUT ROWS (FLEXIBLE GRID)
========================================= */

.wer-date-row,
.wer-location-row {
  display: grid !important;
  gap: 12px;
  width: 310px !important;
  max-width: 100% !important;
  margin-bottom: 12px;
  box-sizing: border-box;
}

.wer-date-row {
  grid-template-columns: 1fr 1fr;
}

.wer-location-row {
  grid-template-columns: 2fr 1fr;
}

.wer-field,
.wer-field-grow,
.wer-field-zip {
  display: flex;
  flex-direction: column;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

/* =========================================
   PRICE PREVIEW
========================================= */

.wer-price-preview {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e5e5e5;
  font-weight: 700;
  color: #0073aa;
  font-size: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  line-height: 1.6;
}

.wer-sep {
  opacity: 0.5;
  color: #999;
}

#wer-single-days {
  color: #0073aa;
  font-weight: 700;
}

#wer-single-total {
  color: #0073aa;
  font-weight: 700;
}

/* =========================================
   FORMULA DISPLAY
========================================= */

.wer-formula {
  font-size: 13px;
  color: #666;
  margin: 8px 0;
  padding: 8px 0;
  border-top: 1px solid #f0f0f0;
  border-bottom: 1px solid #f0f0f0;
  white-space: normal;
  word-wrap: break-word;
  font-family: 'Monaco', 'Courier New', monospace;
  background-color: #fafafa;
  padding: 8px 10px;
  border-radius: 4px;
}

.wer-unit-price-value,
.wer-qty-display,
.wer-days-display {
  font-weight: 600;
  color: #333;
}

/* =========================================
   CHECKOUT SUMMARY
========================================= */

.wer-checkout-summary {
  background-color: #f9f9f9;
  padding: 15px;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
}

.wer-checkout-summary-title {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 700;
}

.wer-checkout-summary-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
  line-height: 1.6;
}

/* =========================================
   MOBILE RESPONSIVE (max-width: 768px)
========================================= */

@media (max-width: 768px) {
  
  .single-product form.cart {
    gap: 12px;
  }


  .wer-single-product-fields {
    padding: 12px;
  }

  .wer-single-product-fields h3 {
    font-size: 15px !important;
    margin-bottom: 12px !important;
  }

  /* Stack date fields vertically */
  .wer-date-row {
    grid-template-columns: 1fr;
  }

  /* Stack location and zip vertically */
  .wer-location-row {
    grid-template-columns: 1fr;
  }

  .wer-label {
    font-size: 13px;
  }

  .wer-input {
    padding: 10px;
    font-size: 16px;
  }

  .wer-price-preview {
    font-size: 14px;
    margin-top: 10px;
    padding-top: 10px;
  }

  .single-product form.cart .single_add_to_cart_button {
    max-width: 100%;
    font-size: 16px;
  }
}

/* =========================================
   TABLET RESPONSIVE (768px to 1024px)
========================================= */

@media (min-width: 768px) and (max-width: 1024px) {
  
  .wer-single-product-fields {
    padding: 14px;
  }

  .wer-date-row,
  .wer-location-row {
    gap: 10px;
  }

  .wer-input {
    padding: 10px;
  }
}

/* =========================================
   DESKTOP (max-width: 1200px)
========================================= */

@media (min-width: 1024px) {

  .wer-single-product-fields {
    padding: 16px;
    width: 100% !important;
  }

  .wer-date-row {
    grid-template-columns: 1fr 1fr;
  }

  .wer-location-row {
    grid-template-columns: 2fr 1fr;
  }
}