/**
 * GroundMe Checkout Enhancer Styles
 * Modern, High-Converting Courier Buttons, Clean Payment Cards & Mobile UI
 */

/* Keep the BOX NOW dialog visible while its external map loads. */
.boxnow-popup-iframe {
  opacity: 1 !important;
}

/* ==========================================================================
   1. SHIPPING METHODS - MODERN LOGO BUTTONS
   ========================================================================== */

/* Премахване на тежки вертикални и излишни рамки в таблицата с поръчката */
table.woocommerce-checkout-review-order-table {
  border: none !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  width: 100% !important;
}

table.woocommerce-checkout-review-order-table th,
table.woocommerce-checkout-review-order-table td {
  border-left: none !important;
  border-right: none !important;
  border-top: none !important;
  border-bottom: 1px solid #edf2ef !important;
  padding: 10px 0 !important;
}

/* Разпъване на Спиди картите до краищата на блока за максимално пространство */
.woocommerce-checkout-review-order-table tr.woo-bg--shipping-title th,
.woocommerce-checkout-review-order-table tr.gm-shipping-heading th,
.woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals th {
  padding-left: 0 !important;
  padding-right: 0 !important;
  padding-top: 14px !important;
  padding-bottom: 6px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #1a2921 !important;
  border-top: none !important;
}

.woocommerce-checkout-review-order-table tr.woo-bg--shipping-methods > td,
.woocommerce-checkout-review-order-table td[data-title="Доставка"] {
  padding-left: 0 !important;
  padding-right: 0 !important;
  padding-top: 4px !important;
  padding-bottom: 12px !important;
  border: none !important;
}

#order-checkout ul#shipping_method,
.woocommerce-checkout ul#shipping_method {
  list-style: none !important;
  margin: 6px 0 14px 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  width: 100% !important;
}

#order_review tr.gm-shipping-row {
  display: table-row !important;
}
#order_review tr.gm-shipping-row > td {
  display: table-cell !important;
  width: auto !important;
}

#order-checkout ul#shipping_method > li,
.woocommerce-checkout ul#shipping_method > li {
  position: relative !important;
  z-index: 1;
  background: #ffffff !important;
  border: 1.5px solid #dce5e0 !important;
  border-radius: 12px !important;
  padding: 14px 16px !important;
  margin: 0 !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  width: 100% !important;
  min-height: 52px !important;
  box-sizing: border-box !important;
}

#order-checkout ul#shipping_method > li:hover,
.woocommerce-checkout ul#shipping_method > li:hover {
  border-color: #3b6651 !important;
  background: #f9fbf9 !important;
  box-shadow: 0 4px 14px rgba(59, 102, 81, 0.08);
}

/* Active / Selected Shipping Method */
#order-checkout ul#shipping_method > li.is-selected,
#order-checkout ul#shipping_method > li:has(input[type="radio"]:checked),
.woocommerce-checkout ul#shipping_method > li.is-selected,
.woocommerce-checkout ul#shipping_method > li:has(input[type="radio"]:checked) {
  border-color: #3b6651 !important;
  background: #f0f7f3 !important;
  box-shadow: 0 0 0 1px #3b6651, 0 4px 16px rgba(59, 102, 81, 0.12) !important;
}

/* CRITICAL FIX: Ensure active card & open dropdown always float OVER subsequent cards */
#order-checkout ul#shipping_method > li.is-selected,
#order-checkout ul#shipping_method > li:focus-within,
#order-checkout ul#shipping_method > li:has(.multiselect--active),
#order-checkout ul#shipping_method > li.gm-dropdown-active {
  z-index: 1000 !important;
}

#order-checkout ul#shipping_method > li:not(.is-selected):not(:focus-within):not(.gm-dropdown-active) {
  z-index: 1 !important;
}

/* Hide raw radio button, replace with custom indicator */
#order-checkout ul#shipping_method > li.gm-enhanced > input[type="radio"],
.woocommerce-checkout ul#shipping_method > li.gm-enhanced > input[type="radio"] {
  position: absolute !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  pointer-events: none !important;
}

/* Hide raw label completely to prevent duplicate text */
#order-checkout ul#shipping_method > li.gm-enhanced > label,
.woocommerce-checkout ul#shipping_method > li.gm-enhanced > label {
  display: none !important;
}

/* Header inside Shipping Method Card (Single-Row Modern Layout) */
.gm-shipping-card-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  gap: 12px !important;
}

