/* LEO Commerce UI 0.5.11.316 — cartão de frete, SOMENTE página de produto.
 * O conteúdo é gerado pelo LEO Frete e permanece intacto.
 * Suporta tanto o renderizador antigo (.leo-shipping-option) quanto o v2. */

body.single-product .leo-product-delivery .leo-shipping-options {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

body.single-product .leo-product-delivery :is(.leo-shipping-option, .leo-delivery-v20-rate) {
  display: grid !important;
  grid-template-columns: 40px minmax(0, 1fr) auto !important;
  align-items: center !important;
  column-gap: 11px !important;
  min-height: 76px !important;
  padding: 12px !important;
  margin: 0 !important;
  background: #ffffff !important;
  border: 1px solid #d2dcd7 !important;
  border-radius: 15px !important;
  box-shadow: 0 4px 12px rgba(27, 55, 41, .065) !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}

body.single-product .leo-product-delivery :is(.leo-shipping-option, .leo-delivery-v20-rate)::before {
  content: "" !important;
  display: block !important;
  grid-column: 1 !important;
  grid-row: 1 !important;
  width: 40px !important;
  height: 40px !important;
  flex: 0 0 40px !important;
  border-radius: 12px !important;
  background-color: #e9f5e5 !important;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%2323733D%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%207h11v10H3z%22%2F%3E%3Cpath%20d%3D%22M14%2010h4l3%203v4h-7z%22%2F%3E%3Ccircle%20cx%3D%227%22%20cy%3D%2218%22%20r%3D%222%22%2F%3E%3Ccircle%20cx%3D%2218%22%20cy%3D%2218%22%20r%3D%222%22%2F%3E%3Cpath%20d%3D%22M1%2011h3M1%2014h3%22%2F%3E%3C%2Fsvg%3E") !important;
  background-position: center !important;
  background-size: 23px 23px !important;
  background-repeat: no-repeat !important;
}
body.single-product .leo-product-delivery :is(.leo-shipping-option, .leo-delivery-v20-rate).leo-frete-card-pickup::before {
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%2323733D%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%2010h16v10H4z%22%2F%3E%3Cpath%20d%3D%22M3%2010l2-6h14l2%206%22%2F%3E%3Cpath%20d%3D%22M8%2020v-6h8v6%22%2F%3E%3Cpath%20d%3D%22M3%2010c0%202%203%203%204%200%200%202%203%203%205%200%200%202%203%203%205%200%201%202%204%202%204%200%22%2F%3E%3C%2Fsvg%3E") !important;
}

body.single-product .leo-product-delivery :is(.leo-shipping-option > span, .leo-delivery-v20-rate-name) {
  display: block !important;
  grid-column: 2 !important;
  grid-row: 1 !important;
  min-width: 0 !important;
  color: #202730 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.5 !important;
  white-space: normal !important;
  overflow-wrap: break-word !important;
}

body.single-product .leo-product-delivery :is(.leo-shipping-option > strong, .leo-delivery-v20-rate-price) {
  display: inline-flex !important;
  grid-column: 3 !important;
  grid-row: 1 !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 72px !important;
  max-width: 105px !important;
  padding: 9px 8px !important;
  margin: 0 !important;
  border-radius: 12px !important;
  background: #2e7d3f !important;
  color: #ffffff !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
  white-space: nowrap !important;
  text-align: center !important;
  box-sizing: border-box !important;
}
body.single-product .leo-product-delivery :is(.leo-shipping-option > strong, .leo-delivery-v20-rate-price) :is(.amount, .woocommerce-Price-amount, .woocommerce-Price-currencySymbol) {
  color: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  line-height: inherit !important;
}
body.single-product .leo-product-delivery :is(.leo-shipping-option, .leo-delivery-v20-rate).leo-frete-card-pickup > strong,
body.single-product .leo-product-delivery .leo-delivery-v20-rate-price.is-free {
  background: #e7f4de !important;
  color: #145d2c !important;
}

/* v2: os grupos e cabeçalhos existentes continuam (sem mudar os textos).
 * Cada modalidade passa a ser cartão individual, mesmo que o grupo tenha mais de um método. */
body.single-product .leo-product-delivery .leo-delivery-v20-group {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
}
body.single-product .leo-product-delivery .leo-delivery-v20-rate {
  margin-top: 9px !important;
}
body.single-product .leo-product-delivery .leo-delivery-v20-rate:first-of-type {
  border-top: 1px solid #d2dcd7 !important;
}

@media (max-width: 600px) {
  body.single-product .leo-product-delivery :is(.leo-shipping-option, .leo-delivery-v20-rate) {
    grid-template-columns: 34px minmax(0, 1fr) auto !important;
    column-gap: 8px !important;
    min-height: 70px !important;
    padding: 10px !important;
    border-radius: 12px !important;
  }
  body.single-product .leo-product-delivery :is(.leo-shipping-option, .leo-delivery-v20-rate)::before {
    width: 34px !important;
    height: 34px !important;
    border-radius: 10px !important;
    background-size: 21px 21px !important;
  }
  body.single-product .leo-product-delivery :is(.leo-shipping-option > span, .leo-delivery-v20-rate-name) {
    font-size: 12.5px !important;
  }
  body.single-product .leo-product-delivery :is(.leo-shipping-option > strong, .leo-delivery-v20-rate-price) {
    min-width: 58px !important;
    padding: 8px 6px !important;
    border-radius: 10px !important;
    font-size: 12px !important;
  }
}

@media (prefers-reduced-motion: no-preference) {
  body.single-product .leo-product-delivery :is(.leo-shipping-option, .leo-delivery-v20-rate) {
    transition: box-shadow .16s ease, border-color .16s ease !important;
  }
}
