/**
 * Modal de integración con Rappi (self-onboarding).
 * Usado en templates/main/business.html (#panel-modal-rappi). Sigue el diseño
 * "Rappi Self-Onboarding" (6 pasos) y se adapta a celular por debajo de 768px.
 */
#panel-modal-rappi {
  --rappi-ob-accent: #D1003C;
  --rappi-ob-accent-dark: #B0003A;
  --rappi-ob-accent-soft: #FBE5EC;
  --rappi-ob-accent-line: #F0B3C4;
  --rappi-ob-selected: #FFF8FA;
  --rappi-ob-text: #1F2328;
  --rappi-ob-text-2: #3D434A;
  --rappi-ob-muted: #5B6169;
  --rappi-ob-border: #E3E5E9;
  --rappi-ob-border-soft: #EEF0F3;
  --rappi-ob-input: #C4C8CE;
  --rappi-ob-band: #FAFAFB;
}
body.pos-tienda #panel-modal-rappi {
  --rappi-ob-accent: #064F8F;
  --rappi-ob-accent-dark: #053E70;
  --rappi-ob-accent-soft: #E3EEF8;
  --rappi-ob-accent-line: #A9C6E3;
  --rappi-ob-selected: #F3F8FD;
}

@media (min-width: 768px) {
  #panel-modal-rappi .modal-dialog.rappi-ob-dialog {
    width: 860px;
    max-width: calc(100% - 32px);
  }
}

#panel-modal-rappi .modal-dialog .modal-content.rappi-ob-modal {
  padding: 0;
  border: 0;
  border-radius: 6px;
  box-shadow: 0 12px 40px rgba(20, 20, 30, 0.18);
  overflow: hidden;
  font-family: Montserrat, system-ui, sans-serif;
  color: var(--rappi-ob-text);
}
.rappi-ob-modal p,
.rappi-ob-modal h3,
.rappi-ob-modal h4 {
  margin: 0;
}
.rappi-ob-modal input[type="checkbox"] {
  accent-color: var(--rappi-ob-accent);
}

/* Encabezado */
.rappi-ob-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 22px 32px;
  border-bottom: 1px solid var(--rappi-ob-border);
}
.rappi-ob-header__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  min-width: 0;
}
.rappi-ob-header__heading {
  font-family: inherit;
  font-size: 20px;
  font-weight: 700;
  color: var(--rappi-ob-accent-dark);
}
.rappi-ob-close {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: -12px -12px -12px 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--rappi-ob-muted);
  cursor: pointer;
}
.rappi-ob-close:hover,
.rappi-ob-close:focus {
  background: var(--rappi-ob-border-soft);
}

/* Pasos */
.rappi-ob-stepper {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 18px 32px;
  list-style: none;
  background: var(--rappi-ob-band);
  border-bottom: 1px solid var(--rappi-ob-border);
}
.rappi-ob-stepper li {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--rappi-ob-muted);
}
.rappi-ob-stepper li:last-child {
  flex: none;
}
.rappi-ob-stepper li:not(:last-child)::after {
  content: "";
  flex: 1 1 auto;
  min-width: 12px;
  height: 2px;
  margin: 0 2px;
  background: var(--rappi-ob-border);
}
.rappi-ob-stepper__dot {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--rappi-ob-border-soft);
  font-size: 12px;
  font-weight: 700;
}
.rappi-ob-stepper__label {
  white-space: nowrap;
}
.rappi-ob-stepper li.is-done {
  color: var(--rappi-ob-text-2);
}
.rappi-ob-stepper li.is-done::after {
  background: var(--rappi-ob-accent-line);
}
.rappi-ob-stepper li.is-done .rappi-ob-stepper__dot {
  background: var(--rappi-ob-accent-soft);
  color: var(--rappi-ob-accent-dark);
}
.rappi-ob-stepper li.is-active {
  font-weight: 700;
  color: var(--rappi-ob-text);
}
.rappi-ob-stepper li.is-active .rappi-ob-stepper__dot {
  background: var(--rappi-ob-accent);
  color: #FFFFFF;
}