.gm-shipping-header-left {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
  flex: 1 !important;
}

.gm-shipping-title-group {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

.gm-courier-logo {
  height: 22px !important;
  max-width: 100px !important;
  object-fit: contain !important;
  display: block !important;
  flex-shrink: 0 !important;
}

/* Selection Indicator Badge */
.gm-select-indicator {
  width: 20px !important;
  height: 20px !important;
  border-radius: 50% !important;
  border: 2px solid #ccd8d1 !important;
  background: #ffffff !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease !important;
  flex-shrink: 0 !important;
}

li.is-selected .gm-select-indicator,
li:has(input:checked) .gm-select-indicator {
  border-color: #3b6651 !important;
  background: #3b6651 !important;
}

li.is-selected .gm-select-indicator::after,
li:has(input:checked) .gm-select-indicator::after {
  content: "" !important;
  width: 6px !important;
  height: 6px !important;
  border-radius: 50% !important;
  background: #ffffff !important;
}

/* Title & Price */
.gm-shipping-title {
  font-size: 14.5px !important;
  font-weight: 700 !important;
  color: #1a2921 !important;
  line-height: 1.3 !important;
  margin: 0 !important;
}

.gm-shipping-badge {
  display: inline-block !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  color: #26593b !important;
  background: #e1efe7 !important;
  padding: 3px 8px !important;
  border-radius: 6px !important;
  white-space: nowrap !important;
}

/* ==========================================================================
   2. SPEEDY & BOX NOW ADDITIONAL FIELDS & CLEAN INTEGRATION
   ========================================================================== */

/* Скриване на additional fields и BoxNow бутона/детайлите при НЕизбрана карта или когато са празни */
#order-checkout ul#shipping_method > li:not(.is-selected) :is(.woo-bg-additional-fields, .bulgarisation-additional-fields),
.woocommerce-checkout ul#shipping_method > li:not(.is-selected) :is(.woo-bg-additional-fields, .bulgarisation-additional-fields),
#order-checkout ul#shipping_method > li:not(:has(input[type="radio"]:checked)) :is(.woo-bg-additional-fields, .bulgarisation-additional-fields),
.woocommerce-checkout ul#shipping_method > li:not(:has(input[type="radio"]:checked)) :is(.woo-bg-additional-fields, .bulgarisation-additional-fields),
#order-checkout ul#shipping_method > li:not(.is-selected) #box_now_delivery_button,
.woocommerce-checkout ul#shipping_method > li:not(.is-selected) #box_now_delivery_button,
#order-checkout ul#shipping_method > li:not(.is-selected) #box_now_selected_locker_details,
.woocommerce-checkout ul#shipping_method > li:not(.is-selected) #box_now_selected_locker_details,
:is(.woo-bg-additional-fields, .bulgarisation-additional-fields):empty {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
  height: 0 !important;
  min-height: 0 !important;
}

/* В активната карта: премахваме рамката и белия фон, за да няма грозна "кутия в кутия" */
:is(.woo-bg-additional-fields, .bulgarisation-additional-fields) {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  margin-top: 10px !important;
  padding: 6px 0 0 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  position: relative !important;
  z-index: 1001 !important;
  overflow: visible !important;
  box-sizing: border-box !important;
}

/* BOX NOW бутон и детайли за избран автомат */
#box_now_delivery_button {
  background-color: #3b6651 !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 10px !important;
  padding: 11px 18px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  margin-top: 10px !important;
  width: 100% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  box-shadow: 0 2px 8px rgba(59, 102, 81, 0.2) !important;
  transition: all 0.2s ease !important;
  text-decoration: none !important;
  box-sizing: border-box !important;
}

#box_now_delivery_button:hover {
  background-color: #2b4e3e !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(59, 102, 81, 0.3) !important;
}

#box_now_delivery_button::before {
  content: "📍" !important;
  font-size: 14px !important;
}

#box_now_selected_locker_details {
  margin-top: 10px !important;
  width: 100% !important;
}

.boxnow-selected-locker-info {
  background: #f4f8f5 !important;
  border: 1.5px solid #cde2d6 !important;
  border-radius: 10px !important;
  padding: 12px 14px !important;
  box-sizing: border-box !important;
}

.boxnow-locker-label {
  font-size: 11px !important;
  font-weight: 800 !important;
  color: #2b7348 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  margin-bottom: 6px !important;
  display: block !important;
}

