/* Eleonex Payment Options Visual Enhancer - Frontend Styles */

/* Card-style payment method list */
#payment ul.payment_methods {
  border: none !important;
  padding: 0 !important;
}

#payment ul.payment_methods li {
  border: none !important;
  box-shadow: none !important;
  padding: 0px !important;
  border-radius: 15px !important;
  position: relative !important;
  margin-bottom: 12px !important;
  background: transparent !important;
  transition: all 0.2s ease !important;
}

/* Hover on unselected label */
@supports selector(:has(input:checked)) {
  #payment ul.payment_methods li:has(input:not(:checked)) label:hover {
    background: #182128 !important;
  }
}

/* Hide original radio but keep accessible */
#payment ul.payment_methods li input[type="radio"] {
  position: absolute !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
}

/* Custom radio circle - white border */
.eleonex-pove-radio {
  content: "" !important;
  display: inline-block !important;
  width: 20px !important;
  height: 20px !important;
  border: 2px solid #ffffff !important;
  border-radius: 50% !important;
  vertical-align: middle !important;
  flex-shrink: 0 !important;
  background: none !important;
  transition: all 0.2s ease !important;
  box-sizing: border-box !important;
  position: relative !important;
}

/* Selected state - white border + white inner circle with gap */
#payment
  ul.payment_methods
  li
  input[type="radio"]:checked
  ~ .eleonex-pove-gateway-name
  .eleonex-pove-radio,
#payment
  ul.payment_methods
  li:has(input:checked)
  .eleonex-pove-gateway-name
  .eleonex-pove-radio {
  border: 2px solid #ffffff !important;
  background: radial-gradient(
    circle at center,
    #ffffff 5px,
    transparent 5px
  ) !important;
}

/* Gateway name container - contains name and badge */
.eleonex-pove-gateway-name {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  font-weight: 700 !important;
  color: #fff !important;
  flex-grow: 1 !important;
}

/* PSP Logo - max height 24px, auto width */
.eleonex-pove-psp-logo {
  max-height: 24px !important;
  width: auto !important;
  display: inline-block !important;
  vertical-align: middle !important;
}

/* Badge - inside gateway name container */
.eleonex-pove-badge {
  display: inline-block !important;
  padding: 4px 8px !important;
  border-radius: 20px !important;
  font-size: 9px !important;
  font-weight: 500 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  vertical-align: middle !important;
  background: #01ffcd !important;
  color: #10181f !important;
}

/* Row 2: Payment Methods Image */
.eleonex-pove-row-2 {
  display: flex !important;
  justify-content: center !important;
  width: 100% !important;
  padding: 25px 15px 10px 25px !important;
  border: 1px solid #2b353d !important;
  border-radius: 0 0 15px 15px !important;
  margin-top: -17px !important;
  position: relative !important;
  z-index: 0 !important;
}

/* Hide row 2 if empty */
.eleonex-pove-row-2:empty {
  display: none !important;
}

/* Row 2 border color when checked */
#payment ul.payment_methods li:has(input:checked) .eleonex-pove-row-2 {
  border-color: #0e4e48 !important;
}

/* Fallback for older browsers */
#payment ul.payment_methods li input:checked ~ .eleonex-pove-row-2 {
  border-color: #0e4e48 !important;
}

/* Payment methods image - max width 100%, centered */
.eleonex-pove-row-2 img {
  max-width: 100% !important;
  width: auto !important;
  height: auto !important;
}

/* Remove margins from all images inside li */
#payment ul.payment_methods li img {
  margin: 0 !important;
}

/* Border on checked */
@supports selector(:has(input:checked)) {
  #payment ul.payment_methods li:has(input:checked) label {
    border-color: #01ffcd !important;
    background:
      linear-gradient(130deg, #151f27 25%, #11564f), #131c23 !important;
  }
}

/* Unselected with border - :has support */
@supports selector(:has(input:checked)) {
  #payment ul.payment_methods li:has(input) label {
    border-color: #2b353d !important;
    box-shadow: none !important;
  }
}

/* Fallback for older browsers - selected */
@supports not selector(:has(input:checked)) {
  #payment ul.payment_methods li input:checked + label {
    border-color: #01ffcd !important;
    background:
      linear-gradient(130deg, #151f27 25%, #11564f), #131c23 !important;
  }
}

/* Fallback for older browsers - unselected */
@supports not selector(:has(input:checked)) {
  #payment ul.payment_methods li input + label {
    border-color: #2b353d !important;
  }
}

/* Fallback for older browsers - hover */
@supports not selector(:has(input:checked)) {
  #payment ul.payment_methods li input:not(:checked) + label:hover {
    background: #182128 !important;
  }
}

/* Label styling */
#payment ul.payment_methods li label {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 14px !important;
  cursor: pointer !important;
  margin: 0 !important;
  font-weight: 500 !important;
  color: #fff !important;
  width: 100% !important;
  padding: 18.5px 15px !important;
  border: 1px solid #2b353d !important;
  border-radius: 15px !important;
  background: #131c23 !important;
  position: relative !important;
  z-index: 1 !important;
}

/* Hide payment description */
#payment ul.payment_methods li .payment_box,
#payment ul.payment_methods li .wc_payment_method_description,
#payment ul.payment_methods li .wc_payment_method__description {
  display: none !important;
}

/* Remove default payment box triangle */
#payment ul.payment_methods li .payment_box::before,
#payment ul.payment_methods li .wc_payment_method_description::before,
#payment ul.payment_methods li .wc_payment_method__description::before {
  content: none !important;
}

/* Specific gateway styling */
#payment ul.payment_methods li label {
  flex-wrap: wrap-reverse !important;
}