/* Cuerpo */
.rappi-ob-body {
  max-height: calc(100vh - 300px);
  overflow-y: auto;
  padding: 24px 32px;
}
.rappi-ob-body--connect {
  padding: 36px 32px 32px;
}
.rappi-ob-body--stores {
  padding: 20px 32px;
}
.rappi-ob-body--activation,
.rappi-ob-body--login {
  padding: 32px;
}
.rappi-ob-body--manage {
  max-height: calc(100vh - 220px);
}
.rappi-ob-view {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.rappi-ob-body--connect .rappi-ob-view,
.rappi-ob-body--activation .rappi-ob-view {
  gap: 22px;
}
.rappi-ob-body--stores .rappi-ob-view {
  gap: 14px;
}

.rappi-ob-intro {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rappi-ob-intro--tight {
  gap: 6px;
}
.rappi-ob-h1 {
  font-family: inherit;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
}
.rappi-ob-h1--sm {
  font-size: 22px;
}
.rappi-ob-h2 {
  font-family: inherit;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}
.rappi-ob-h3 {
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
}
.rappi-ob-lead {
  max-width: 680px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--rappi-ob-text-2);
}
.rappi-ob-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--rappi-ob-text-2);
}
.rappi-ob-text-sm {
  font-size: 13px;
  color: var(--rappi-ob-muted);
}
.rappi-ob-hint {
  font-size: 13px;
  color: var(--rappi-ob-muted);
  text-align: center;
}
.rappi-ob-hint--left {
  text-align: left;
}
.rappi-ob-error {
  color: #8A002D;
}
.rappi-ob-empty {
  padding: 16px;
  text-align: center;
  color: var(--rappi-ob-muted);
}
.rappi-ob-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.rappi-ob-name {
  font-size: 15px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.rappi-ob-name--lg {
  font-size: 16px;
  font-weight: 700;
}
.rappi-ob-meta {
  font-size: 12px;
  color: var(--rappi-ob-muted);
}
.rappi-ob-only-mobile {
  display: none;
}

.rappi-ob-loading {
  margin-bottom: 16px;
  padding: 10px 14px;
  border-radius: 6px;
  background: #F4F5F7;
  font-size: 14px;
  color: var(--rappi-ob-text-2);
}

/* Tarjetas */
.rappi-ob-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--rappi-ob-border);
  border-radius: 8px;
}
.rappi-ob-eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rappi-ob-muted);
}
.rappi-ob-howto {
  padding: 22px 24px;
}
.rappi-ob-howto__item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.rappi-ob-howto__item p {
  margin-top: 4px;
  font-size: 15px;
  line-height: 1.5;
}
.rappi-ob-howto__num {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--rappi-ob-accent-soft);
  color: var(--rappi-ob-accent-dark);
  font-size: 13px;
  font-weight: 700;
}
.rappi-ob-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-top: 6px;
}
.rappi-ob-signup {
  display: flex;
  justify-content: center;
  padding-top: 18px;
  border-top: 1px solid var(--rappi-ob-border);
  font-size: 13px;
  color: var(--rappi-ob-text-2);
  text-align: center;
}
.rappi-ob-modal a {
  color: var(--rappi-ob-accent-dark);
}
.rappi-ob-waiting {
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 28px 20px;
  font-size: 15px;
  font-weight: 600;
  color: var(--rappi-ob-text-2);
}