.boxnow-locker-name,
.boxnow-locker-address {
  font-size: 13.5px !important;
  color: #223a2e !important;
  line-height: 1.45 !important;
  margin-top: 4px !important;
  word-break: break-word !important;
}

.boxnow-locker-name strong,
.boxnow-locker-address strong {
  color: #16281e !important;
  font-weight: 700 !important;
}

/* Office & Automat Locator Map Buttons */
a#woo-bg--speedy-office-locator,
a#woo-bg--speedy-automat-locator,
a[id*="speedy"][id*="locator"] {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-top: 10px !important;
  padding: 8px 16px !important;
  background: #eef5f1 !important;
  color: #2f5642 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
  text-decoration: none !important;
  border: 1px solid #cce0d5 !important;
  transition: all 0.2s ease !important;
}

a#woo-bg--speedy-office-locator:hover,
a#woo-bg--speedy-automat-locator:hover,
a[id*="speedy"][id*="locator"]:hover {
  background: #3b6651 !important;
  color: #ffffff !important;
  border-color: #3b6651 !important;
  text-decoration: none !important;
}

a#woo-bg--speedy-office-locator::before,
a#woo-bg--speedy-automat-locator::before,
a[id*="speedy"][id*="locator"]::before {
  content: "📍" !important;
  font-size: 14px !important;
}

/* Multiselect Dropdown Overrides & Z-Index */
.multiselect {
  width: 100% !important;
  min-width: 100% !important;
  box-sizing: border-box !important;
  position: relative !important;
  z-index: 1005 !important;
}

.multiselect__tags {
  border: 1.5px solid #d4dfd8 !important;
  border-radius: 8px !important;
  min-height: 44px !important;
  padding: 8px 40px 0 12px !important;
  font-size: 14px !important;
  background: #ffffff !important;
  box-sizing: border-box !important;
}

.multiselect__tags:focus-within {
  border-color: #3b6651 !important;
  box-shadow: 0 0 0 3px rgba(59, 102, 81, 0.15) !important;
}

.multiselect__content-wrapper {
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  min-width: 100% !important;
  box-sizing: border-box !important;
  z-index: 999999 !important;
  background: #ffffff !important;
  border: 1.5px solid #3b6651 !important;
  border-radius: 0 0 10px 10px !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22) !important;
  max-height: 260px !important;
  overflow-y: auto !important;
}

.multiselect__option {
  white-space: normal !important;
  word-break: break-word !important;
  line-height: 1.35 !important;
  padding: 10px 14px !important;
  font-size: 13.5px !important;
}

.multiselect__option--highlight {
  background: #3b6651 !important;
  color: #ffffff !important;
}

/* ПОПРАВКА НА БЪГ В BULGARISATION ЗА СЪОБЩЕНИЯТА В КРАЯ НА ПАДАЩОТО МЕНЮ:
   Плъгинът Bulgarisation има грешно '.multiselect__element { display: block !important; }',
   което прегазва inline style="display: none;" на Vue.js и кара съобщенията
   "Няма намерени резултати за този град" и "Започнете да търсите офис"
   да се показват в края на списъка, дори когато има намерени офиси/автомати. */
.multiselect__element[style*="display: none"],
.multiselect__element[style*="display:none"],
.multiselect__content > li[style*="display: none"],
.multiselect__content > li[style*="display:none"],
.multiselect__option[style*="display: none"],
.multiselect__option[style*="display:none"] {
  display: none !important;
}

/* Address Detail inputs (Street number, Block, Entrance, Floor, App) */
.woo-bg-speedy-address-details {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)) !important;
  gap: 8px !important;
  margin-top: 10px !important;
}

.woo-bg-speedy-address-details .form-row {
  margin: 0 !important;
  padding: 0 !important;
}

.woo-bg-speedy-address-details input.input-text {
  height: 42px !important;
  padding: 8px 10px !important;
  font-size: 13px !important;
  border-radius: 8px !important;
  border: 1.5px solid #d4dfd8 !important;
  text-align: center !important;
}

/* ==========================================================================
   3. PAYMENT METHODS - MODERN ELEGANT CARDS
   ========================================================================== */

#payment ul.payment_methods,
.woocommerce-checkout #payment ul.payment_methods {
  list-style: none !important;
  margin: 16px 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  border: none !important;
  background: transparent !important;
}

