/***********************************************************************************
 * MANTENER SIEMPRE EL fonst.css, luego ir copiando las versiones en front@x.z.css
 ***********************************************************************************/

.ogbsf-hidden {
  display: none !important;
}

.ogbsf-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.6);
}

.ogbsf-backdrop {
  position: fixed;
  inset: 0;
}

.ogbsf-dialog {
  position: relative;
  top: 50vh;
  left: 50vw;
  transform: translate(-50%, -50%);
  width: min(560px, calc(100% - 24px));
  background: #ffffff;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
}

.ogbsf-dialog-content {
  max-height: calc(96vh - 50px);
  overflow: auto;
}

.ogbsf-loading {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: rgba(255, 255, 255, 0.82);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.ogbsf-loading-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #dbe4ec;
  border-top-color: #0f766e;
  border-radius: 50%;
  animation: ogbsf-spin 0.8s linear infinite;
}

.ogbsf-loading-text {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #0f766e;
}

@keyframes ogbsf-spin {
  to {
    transform: rotate(360deg);
  }
}

.ogbsf-stepper {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
  display: none;
}

.ogbsf-step-pill {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid #c8d0da;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #667085;
  background: #f8fafc;
}

.ogbsf-step-pill.is-active {
  color: #ffffff;
  border-color: #0f766e;
  background: #0f766e;
}

.ogbsf-step-pill.is-complete {
  color: #0f766e;
  border-color: #99f6e4;
  background: #ecfeff;
}

.ogbsf-close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: 0;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.ogbsf-help {
  margin-top: 4px;
  margin-bottom: 16px;
}

.ogbsf-location-summary {
  margin: -4px 0 14px;
  font-size: 14px;
  font-weight: 600;
  color: #0f766e;
}

.ogbsf-row {
  margin-bottom: 14px;
}

.ogbsf-row label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

.ogbsf-row input,
.ogbsf-row select {
  width: 100%;
  height: 42px;
  border: 1px solid #ccd3dc;
  border-radius: 6px;
  padding: 0 12px;
}

.ogbsf-feedback {
  font-size: 14px;
}

.ogbsf-feedback.is-error {
  color: #b42318;
}

.ogbsf-feedback.is-success {
  color: #067647;
}

.ogbsf-actions {
  margin-top: 12px;
  text-align: right;
}

.ogbsf-actions:has(.btn-secondary.ogbsf-hidden){
    flex-direction: row-reverse;
}