/* Avisos */
.rappi-ob-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 14px;
}
.rappi-ob-banner__text {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.rappi-ob-banner__text--top {
  align-items: flex-start;
}
.rappi-ob-banner__text > svg {
  flex: none;
}
.rappi-ob-banner b {
  font-weight: 600;
}
.rappi-ob-banner--success {
  background: #E8F5F0;
  color: #0B5E47;
}
.rappi-ob-banner--warn {
  padding: 14px 18px;
  background: #FFF6E0;
  border: 1px solid #F1DFA8;
  color: #5C4300;
  font-size: 13px;
}
.rappi-ob-banner--warn b {
  font-size: 14px;
}
.rappi-ob-banner--error {
  background: var(--rappi-ob-accent-soft);
  color: #8A002D;
}

/* Botones */
.rappi-ob-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 22px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
}
.rappi-ob-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}
.rappi-ob-btn--primary {
  padding: 10px 26px;
  border-radius: 22px;
  background: var(--rappi-ob-accent);
  color: #FFFFFF;
  font-weight: 600;
}
.rappi-ob-btn--primary:hover:not([disabled]),
.rappi-ob-btn--primary:focus:not([disabled]) {
  background: var(--rappi-ob-accent-dark);
  color: #FFFFFF;
}
.rappi-ob-btn--lg {
  min-height: 48px;
  padding: 12px 30px;
  border-radius: 24px;
  font-size: 16px;
  gap: 10px;
}
.rappi-ob-btn--outline {
  border-color: var(--rappi-ob-accent);
  background: #FFFFFF;
  color: var(--rappi-ob-accent-dark);
}
.rappi-ob-btn--outline:hover:not([disabled]),
.rappi-ob-btn--outline:focus:not([disabled]) {
  background: var(--rappi-ob-selected);
}
.rappi-ob-btn--ghost {
  padding: 10px 20px;
  border-color: var(--rappi-ob-input);
  border-radius: 22px;
  background: #FFFFFF;
  color: var(--rappi-ob-text);
  font-size: 14px;
  font-weight: 600;
}
.rappi-ob-btn--warn {
  border-color: #8A6400;
  background: #FFFFFF;
  color: #5C4300;
}
.rappi-ob-btn--sm {
  min-height: 36px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
}
.rappi-ob-btn--link {
  min-height: 0;
  padding: 4px 2px;
  border: 0;
  color: var(--rappi-ob-accent-dark);
  font-size: 13px;
  font-weight: 600;
}
.rappi-ob-btn--link:hover {
  text-decoration: underline;
}
.rappi-ob-btn--danger-link {
  padding: 10px 4px;
  border: 0;
  color: var(--rappi-ob-accent-dark);
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
}
.rappi-ob-spin {
  animation: rappi-ob-spin 1s linear infinite;
}
@keyframes rappi-ob-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Etiquetas de estado */
.rappi-ob-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}
.rappi-ob-pill--lg {
  gap: 8px;
  padding: 6px 12px;
  border-radius: 14px;
  font-size: 13px;
}
.rappi-ob-pill--muted {
  background: var(--rappi-ob-border-soft);
  color: var(--rappi-ob-text-2);
}
.rappi-ob-pill--active {
  background: #E8F5F0;
  color: #0B5E47;
}
.rappi-ob-pill--error {
  background: #FBE5EC;
  color: #8A002D;
}
.rappi-ob-pill--warn {
  background: #FFF1D6;
  color: #6B4A00;
}
.rappi-ob-pill__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0B7A5C;
}
.rappi-ob-chip {
  padding: 4px 10px;
  border-radius: 12px;
  background: var(--rappi-ob-accent-soft);
  font-size: 12px;
  font-weight: 600;
  color: #8A002D;
}
body.pos-tienda .rappi-ob-chip {
  color: var(--rappi-ob-accent-dark);
}

/* Tablas */
.rappi-ob-table {
  border: 1px solid var(--rappi-ob-border);
  border-radius: 8px;
  overflow: hidden;
}
.rappi-ob-table__head,
.rappi-ob-table__row {
  display: grid;
  align-items: center;
  gap: 12px;
}
.rappi-ob-table__head {
  padding: 10px 16px;
  background: var(--rappi-ob-band);
  border-bottom: 1px solid var(--rappi-ob-border);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--rappi-ob-muted);
}
.rappi-ob-table__row {
  margin: 0;
  padding: 14px 16px;
  border-bottom: 1px solid var(--rappi-ob-border-soft);
  font-weight: 400;
}
.rappi-ob-table__row:last-child {
  border-bottom: 0;
}