#payment ul.payment_methods > li.wc_payment_method,
.woocommerce-checkout #payment ul.payment_methods > li.wc_payment_method {
  position: relative !important;
  background: #ffffff !important;
  border: 2px solid #e0e8e3 !important;
  border-radius: 12px !important;
  padding: 16px 18px !important;
  margin: 0 !important;
  cursor: pointer !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-sizing: border-box !important;
  list-style: none !important;
}

#payment ul.payment_methods > li.wc_payment_method:hover,
.woocommerce-checkout #payment ul.payment_methods > li.wc_payment_method:hover {
  border-color: #3b6651 !important;
  background: #fbfdfc !important;
  box-shadow: 0 4px 14px rgba(59, 102, 81, 0.08) !important;
}

/* Selected Payment Method Card */
#payment ul.payment_methods > li.wc_payment_method.is-selected,
#payment ul.payment_methods > li.wc_payment_method:has(input[type="radio"]:checked),
.woocommerce-checkout #payment ul.payment_methods > li.wc_payment_method.is-selected,
.woocommerce-checkout #payment ul.payment_methods > li.wc_payment_method:has(input[type="radio"]:checked) {
  border-color: #3b6651 !important;
  background: #f0f7f3 !important;
  box-shadow: 0 0 0 1px #3b6651, 0 6px 18px rgba(59, 102, 81, 0.1) !important;
}

/* Hide native radio visually without blocking events */
#payment ul.payment_methods > li.gm-payment-enhanced > input[type="radio"],
.woocommerce-checkout #payment ul.payment_methods > li.gm-payment-enhanced > input[type="radio"] {
  position: absolute !important;
  opacity: 0 !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
}

/* Payment Method Card Header */
.gm-payment-card-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  cursor: pointer !important;
  gap: 12px !important;
}

.gm-payment-left {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex: 1 1 auto !important;
}

/* Custom Radio Indicator */
.gm-payment-indicator {
  width: 20px !important;
  height: 20px !important;
  border-radius: 50% !important;
  border: 2px solid #ccd8d1 !important;
  background: #ffffff !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease !important;
  flex-shrink: 0 !important;
}

li.wc_payment_method.is-selected .gm-payment-indicator,
li.wc_payment_method:has(input:checked) .gm-payment-indicator {
  border-color: #3b6651 !important;
  background: #3b6651 !important;
}

li.wc_payment_method.is-selected .gm-payment-indicator::after,
li.wc_payment_method:has(input:checked) .gm-payment-indicator::after {
  content: "" !important;
  width: 6px !important;
  height: 6px !important;
  border-radius: 50% !important;
  background: #ffffff !important;
}

/* Payment Title & Subtitle */
.gm-payment-title-wrap {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

.gm-payment-title {
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #1a2921 !important;
  margin: 0 !important;
  line-height: 1.3 !important;
}

.gm-payment-subtitle {
  font-size: 12.5px !important;
  color: #60756a !important;
  line-height: 1.3 !important;
}

/* Payment Method Icon on the Right */
.gm-payment-icon {
  height: 28px !important;
  max-width: 155px !important;
  object-fit: contain !important;
  display: block !important;
  flex-shrink: 0 !important;
}

/* Hide standard WC raw label, but KEEP our custom card header label */
#payment ul.payment_methods > li.wc_payment_method.gm-payment-enhanced > label:not(.gm-payment-card-header) {
  display: none !important;
}

#payment ul.payment_methods > li.wc_payment_method > label.gm-payment-card-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  cursor: pointer !important;
  gap: 12px !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Refined Payment Box (Description) */
#payment div.payment_box,
.woocommerce-checkout #payment div.payment_box {
  background: #ffffff !important;
  border: 1px solid #dbe6e0 !important;
  border-radius: 10px !important;
  padding: 12px 16px !important;
  margin: 12px 0 0 0 !important;
  color: #344a3e !important;
  font-size: 13.5px !important;
  line-height: 1.5 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02) !important;
}

#payment div.payment_box::before,
#payment div.payment_box::after {
  display: none !important;
}

/* ==========================================================================
   4. CITY AUTOCOMPLETE SUGGESTIONS
   ========================================================================== */

#billing_city_field {
  position: relative !important;
}

.gm-city-suggestions-wrap {
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  right: 0 !important;
  background: #ffffff !important;
  border: 1.5px solid #3b6651 !important;
  border-radius: 0 0 10px 10px !important;
  box-shadow: 0 10px 25px rgba(0,0,0,0.12) !important;
  max-height: 220px !important;
  overflow-y: auto !important;
  z-index: 9999 !important;
  display: none;
}

