/* Pedidos Rápidos SitioDev - estilos aislados del tema */
:root{--sdpr-primary:#18a900;--sdpr-primary-hover:#148f00;--sdpr-purple:#9838f4;--sdpr-text:#111111;--sdpr-muted:#666666;--sdpr-border:#d4d4d4;--sdpr-bg:#ffffff;--sdpr-summary:#f2f2f2;--sdpr-danger:#e31313}

/* Aislamiento base: Woodmart/Elementor/WooCommerce no deben recolorear el módulo */
.sdpr-modal,.sdpr-inline,.sdpr-offers-only{color-scheme:light!important;font-family:inherit!important;color:var(--sdpr-text)!important;line-height:1.35!important;isolation:isolate}
.sdpr-modal *,.sdpr-inline *,.sdpr-offers-only *{box-sizing:border-box!important}
.sdpr-modal a,.sdpr-modal button,.sdpr-modal input,.sdpr-modal select,.sdpr-inline a,.sdpr-inline button,.sdpr-inline input,.sdpr-inline select{font-family:inherit!important}

/* CTA del plugin, dentro o fuera del modal */
button.sdpr-open,.sdpr-open,
button.sdpr-submit,.sdpr-submit,
a.sdpr-wa,.sdpr-wa{
  appearance:none!important;-webkit-appearance:none!important;
  border:0!important;outline:0!important;
  background:var(--sdpr-primary)!important;background-color:var(--sdpr-primary)!important;background-image:none!important;
  color:#fff!important;-webkit-text-fill-color:#fff!important;
  font-weight:800!important;text-transform:uppercase!important;
  cursor:pointer!important;padding:14px 22px!important;border-radius:4px!important;
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  text-decoration:none!important;line-height:1.2!important;
  opacity:1!important;filter:none!important;visibility:visible!important;
  box-shadow:none!important;text-shadow:none!important;
}
button.sdpr-open:hover,.sdpr-open:hover,button.sdpr-submit:hover,.sdpr-submit:hover,a.sdpr-wa:hover,.sdpr-wa:hover{
  background:var(--sdpr-primary-hover)!important;background-color:var(--sdpr-primary-hover)!important;
  color:#fff!important;-webkit-text-fill-color:#fff!important;opacity:1!important;filter:none!important;
}
.sdpr-open{width:100%!important;max-width:420px!important}

/* Modal */
.sdpr-modal{position:fixed!important;inset:0!important;z-index:2147483000!important;display:none!important;margin:0!important;padding:0!important}
.sdpr-modal.is-open{display:block!important}
.sdpr-backdrop{position:absolute!important;inset:0!important;background:rgba(0,0,0,.58)!important}
.sdpr-dialog{position:relative!important;margin:2vh auto!important;background:#fff!important;background-color:#fff!important;color:#111!important;width:min(560px,94vw)!important;max-height:96vh!important;overflow:auto!important;border:0!important;border-radius:8px!important;box-shadow:0 20px 70px rgba(0,0,0,.32)!important}
button.sdpr-close,.sdpr-close{position:sticky!important;top:8px!important;float:right!important;z-index:10!important;margin:8px 8px 0 0!important;width:34px!important;min-width:34px!important;height:34px!important;min-height:34px!important;padding:0!important;border:0!important;border-radius:50%!important;background:#111!important;background-color:#111!important;color:#fff!important;-webkit-text-fill-color:#fff!important;font-size:22px!important;font-weight:700!important;line-height:34px!important;text-align:center!important;cursor:pointer!important;box-shadow:none!important;opacity:1!important}
button.sdpr-close:hover,.sdpr-close:hover{background:#000!important;color:#fff!important}
.sdpr-modal-content{padding:8px 20px 24px!important;background:#fff!important;color:#111!important}
body.sdpr-no-scroll{overflow:hidden!important}

/* Ofertas */
.sdpr-offer-list{display:grid!important;gap:10px!important;margin:4px 0 24px!important;padding:0!important;background:transparent!important}
.sdpr-offer{position:relative!important;display:grid!important;grid-template-columns:58px 1fr auto!important;gap:12px!important;align-items:center!important;border:1px solid #cfcfcf!important;border-radius:6px!important;padding:10px!important;cursor:pointer!important;background:#fff!important;background-color:#fff!important;color:#111!important;box-shadow:none!important;opacity:1!important}
.sdpr-offer:hover{border-color:#a9a9a9!important;background:#fff!important}
.sdpr-offer.is-selected{border:3px solid var(--sdpr-purple)!important;background:#fbf4ff!important;background-color:#fbf4ff!important;padding:8px!important}
.sdpr-offer input[type="radio"]{position:absolute!important;opacity:0!important;pointer-events:none!important}
.sdpr-offer img{width:58px!important;height:58px!important;object-fit:contain!important;border-radius:4px!important;background:transparent!important;margin:0!important;padding:0!important}
.sdpr-offer-main{min-width:0!important;display:flex!important;flex-wrap:wrap!important;gap:6px!important;align-items:center!important;color:#111!important}
.sdpr-offer-main strong{font-size:16px!important;line-height:1.2!important;color:#111!important;font-weight:800!important;margin:0!important}
.sdpr-offer-main small{display:block!important;width:100%!important;font-weight:700!important;color:#111!important;font-size:12px!important;line-height:1.25!important}
.sdpr-badge{display:inline-block!important;background:var(--sdpr-purple)!important;background-color:var(--sdpr-purple)!important;color:#fff!important;-webkit-text-fill-color:#fff!important;padding:4px 7px!important;border-radius:4px!important;font-size:11px!important;font-weight:800!important;line-height:1.2!important}
.sdpr-price-box{text-align:right!important;white-space:nowrap!important;color:#111!important}
.sdpr-price-box del{display:block!important;font-size:12px!important;color:#555!important;opacity:1!important;text-decoration:line-through!important}
.sdpr-price-box b{font-size:17px!important;color:#111!important;font-weight:900!important}
.sdpr-price-box .woocommerce-Price-amount,.sdpr-price-box .woocommerce-Price-currencySymbol{color:inherit!important;font:inherit!important}

/* Formulario */
.sdpr-order-form{display:grid!important;gap:14px!important;background:#fff!important;color:#111!important;margin:0!important;padding:0!important}
.sdpr-field{display:grid!important;grid-template-columns:142px 1fr!important;gap:12px!important;align-items:center!important;margin:0!important;padding:0!important}
.sdpr-field label{font-weight:800!important;line-height:1.05!important;color:#111!important;font-size:15px!important;margin:0!important;padding:0!important;text-transform:none!important}
.sdpr-field em{color:#e01919!important;font-style:normal!important}
.sdpr-field input,.sdpr-field select{
  appearance:auto!important;-webkit-appearance:auto!important;
  width:100%!important;min-width:0!important;min-height:48px!important;height:auto!important;
  border:1px solid #c9c9c9!important;border-radius:6px!important;
  padding:10px 14px!important;margin:0!important;
  background:#fff!important;background-color:#fff!important;background-image:none!important;
  color:#222!important;-webkit-text-fill-color:#222!important;
  font-size:16px!important;font-weight:400!important;line-height:1.3!important;
  box-shadow:none!important;text-shadow:none!important;opacity:1!important;
}
.sdpr-field input::placeholder{color:#8a8a8a!important;opacity:1!important;-webkit-text-fill-color:#8a8a8a!important}
.sdpr-field select option{background:#fff!important;color:#222!important}
.sdpr-field input:focus,.sdpr-field select:focus{border-color:#777!important;outline:0!important;box-shadow:0 0 0 2px rgba(0,0,0,.06)!important;background:#fff!important;color:#111!important}

/* Resumen */
.sdpr-summary{background:#f0f0f0!important;background-color:#f0f0f0!important;color:#111!important;border:0!important;border-radius:6px!important;padding:12px 14px!important;margin-top:2px!important;box-shadow:none!important}
.sdpr-summary>div{display:flex!important;justify-content:space-between!important;gap:20px!important;margin:5px 0!important;color:#111!important;font-size:15px!important}
.sdpr-summary span,.sdpr-summary strong{color:#111!important;-webkit-text-fill-color:#111!important}
.sdpr-summary .woocommerce-Price-amount,.sdpr-summary .woocommerce-Price-currencySymbol{color:inherit!important;font:inherit!important}
.sdpr-summary hr{border:0!important;border-top:1px solid #ccc!important;margin:10px 0!important;height:0!important;background:none!important}
.sdpr-summary .sdpr-discount,.sdpr-summary .sdpr-discount *{color:var(--sdpr-danger)!important;-webkit-text-fill-color:var(--sdpr-danger)!important}
.sdpr-total-row{font-size:19px!important;font-weight:900!important}
.sdpr-total-row strong,.sdpr-total-row strong *{font-weight:900!important;color:#111!important}

/* Botón principal: el tema no puede volverlo gris salvo mientras procesa */
button.sdpr-submit,.sdpr-submit{width:100%!important;min-height:70px!important;flex-direction:column!important;font-size:17px!important;box-shadow:0 2px 5px rgba(0,0,0,.25)!important;margin:0!important}
.sdpr-submit span,.sdpr-submit strong,.sdpr-submit small{color:#fff!important;-webkit-text-fill-color:#fff!important}
.sdpr-submit small{display:block!important;text-transform:none!important;font-size:14px!important;margin-top:3px!important;font-weight:700!important}
button.sdpr-submit:disabled,.sdpr-submit:disabled,button.sdpr-submit.is-loading,.sdpr-submit.is-loading{
  background:var(--sdpr-primary)!important;background-color:var(--sdpr-primary)!important;
  color:#fff!important;-webkit-text-fill-color:#fff!important;
  opacity:.72!important;cursor:wait!important;filter:none!important;
}

.sdpr-msg{text-align:center!important;font-weight:700!important;color:#111!important;margin:0!important}
.sdpr-msg.err{color:#bd1e1e!important}.sdpr-msg.ok{color:#17811b!important}
.sdpr-loading{padding:40px!important;text-align:center!important;font-weight:700!important;background:#fff!important;color:#111!important}
.sdpr-success{text-align:center!important;padding:32px 10px!important;background:#fff!important;color:#111!important}
.sdpr-check{width:64px!important;height:64px!important;border-radius:50%!important;background:var(--sdpr-primary)!important;color:#fff!important;font-size:38px!important;display:flex!important;align-items:center!important;justify-content:center!important;margin:0 auto 15px!important}
.sdpr-success h3{font-size:25px!important;margin:8px 0!important;color:#111!important}.sdpr-success p{color:#111!important}.sdpr-success-total{font-size:20px!important}.sdpr-wa{margin-top:12px!important}

/* Evitar que estilos WooCommerce/tema cambien importes dentro del plugin */
.sdpr-modal .amount,.sdpr-inline .amount,.sdpr-offers-only .amount,
.sdpr-modal .woocommerce-Price-amount,.sdpr-inline .woocommerce-Price-amount,.sdpr-offers-only .woocommerce-Price-amount,
.sdpr-modal .woocommerce-Price-currencySymbol,.sdpr-inline .woocommerce-Price-currencySymbol,.sdpr-offers-only .woocommerce-Price-currencySymbol{color:inherit!important;font-family:inherit!important;font-size:inherit!important;font-weight:inherit!important}

@media(max-width:600px){
  .sdpr-dialog{margin:0!important;width:100vw!important;max-width:100vw!important;max-height:none!important;height:100dvh!important;border-radius:0!important;overflow-y:auto!important}
  .sdpr-modal-content{padding:2px 16px 28px!important;min-height:100%!important}
  button.sdpr-close,.sdpr-close{top:6px!important}
  .sdpr-offer{grid-template-columns:48px 1fr auto!important;gap:8px!important}
  .sdpr-offer img{width:48px!important;height:48px!important}
  .sdpr-offer-main strong{font-size:14px!important}
  .sdpr-price-box b{font-size:15px!important}
  .sdpr-field{grid-template-columns:100px 1fr!important;gap:8px!important}
  .sdpr-field label{font-size:14px!important}
  .sdpr-field input,.sdpr-field select{min-height:50px!important;font-size:16px!important}
  button.sdpr-submit,.sdpr-submit{position:sticky!important;bottom:0!important;z-index:20!important}
}
@media(max-width:380px){
  .sdpr-field{grid-template-columns:1fr!important;gap:5px!important}
  .sdpr-offer{grid-template-columns:44px 1fr!important}
  .sdpr-price-box{grid-column:2!important;text-align:left!important}
  .sdpr-dialog{overflow-y:auto!important}
}

/* v0.1.2 - banners + scroll interno robusto */
.sdpr-dialog{
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  max-height:calc(100dvh - 24px)!important;
}
.sdpr-modal-content{
  overflow-y:auto!important;
  overflow-x:hidden!important;
  max-height:calc(100dvh - 24px)!important;
  overscroll-behavior:contain!important;
  -webkit-overflow-scrolling:touch!important;
  scrollbar-width:thin!important;
}
.sdpr-form-wrap{display:block!important;min-width:0!important;background:#fff!important;color:#111!important}
.sdpr-banner{width:100%!important;margin:0 0 16px!important;padding:0!important;border:0!important;background:#fff!important;overflow:hidden!important;border-radius:4px!important}
.sdpr-banner-bottom{margin:18px 0 0!important}
.sdpr-banner img{display:block!important;width:100%!important;max-width:100%!important;height:auto!important;max-height:none!important;object-fit:contain!important;margin:0!important;padding:0!important;border:0!important;border-radius:4px!important;box-shadow:none!important}

/* cierre siempre visible sin robar área de scroll */
button.sdpr-close,.sdpr-close{
  position:absolute!important;
  top:8px!important;
  right:8px!important;
  float:none!important;
  margin:0!important;
  z-index:50!important;
}
.sdpr-modal-content{padding-top:18px!important}

@media(min-width:601px){
  .sdpr-dialog{width:min(590px,94vw)!important;margin:12px auto!important;max-height:calc(100dvh - 24px)!important}
  .sdpr-modal-content{max-height:calc(100dvh - 24px)!important;padding:18px 20px 24px!important}
}

@media(max-width:600px){
  .sdpr-dialog{
    margin:0!important;
    width:100vw!important;
    max-width:100vw!important;
    height:100dvh!important;
    max-height:100dvh!important;
    border-radius:0!important;
    overflow:hidden!important;
  }
  .sdpr-modal-content{
    height:100dvh!important;
    max-height:100dvh!important;
    min-height:0!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    padding:16px 14px 30px!important;
    padding-bottom:calc(30px + env(safe-area-inset-bottom))!important;
  }
  .sdpr-banner{margin-bottom:12px!important;border-radius:3px!important}
  .sdpr-banner-bottom{margin-top:14px!important;margin-bottom:4px!important}
  .sdpr-banner img{border-radius:3px!important}
  button.sdpr-close,.sdpr-close{top:8px!important;right:8px!important}
}

/* v0.1.3 - popup informativo al cerrar */
.sdpr-exit-modal{display:none!important;position:fixed!important;inset:0!important;z-index:1000010!important;align-items:center!important;justify-content:center!important;padding:18px!important;box-sizing:border-box!important}
.sdpr-exit-modal.is-open{display:flex!important}
.sdpr-exit-backdrop{position:absolute!important;inset:0!important;background:rgba(0,0,0,.68)!important;backdrop-filter:blur(1px)!important}
.sdpr-exit-dialog{position:relative!important;z-index:2!important;width:min(520px,94vw)!important;max-height:calc(100dvh - 36px)!important;background:#fff!important;border-radius:12px!important;box-shadow:0 18px 60px rgba(0,0,0,.38)!important;padding:16px!important;overflow:auto!important;box-sizing:border-box!important}
.sdpr-exit-image{display:block!important;width:100%!important;height:auto!important;max-height:calc(100dvh - 68px)!important;object-fit:contain!important;margin:0!important;padding:0!important;border:0!important;border-radius:8px!important;box-shadow:none!important}
button.sdpr-exit-close,.sdpr-exit-close{position:absolute!important;top:6px!important;right:6px!important;z-index:5!important;width:38px!important;height:38px!important;min-width:38px!important;min-height:38px!important;padding:0!important;margin:0!important;border:0!important;border-radius:50%!important;background:rgba(255,255,255,.96)!important;color:#111!important;font-size:27px!important;line-height:38px!important;font-weight:400!important;text-align:center!important;box-shadow:0 2px 10px rgba(0,0,0,.18)!important;cursor:pointer!important;-webkit-text-fill-color:#111!important}
button.sdpr-exit-close:hover,.sdpr-exit-close:hover{background:#fff!important;color:#000!important;transform:none!important}
@media(max-width:600px){
  .sdpr-exit-modal{padding:12px!important}
  .sdpr-exit-dialog{width:calc(100vw - 24px)!important;max-height:calc(100dvh - 24px)!important;padding:12px!important;border-radius:10px!important}
  .sdpr-exit-image{max-height:calc(100dvh - 48px)!important;border-radius:6px!important}
  button.sdpr-exit-close,.sdpr-exit-close{top:4px!important;right:4px!important;width:36px!important;height:36px!important;min-width:36px!important;min-height:36px!important;line-height:36px!important}
}