.rappi-ob-table--pick .rappi-ob-table__head,
.rappi-ob-table--pick .rappi-ob-table__row {
  grid-template-columns: 32px minmax(0, 1fr) 150px 150px;
}
.rappi-ob-table--pick .rappi-ob-table__row {
  cursor: pointer;
}
.rappi-ob-table--pick input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
}
.rappi-ob-table__row.is-selected {
  background: var(--rappi-ob-selected);
}
.rappi-ob-table__row.is-disabled {
  color: #6B7178;
  cursor: not-allowed;
}
.rappi-ob-cell-name {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.rappi-ob-cell-name.is-child {
  padding-left: 4px;
}
.rappi-ob-cell-name > svg {
  flex: none;
}
.rappi-ob-cell-id {
  font-size: 13px;
  color: var(--rappi-ob-text-2);
  overflow-wrap: anywhere;
}

.rappi-ob-table--manage .rappi-ob-table__head,
.rappi-ob-table--manage .rappi-ob-table__row {
  grid-template-columns: minmax(0, 1fr) 130px 120px 110px 110px;
  padding-left: 18px;
  padding-right: 18px;
}
.rappi-ob-table--manage .rappi-ob-table__head {
  font-size: 11px;
}
.rappi-ob-table__row.is-failed {
  background: #FFF6F8;
}
.rappi-ob-cell {
  display: flex;
  align-items: center;
  min-width: 0;
}
.rappi-ob-cell--action {
  justify-content: flex-end;
}

/* Tooltip de "Quitar" deshabilitado en una marca padre con tiendas hijas. El botón deshabilitado no
   recibe el mouse, así que el hover lo toma el contenedor. Va a la izquierda del botón (centrado en la
   fila) porque .rappi-ob-table recorta lo que se sale; en celular va arriba. */
.rappi-ob-tooltip {
  position: relative;
  display: inline-flex;
}
.rappi-ob-tooltip.has-tooltip .rappi-ob-btn[disabled] {
  pointer-events: none;
}
.rappi-ob-tooltip.has-tooltip::after,
.rappi-ob-tooltip.has-tooltip::before {
  position: absolute;
  z-index: 2;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s;
  pointer-events: none;
}
.rappi-ob-tooltip.has-tooltip::after {
  content: attr(data-rappi-tip);
  top: 50%;
  right: calc(100% + 10px);
  transform: translateY(-50%);
  width: max-content;
  max-width: 240px;
  padding: 7px 10px;
  border-radius: 4px;
  background: var(--rappi-ob-text);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
}
.rappi-ob-tooltip.has-tooltip::before {
  content: "";
  top: 50%;
  right: calc(100% + 4px);
  transform: translateY(-50%);
  border-style: solid;
  border-width: 6px 0 6px 6px;
  border-color: transparent transparent transparent var(--rappi-ob-text);
}
.rappi-ob-tooltip.has-tooltip:hover::after,
.rappi-ob-tooltip.has-tooltip:hover::before {
  opacity: 1;
  visibility: visible;
}
.rappi-ob-dash {
  font-size: 13px;
  color: var(--rappi-ob-muted);
}

/* Opciones del paso 3 */
.rappi-ob-options {
  gap: 12px;
  padding: 16px;
}
.rappi-ob-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  font-weight: 400;
  cursor: pointer;
}
.rappi-ob-check input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
}
.rappi-ob-check__title {
  font-size: 14px;
  font-weight: 600;
}
.rappi-ob-check__desc {
  font-size: 13px;
  color: var(--rappi-ob-muted);
}
/* "Mantener la marca padre": siempre activo, no se puede desmarcar */
.rappi-ob-check--fixed {
  cursor: default;
}
.rappi-ob-check__box {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border-radius: 4px;
  background: var(--rappi-ob-accent);
  color: #fff;
}
.rappi-ob-check--fixed:not(.ng-hide) + .rappi-ob-events {
  padding-top: 12px;
  border-top: 1px solid var(--rappi-ob-border-soft);
}