.gm-city-suggestion-item {
  padding: 10px 14px !important;
  font-size: 14px !important;
  color: #1a2921 !important;
  cursor: pointer !important;
  border-bottom: 1px solid #f0f4f1 !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  transition: background 0.15s ease !important;
}

.gm-city-suggestion-item:last-child {
  border-bottom: none !important;
}

.gm-city-suggestion-item:hover,
.gm-city-suggestion-item.is-active {
  background: #eef6f1 !important;
  color: #264a37 !important;
  font-weight: 600 !important;
}

.gm-city-suggestion-region {
  font-size: 11.5px !important;
  color: #728479 !important;
  font-weight: normal !important;
}

/* Quick city pills under City field */
.gm-quick-cities {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  margin-top: 8px !important;
}

.gm-quick-city-pill {
  font-size: 12px !important;
  color: #3b6651 !important;
  background: #edf5f0 !important;
  border: 1px solid #d3e4da !important;
  border-radius: 14px !important;
  padding: 3px 10px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.gm-quick-city-pill:hover {
  background: #3b6651 !important;
  color: #ffffff !important;
  border-color: #3b6651 !important;
}

/* ==========================================================================
   5. CHECKOUT INPUT FIELDS REFINEMENT & UNWANTED FIELDS CLEANUP
   ========================================================================== */

#order-checkout .woocommerce-billing-fields input.input-text,
#order-checkout .woocommerce-billing-fields select {
  height: 46px !important;
  border-radius: 10px !important;
  border: 1.5px solid #d4dfd8 !important;
  padding: 10px 14px !important;
  font-size: 14.5px !important;
  color: #1a2921 !important;
  background: #ffffff !important;
  transition: all 0.2s ease !important;
  box-sizing: border-box !important;
}

#order-checkout .woocommerce-billing-fields input.input-text:focus,
#order-checkout .woocommerce-billing-fields select:focus {
  border-color: #3b6651 !important;
  box-shadow: 0 0 0 3px rgba(59, 102, 81, 0.15) !important;
  outline: none !important;
}

/* Always hide unwanted fields: Postcode, Country, State */
#order-checkout #billing_postcode_field,
.woocommerce-checkout #billing_postcode_field,
#order-checkout #billing_country_field,
#order-checkout #billing_state_field {
  display: none !important;
}

/* ==========================================================================
   6. MOBILE OPTIMIZATIONS (FIXES HUGE WASTED SIDE PADDINGS & WRAPS)
   ========================================================================== */

@media (max-width: 768px) {
  /* Remove excessive section & container margins */
  #order-checkout.uk-section,
  section#order-checkout {
    padding: 16px 0 28px !important;
  }

  #order-checkout .uk-container {
    padding-left: 4px !important;
    padding-right: 4px !important;
    max-width: 100% !important;
  }

  /* Compact the white card wrapper on phones */
  #order-checkout .uk-container > div {
    padding: 14px 6px !important;
    border-radius: 14px !important;
    margin-bottom: 14px !important;
  }

  /* Both columns stretch to 100% without margin push */
  #order-checkout .col2-set,
  #order-checkout #order_review {
    width: 100% !important;
    float: none !important;
    margin-right: 0 !important;
    padding: 0 !important;
  }

  #order-checkout #payment,
  .woocommerce-checkout #payment {
    padding: 10px 8px !important;
    border-radius: 12px !important;
  }

  /* Shipping cards on phones */
  #order-checkout ul#shipping_method,
  .woocommerce-checkout ul#shipping_method {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }

  #order-checkout ul#shipping_method > li,
  .woocommerce-checkout ul#shipping_method > li {
    padding: 13px 14px !important;
    min-height: auto !important;
  }

  .gm-shipping-card-header {
    gap: 8px !important;
  }

  .gm-shipping-header-left {
    gap: 10px !important;
  }

  .gm-shipping-title-group {
    gap: 6px !important;
  }

  #payment ul.payment_methods > li.wc_payment_method,
  .woocommerce-checkout #payment ul.payment_methods > li.wc_payment_method {
    padding: 12px 12px !important;
  }

  /* On mobile: flow payment title and wallet logos cleanly so title never gets crushed */
  .gm-payment-card-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }

  .gm-payment-left {
    width: 100% !important;
    gap: 10px !important;
  }

  .gm-payment-title {
    font-size: 14px !important;
    line-height: 1.35 !important;
  }

  .gm-payment-subtitle {
    font-size: 11.5px !important;
    line-height: 1.35 !important;
  }

  .gm-payment-icon {
    align-self: flex-start !important;
    margin-left: 32px !important;
    max-width: 135px !important;
    height: 24px !important;
  }
}