.ogbsf-actions-split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ogbsf-method-options {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.ogbsf-method-card {
    flex: 1 0 40%;
    width: 40%;
    min-height: 112px;
    border: 1px solid #d0d5dd;
    border-radius: 12px;
    background: #ffffff;
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    position: relative;
    overflow: hidden;
}

.ogbsf-carrier-options {
  display: flex;
  gap: 4px;
  margin-top: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.ogbsf-carrier-card {
  width: 100%;
  border: 1px solid #d0d5dd;
  border-radius: 3px;
  background: #ffffff;
  padding: 4px 10px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.ogbsf-carrier-card-label {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.3;
  text-align: left;
}

.ogbsf-carrier-card:hover,
.ogbsf-method-card:hover {
  border-color: #0f766e;
  box-shadow: 0 2px 8px rgba(15, 118, 110, 0.12);
}

.ogbsf-carrier-card.is-selected,
.ogbsf-method-card.is-selected {
  border-color: #0f766e;
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.15);
  transform: translateY(-1px);
}

.ogbsf-method-card-media {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  border-radius: 12px;
  background: #f8fafc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ogbsf-carrier-card-media,
.ogbsf-carrier-card-media-empty {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: 3px;
  background: #f8fafc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ogbsf-carrier-card-media img,
.ogbsf-method-card-media img {
  max-width: 100%;
  max-height: 100%;
  display: block;
}

.ogbsf-carrier-card-media-empty,
.ogbsf-method-card-media-empty {
  font-size: 22px;
  font-weight: 700;
  color: #0f766e;
}

.ogbsf-method-card-flag {
    width: calc(100% + 24px);
    align-items: center;
    padding: 5px 10px 4px;
    border-radius: 0;
    background: #ecfdf3;
    color: #067647;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    margin: 0 0 -14px;
    display: block;
    border-top: solid 1px #bbddcf;
}

.ogbsf-method-card-label {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: #101828;
  text-align: center;
  flex-grow: 1;
}

.ogbsf-method-card-short-desc {
  font-size: 12px;
  color: #667085;
  text-align: center;
  line-height: 1.3;
  margin-top: 2px;
}

.ogbsf-method-long-desc,
.ogbsf-carrier-long-desc {
  font-size: 14px;
  line-height: 1.5;
}

.ogbsf-method-long-desc {
  margin-top: 12px;
}

.ogbsf-carrier-long-desc {
  margin: 0 0 12px;
}

@media (max-width: 576px) {
  .ogbsf-dialog {
    padding: 18px;
  }

  .ogbsf-method-options {
    grid-template-columns: 1fr;
  }

  .ogbsf-actions-split {
    flex-direction: column-reverse;
    align-items: stretch;
  }
}

/* ── Aviso producto no disponible ─────────────────────────── */
.ogbsf-product-notice {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 16px;
  margin: 12px 0;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  font-size: 14px;
  color: #9a3412;
  line-height: 1.4;
}

.ogbsf-product-notice-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.ogbsf-product-notice-text {
  flex: 1;
  min-width: 0;
}

.ogbsf-product-notice-btn {
  border: 1px solid #9a3412;
  background: transparent;
  color: #9a3412;
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.ogbsf-product-notice-btn:hover {
  background: #9a3412;
  color: #fff;
}

/* ── Aviso en línea de artículo de carrito ─────────────────── */
.ogbsf-cart-notice {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.4rem;
  padding: 0.3rem 0.55rem;
  border-radius: 5px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  font-size: 0.8rem;
  color: #9a3412;
  max-width: 100%;
  flex-wrap: wrap;
}
.ogbsf-cart-notice-icon {
  flex-shrink: 0;
  font-size: 0.85rem;
}
.ogbsf-cart-notice-text {
  flex: 1 1 auto;
  min-width: 0;
}
.ogbsf-cart-notice-btn {
  flex-shrink: 0;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  border: 1px solid #9a3412;
  background: transparent;
  color: #9a3412;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.3;
}
.ogbsf-cart-notice-btn:hover {
  background: #9a3412;
  color: #fff;
}

/* ── Aviso de incompatibilidad en carrito AJAX ─────────────── */
.ogbsf-cart-ajax-notice {
  margin-top: 0.8rem;
  margin-bottom: 0.8rem;
  padding: 0.65rem 0.8rem;
  border-radius: 6px;
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: #9a3412;
  font-size: 0.82rem;
  line-height: 1.35;
}
.ogbsf-cart-ajax-notice-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
}
.ogbsf-cart-ajax-notice-icon {
  flex-shrink: 0;
}
.ogbsf-cart-ajax-notice-list {
  margin: 0.45rem 0 0;
  padding-left: 1.15rem;
}
.ogbsf-cart-ajax-notice-list li {
  margin: 0;
}

/* ── Modal de advertencia "agregar de todos modos" ─────────── */
.ogbsf-warn-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ogbsf-warn-modal.ogbsf-hidden {
  display: none;
}
.ogbsf-warn-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
}
.ogbsf-warn-dialog {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 10px;
  padding: 2rem 1.75rem 1.5rem;
  max-width: 440px;
  width: calc(100% - 24px);
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,.22);
}
.ogbsf-warn-icon {
  font-size: 2.4rem;
  color: #d97706;
  display: block;
  margin-bottom: 0.6rem;
}
.ogbsf-warn-dialog h4 {
  margin: 0 0 0.65rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: #111;
}
.ogbsf-warn-body {
  margin: 0 0 1.4rem;
  font-size: 0.95rem;
  color: #444;
  line-height: 1.5;
}
.ogbsf-warn-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
}
.ogbsf-warn-btn-cancel,
.ogbsf-warn-btn-confirm {
  flex: 1 1 auto;
  min-width: 140px;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  border: 2px solid transparent;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  line-height: 1.3;
}
.ogbsf-warn-btn-cancel {
  background: #f3f4f6;
  color: #374151;
  border-color: #d1d5db;
}
.ogbsf-warn-btn-cancel:hover {
  background: #e5e7eb;
}
.ogbsf-warn-btn-confirm {
  background: #d97706;
  color: #fff;
  border-color: #d97706;
}
.ogbsf-warn-btn-confirm:hover {
  background: #b45309;
  border-color: #b45309;
}

/* ── Badge de CP seleccionado ──────────────────────────────── */
.ogbsf-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0 0.5rem;
    border: none;
    background: transparent;
    color: #FFFF;
    cursor: pointer;
    width: auto;
    position: relative;
}
.ogbsf-badge-text {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    border: none;
    background: transparent;
    color: #FFFF;
    line-height: 1.3;
    font-weight: 500;
}

.ogbsf-badge:hover {
 opacity: 0.6;
}

.ogbsf-badge-sep {
  display: inline;
}

.ogbsf-badge-method {
  display: inline;
}

.ogbsf-badge-icon {
  font-size: 1em;
  line-height: 1em;
  opacity: 0.6;
  position: absolute;
  top: 0;
  right: 0.75em;
}


.maybe-icon {
    display: block;
    width: 1.28571429em;
    text-align: center;
    display: inline-block;
    font: normal normal normal 1.4285714286rem / 1 FontAwesome;
    text-rendering: auto;
    margin: 0 1.4em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    --fa: "\f48b";
}
.maybe-icon:before {
    content: var(--fa);
}





#mobile-header .ogbsf-badge {
  color: #000000;
  flex-direction: row-reverse;
  padding: 0.5rem 0.5rem 0.3rem 0.8rem;
  background: #e0e0e0;
  border-radius: 1rem 0 0 1rem;
  margin: 0 0 0.3rem;
  font-size: 0.8rem;
}
#mobile-header .maybe-icon {
  font-size: 1.25rem;
}
#mobile-header .ogbsf-badge-icon {
  top: 0.15rem;
  right: 0.15rem;
}
#mobile-header .maybe-icon {
  margin: 0 0.2em 0 0.1em;
}
#mobile-header .ogbsf-badge-text {
  color: inherit;
}
#mobile-header #mobile-header-sticky:has(.ogbsf-badge) {
  text-align: right;
}