/* Eventos de Rappi: informativos, no se pueden cambiar */
.rappi-ob-events {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.rappi-ob-events__title {
  font-size: 14px;
  font-weight: 600;
}
.rappi-ob-events__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.rappi-ob-events__item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.rappi-ob-events__icon {
  flex: none;
  margin-top: 1px;
  color: var(--rappi-ob-accent);
}
.rappi-ob-events__label {
  font-size: 13px;
  font-weight: 600;
}
.rappi-ob-events__desc {
  font-size: 12px;
  color: var(--rappi-ob-muted);
}

/* Paso 4 */
.rappi-ob-progress {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rappi-ob-progress__labels {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--rappi-ob-text-2);
}
.rappi-ob-progress__bar {
  display: flex;
  height: 8px;
  border-radius: 4px;
  background: var(--rappi-ob-border-soft);
  overflow: hidden;
}
.rappi-ob-progress__active {
  background: #0B7A5C;
}
.rappi-ob-progress__pending {
  background: var(--rappi-ob-accent-line);
}
.rappi-ob-activation {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--rappi-ob-border-soft);
}
.rappi-ob-activation:last-child {
  border-bottom: 0;
}
.rappi-ob-activation.is-failed {
  background: #FFF6F8;
}
.rappi-ob-activation__head,
.rappi-ob-activation__error,
.rappi-ob-config__head,
.rappi-ob-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
}
.rappi-ob-activation__error p {
  flex: 1 1 240px;
  font-size: 13px;
  color: var(--rappi-ob-text-2);
}

/* Paso 5 y formularios */
.rappi-ob-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.rappi-ob-grid--end {
  align-items: end;
}
.rappi-ob-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.rappi-ob-field label {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}
.rappi-ob-field small {
  font-size: 12px;
  color: var(--rappi-ob-muted);
}
.rappi-ob-select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--rappi-ob-input);
  border-radius: 6px;
  background: #FFFFFF;
  font-family: inherit;
  font-size: 14px;
  color: var(--rappi-ob-text);
}
.rappi-ob-select:focus {
  outline: 2px solid var(--rappi-ob-accent-line);
  outline-offset: 1px;
  border-color: var(--rappi-ob-accent);
}
.rappi-ob-select--sm {
  width: auto;
  min-width: 96px;
  height: 36px;
  padding: 0 8px;
  font-size: 13px;
}
.rappi-ob-switch-field {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 22px;
  font-size: 14px;
  font-weight: 600;
}