/* ==========================================================================
   7. HERO & REUSABLE CTA BUTTONS & PRICING CARD FIXES
   ========================================================================== */

.gm-hero-pricing-card br,
.gm-cta-button br {
  display: none !important;
}

.gm-cta-button {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  width: 100% !important;
  padding: 14px 20px !important;
  min-height: 52px !important;
  background: #3b6651 !important;
  color: #ffffff !important;
  font-size: clamp(14px, 3.8vw, 16px) !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.6px !important;
  text-decoration: none !important;
  border-radius: 12px !important;
  box-shadow: 0 6px 20px rgba(59, 102, 81, 0.3) !important;
  transition: all 0.25s ease !important;
  line-height: 1.35 !important;
  text-align: center !important;
  box-sizing: border-box !important;
}

.gm-cta-button:hover {
  background: #2b4e3e !important;
  color: #ffffff !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 24px rgba(59, 102, 81, 0.4) !important;
  text-decoration: none !important;
}

.gm-price-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  margin-bottom: 14px !important;
}

.gm-price-group {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

.gm-discount-badge {
  color: #2e5743 !important;
  font-size: 11.5px !important;
  font-weight: 800 !important;
  background: #e3eee8 !important;
  padding: 3px 8px !important;
  border-radius: 6px !important;
  white-space: nowrap !important;
}

.gm-stock-badge {
  color: #2e5743 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  background: #f0f7f3 !important;
  padding: 4px 10px !important;
  border-radius: 20px !important;
  white-space: nowrap !important;
}

/* Prevent any price split / currency wrap */
.gm-nowrap,
.gm-price-nowrap,
.gm-price-nowrap span {
  white-space: nowrap !important;
  word-break: keep-all !important;
}

/* Скриване на текста за ДДС под общата сума */
.includes_tax,
small.includes_tax,
tr.tax-rate,
tr.tax-total {
  display: none !important;
}

/* Keep a manual region choice when automatic matching is uncertain. */
#order-checkout #billing_state_field.gm-manual-region,
.woocommerce-checkout #billing_state_field.gm-manual-region { display: block !important; }
.gm-enhanced:focus-within, .gm-payment-enhanced:focus-within { outline: 2px solid #3b6651; outline-offset: 3px; }

/* Compact outer gutter, with breathing room INSIDE each delivery card.
   The review ID wins over theme table/list resets without clipping dropdowns. */
#order_review ul#shipping_method > li.gm-enhanced,
#order-checkout ul#shipping_method > li.gm-enhanced,
.woocommerce-checkout ul#shipping_method > li.gm-enhanced {
  padding: 10px 12px !important;
  border-radius: 10px !important;
  min-width: 0 !important;
}
#order_review .woocommerce-checkout-review-order-table tr.woo-bg--shipping-methods > td,
#order_review .woocommerce-checkout-review-order-table .woocommerce-shipping-totals > td {
  padding: 4px 2px 10px !important;
}
.gm-shipping-card-content, .gm-shipping-header-left, .gm-shipping-title-group {
  min-width: 0 !important;
  max-width: 100% !important;
}
.gm-shipping-title { overflow-wrap: anywhere; }
.gm-shipping-price {
  font-size: 13px;
  font-weight: 700;
  color: #1a2921;
  white-space: nowrap;
}
@media (max-width: 768px) {
  #order_review ul#shipping_method > li.gm-enhanced,
  #order-checkout ul#shipping_method > li.gm-enhanced,
  .woocommerce-checkout ul#shipping_method > li.gm-enhanced {
    padding: 9px 10px !important;
  }
  #order_review .woocommerce-checkout-review-order-table {
    table-layout: fixed !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  #order_review .woocommerce-checkout-review-order-table th,
  #order_review .woocommerce-checkout-review-order-table td {
    padding-left: 6px !important;
    padding-right: 6px !important;
  }
  #order_review .woocommerce-checkout-review-order-table tr.woo-bg--shipping-methods > td,
  #order_review .woocommerce-checkout-review-order-table .woocommerce-shipping-totals > td {
    padding-left: 2px !important;
    padding-right: 2px !important;
  }
  .gm-shipping-card-header, .gm-shipping-header-left { gap: 8px !important; }
}