/* Interruptor */
.rappi-ob-switch {
  flex: none;
  display: flex;
  justify-content: flex-start;
  width: 56px;
  height: 32px;
  padding: 3px;
  border: 0;
  border-radius: 16px;
  background: #D9DCE1;
  cursor: pointer;
  transition: background 0.15s;
}
.rappi-ob-switch span {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.rappi-ob-switch.is-on {
  justify-content: flex-end;
  background: var(--rappi-ob-accent);
}
.rappi-ob-switch--sm {
  width: 50px;
  height: 28px;
  border-radius: 14px;
}
.rappi-ob-switch--sm span {
  width: 22px;
  height: 22px;
}
.rappi-ob-switch[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Pie */
.rappi-ob-footer {
  padding: 16px 32px;
  border-top: 1px solid var(--rappi-ob-border);
}
.rappi-ob-footer__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.rappi-ob-footer__row--end {
  justify-content: flex-end;
}
.rappi-ob-footer__hint {
  font-size: 13px;
  color: var(--rappi-ob-muted);
}
.rappi-ob-footer__buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  margin-left: auto;
}

/* Celular */
@media (max-width: 767px) {
  #panel-modal-rappi .modal-dialog.rappi-ob-dialog {
    margin: 8px;
  }
  .rappi-ob-header {
    padding: 16px;
  }
  .rappi-ob-close {
    margin: -8px -8px -8px 0;
  }
  .rappi-ob-stepper {
    padding: 14px 16px;
  }
  .rappi-ob-stepper li:not(.is-active) .rappi-ob-stepper__label {
    display: none;
  }
  .rappi-ob-body,
  .rappi-ob-body--manage {
    max-height: none;
    overflow: visible;
  }
  .rappi-ob-body,
  .rappi-ob-body--connect,
  .rappi-ob-body--stores,
  .rappi-ob-body--activation,
  .rappi-ob-body--login {
    padding: 20px 16px;
  }
  .rappi-ob-h1 {
    font-size: 20px;
  }
  .rappi-ob-h2,
  .rappi-ob-h1--sm {
    font-size: 18px;
  }
  .rappi-ob-howto {
    padding: 16px;
  }
  .rappi-ob-cta .rappi-ob-btn--lg,
  .rappi-ob-section-head .rappi-ob-btn {
    width: 100%;
  }
  .rappi-ob-grid,
  .rappi-ob-events__list {
    grid-template-columns: minmax(0, 1fr);
  }
  .rappi-ob-switch-field {
    padding-bottom: 0;
  }

  .rappi-ob-table__head {
    display: none;
  }
  .rappi-ob-only-mobile {
    display: inline;
  }
  .rappi-ob-table--pick .rappi-ob-table__row {
    grid-template-columns: 28px minmax(0, 1fr);
    row-gap: 6px;
  }
  .rappi-ob-table--pick .rappi-ob-cell-id,
  .rappi-ob-table--pick .rappi-ob-cell-status {
    grid-column: 2;
  }
  .rappi-ob-table--pick .rappi-ob-cell-id {
    font-size: 12px;
  }

  .rappi-ob-table--manage .rappi-ob-table__row {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 14px 16px;
  }
  .rappi-ob-table--manage .rappi-ob-cell {
    justify-content: space-between;
    gap: 12px;
  }
  .rappi-ob-table--manage .rappi-ob-cell[data-label]::before {
    content: attr(data-label);
    font-size: 13px;
    font-weight: 600;
    color: var(--rappi-ob-muted);
  }
  .rappi-ob-cell--action .rappi-ob-btn,
  .rappi-ob-cell--action .rappi-ob-tooltip {
    width: 100%;
  }
  .rappi-ob-tooltip.has-tooltip::after {
    top: auto;
    right: 0;
    bottom: calc(100% + 10px);
    transform: none;
  }
  .rappi-ob-tooltip.has-tooltip::before {
    top: auto;
    right: 24px;
    bottom: calc(100% + 4px);
    transform: none;
    border-width: 6px 6px 0 6px;
    border-color: var(--rappi-ob-text) transparent transparent transparent;
  }

  .rappi-ob-footer {
    padding: 14px 16px;
  }
  .rappi-ob-footer__row,
  .rappi-ob-footer__buttons {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    margin-left: 0;
  }
  .rappi-ob-footer__buttons {
    flex-direction: column-reverse;
  }
  .rappi-ob-footer__row .rappi-ob-btn {
    width: 100%;
  }
  .rappi-ob-footer__hint {
    text-align: center;
  }
}

/* Confirmaciones del modal de Rappi (LD-13866, #rappi-confirm): diálogo propio con el estilo del modal,
   encima del modal de Rappi. Reemplaza los SweetAlert. Está dentro de #panel-modal-rappi, así que usa sus variables, y lleva
   su propia fuente porque el modal anterior no tiene la clase .rappi-ob-modal. */
.rappi-ob-confirm {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: rgba(31, 35, 40, 0.45);
}
.rappi-ob-confirm__dialog {
  width: 100%;
  max-width: 480px;
  max-height: 100%;
  overflow-y: auto;
  border-radius: 6px;
  background: #FFFFFF;
  box-shadow: 0 12px 40px rgba(20, 20, 30, 0.18);
  font-family: Montserrat, system-ui, sans-serif;
  color: var(--rappi-ob-text);
  text-align: left;
}
.rappi-ob-confirm__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--rappi-ob-border);
}
.rappi-ob-confirm__icon {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #FFF1D6;
  color: #6B4A00;
}
.rappi-ob-confirm__title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--rappi-ob-accent-dark);
}
.rappi-ob-confirm__text {
  margin: 0;
  padding: 20px 24px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--rappi-ob-text-2);
}
.rappi-ob-confirm__strong {
  font-weight: 600;
  color: var(--rappi-ob-text);
}
.rappi-ob-confirm__footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--rappi-ob-border);
}
@media (max-width: 767px) {
  .rappi-ob-confirm__header,
  .rappi-ob-confirm__text,
  .rappi-ob-confirm__footer {
    padding-left: 16px;
    padding-right: 16px;
  }
  .rappi-ob-confirm__footer {
    flex-direction: column-reverse;
  }
  .rappi-ob-confirm__footer .rappi-ob-btn {
    width: 100%;
  }
}
