/* RBcumplimientoDirectiva2023_2673. Adaptación privada. No distribuir. */
.rbcd-withdrawal-wrap { margin: 0.75rem 0; }
.rbcd-align-center { text-align: center; }
.rbcd-align-left { text-align: left; }
.rbcd-align-right { text-align: right; }

.rbcd-withdrawal-btn {
  display: inline-block;
  padding: 0.65rem 1.25rem;
  text-decoration: none !important;
  border-radius: 6px;
  font-weight: 600;
  line-height: 1.3;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.rbcd-withdrawal-btn:hover,
.rbcd-withdrawal-btn:focus {
  text-decoration: none !important;
}

.rbcd-withdrawal-muted { color: #666; font-size: 0.875rem; }
.rbcd-withdrawal-form .card,
.rbcd-confirm-step .card,
.rbcd-success .card,
.rbcd-success .alert { border-radius: 8px; }

.rbcd-steps-front {
  display: flex;
  gap: 8px;
  margin-bottom: 1.25rem;
}
.rbcd-steps-front .rbcd-step {
  flex: 1;
  text-align: center;
  padding: 8px 10px;
  border-radius: 6px;
  background: #e9ecef;
  font-size: 13px;
}
.rbcd-steps-front .rbcd-step.is-active {
  background: var(--rbcd-theme-primary, #b50404);
  border-color: var(--rbcd-theme-primary, #b50404);
  color: #fff;
  font-weight: 600;
}
.rbcd-steps-front .rbcd-step.is-done {
  background: var(--rbcd-theme-primary-soft, #f6e7e7);
  border: 1px solid var(--rbcd-theme-primary, #b50404);
  color: var(--rbcd-theme-primary, #b50404);
  font-weight: 600;
}

.rbcd-orders-table { margin-bottom: 0; }
.rbcd-order-row--disabled {
  opacity: 0.75;
  background-color: #f5f5f5 !important;
}
.rbcd-order-detail { margin: 1rem 0; text-align: left; }

@media (max-width: 576px) {
  .rbcd-withdrawal-btn { display: block; text-align: center; }
}

@media (max-width: 767px) {
  .rbcd-orders-table thead { display: none; }
  .rbcd-orders-table tr {
    display: block;
    margin-bottom: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 0.5rem;
  }
  .rbcd-orders-table td {
    display: block;
    border: none;
    padding: 0.35rem 0.5rem;
  }
}

/* Constancia informativa, sin estados de tramitación. */
.rbcd-order-submission-notice {
  margin-bottom: 1rem;
  text-align: left;
}
.rbcd-order-submission-notice__list {
  margin: 0;
  padding: 0;
}
.rbcd-order-submission-notice__item {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  padding: 0.4rem 0;
}
.rbcd-order-submission-notice__item + .rbcd-order-submission-notice__item {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}
.rbcd-order-submission-notice__mail {
  font-size: 0.875rem;
}
.rbcd-order-detail__action {
  margin-top: 0.75rem;
}

.rbcd-order-history-submitted {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.75rem;
}
.rbcd-order-history-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.75rem;
  min-width: 0;
}
.rbcd-order-history-badge {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: #d1fae5;
  color: #065f46;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
.rbcd-order-history-date,
.rbcd-order-history-reference,
.rbcd-order-history-count,
.rbcd-order-history-not-submitted {
  font-size: 0.875rem;
  line-height: 1.35;
}
.rbcd-order-history-reference {
  font-family: monospace;
  overflow-wrap: anywhere;
}
.rbcd-order-history-count,
.rbcd-order-history-not-submitted {
  color: #666;
}

/* Historial: acción secundaria centrada dentro de la celda de estado. */
.rbcd-order-history-inline {
  display: block;
  width: 100%;
  margin-top: 0.55rem;
  clear: both;
  text-align: center;
}
.rbcd-order-history-inline-button {
    display: inline-flex;
    width: auto;
    max-width: 100%;
    min-height: 24px;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    padding: 0.45rem 0.85rem;
    border: 1px solid #b9bec4 !important;
    border-radius: 4px;
    background: #fff !important;
    /* color: #484343 !important; */
    box-shadow: none !important;
    font-size: 1.14rem;
    font-weight: 700;
    line-height: 0;
    letter-spacing: 0;
    text-transform: none !important;
    white-space: normal;
    text-align: center;
    text-decoration: none !important;
}
.rbcd-order-history-inline-button:hover,
.rbcd-order-history-inline-button:focus {
  border-color: #9da3aa !important;
  background: #f5f5f5 !important;
  color: #333 !important;
  box-shadow: none !important;
  text-decoration: none !important;
}
.rbcd-order-history-inline--submitted {
  text-align: center;
}
.rbcd-order-history-inline-label {
    display: inline-block;
    max-width: 100%;
    margin: 0 auto;
    padding: 0.4rem 0.7rem;
    border-radius: 4px;
    background: #d1fae5;
    color: #065f46;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.rbcd-order-picker-submitted {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
}
/* Detalle del pedido: misma línea visual que la acción del historial, adaptada a este bloque. */
.rbcd-order-detail__action {
  margin-top: 0.75rem;
  text-align: left;
}
.rbcd-order-detail-button {
    display: inline-flex;
    width: auto;
    max-width: 100%;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0.65rem 1.1rem;
    border: 1px solid #b9bec4 !important;
    border-radius: 4px;
    background: #fff !important;
    color: inherit !important;
    box-shadow: none !important;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.8;
    letter-spacing: 0;
    text-transform: none !important;
    white-space: normal;
    text-align: center;
    text-decoration: none !important;
}
.rbcd-order-detail-button:hover,
.rbcd-order-detail-button:focus {
  border-color: #9da3aa !important;
  background: #f5f5f5 !important;
  color: inherit !important;
  box-shadow: none !important;
  text-decoration: none !important;
}

@media (max-width: 576px) {
  .rbcd-order-detail__action { text-align: center; }
  .rbcd-order-detail-button { width: 100%; }
}



/* Detalle del pedido: ubicación visual antes del historial de estados. */
.rbcd-order-detail.rbcd-order-detail--repositioned {
  margin: 0.9rem 0 1.2rem;
  text-align: left;
}
.rbcd-order-detail.rbcd-order-detail--repositioned.box,
.rbcd-order-detail.rbcd-order-detail--repositioned.card {
  border: 0;
  background: transparent;
  box-shadow: none;
}
.rbcd-order-detail.rbcd-order-detail--repositioned .box-body,
.rbcd-order-detail.rbcd-order-detail--repositioned .card-body {
  padding: 0;
}

/* v1.1.13: botón dentro de la información del pedido, antes de la línea divisoria. */
.rbcd-order-detail.rbcd-order-detail--inside-order-info {
  margin: 0.9rem 0 0.9rem;
}

/* v1.1.14: reducir prácticamente a cero los márgenes del botón dentro del bloque del pedido. */
.rbcd-order-detail.rbcd-order-detail--repositioned,
.rbcd-order-detail.rbcd-order-detail--inside-order-info,
.rbcd-order-detail.rbcd-order-detail--repositioned.box,
.rbcd-order-detail.rbcd-order-detail--repositioned.card,
.rbcd-order-detail.rbcd-order-detail--inside-order-info.box,
.rbcd-order-detail.rbcd-order-detail--inside-order-info.card {
  margin: 0 !important;
  margin-block: 0 !important;
  padding: 0 !important;
}

.rbcd-order-detail.rbcd-order-detail--repositioned .box-body,
.rbcd-order-detail.rbcd-order-detail--repositioned .card-body,
.rbcd-order-detail.rbcd-order-detail--inside-order-info .box-body,
.rbcd-order-detail.rbcd-order-detail--inside-order-info .card-body {
  margin: 0 !important;
  padding: 0 !important;
}

.rbcd-order-detail.rbcd-order-detail--inside-order-info .rbcd-order-detail__action {
  margin: 0.2rem 0 0.25rem !important;
  padding: 0 !important;
}

/* v1.1.15: acción de desistimiento junto al título del historial de estados. */
.rbcd-order-history-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  margin: 0 0 0.75rem;
}

.rbcd-order-history-title-row > h1,
.rbcd-order-history-title-row > h2,
.rbcd-order-history-title-row > h3,
.rbcd-order-history-title-row > h4,
.rbcd-order-history-title-row > h5,
.rbcd-order-history-title-row > h6,
.rbcd-order-history-title-row > .h1,
.rbcd-order-history-title-row > .h2,
.rbcd-order-history-title-row > .h3,
.rbcd-order-history-title-row > .h4,
.rbcd-order-history-title-row > .h5,
.rbcd-order-history-title-row > .h6 {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0 !important;
}

.rbcd-order-detail__action.rbcd-order-detail__action--history-title {
  flex: 0 0 auto;
  margin: 0 !important;
  padding: 0 !important;
  text-align: right;
}

.rbcd-order-detail--notice-before-history,
.rbcd-order-detail--notice-before-history.box,
.rbcd-order-detail--notice-before-history.card {
  margin: 0 0 0.75rem !important;
  padding: 0 !important;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.rbcd-order-detail--notice-before-history .box-body,
.rbcd-order-detail--notice-before-history .card-body {
  margin: 0 !important;
  padding: 0 !important;
}

@media (max-width: 767px) {
  .rbcd-order-history-title-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }

  .rbcd-order-detail__action.rbcd-order-detail__action--history-title {
    width: 100%;
    text-align: left;
  }

  .rbcd-order-detail__action.rbcd-order-detail__action--history-title .rbcd-order-detail-button {
    width: 100%;
  }
}


/* v1.1.16: color principal heredado del tema y validación visual de email. */
.rbcd-email-mismatch {
  border-color: #dc3545 !important;
}
#rbcd-email-match-message.is-error {
  color: #dc3545 !important;
  font-weight: 600;
}
#rbcd-email-match-message.is-valid {
  color: #198754 !important;
}


/* v1.1.20: confirmación coherente con la paleta del tema y mejor espaciado. */
.rbcd-confirm-summary .card-body,
.rbcd-confirm-summary .card-block {
  padding: 1.25rem !important;
}

.rbcd-confirm-summary h1,
.rbcd-confirm-summary h2,
.rbcd-confirm-summary h3 {
  margin-top: 0;
}

.rbcd-confirm-summary ul {
  margin-top: 0.75rem;
  margin-bottom: 1rem;
  padding-left: 1.4rem;
}

.rbcd-form-actions,
.rbcd-confirm-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.rbcd-form-actions .btn,
.rbcd-confirm-actions .btn {
  margin: 0 !important;
}

@media (max-width: 576px) {
  .rbcd-form-actions,
  .rbcd-confirm-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .rbcd-form-actions .btn,
  .rbcd-confirm-actions .btn {
    width: 100%;
    text-align: center;
  }
}

/* v1.1.22: productos integrados en el bloque verde de confirmación. */
.rbcd-success .rbcd-success-products {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.rbcd-success .rbcd-success-products h3 {
  margin: 0 0 0.55rem;
}

.rbcd-success .rbcd-success-products ul {
  margin: 0;
  padding-left: 1.25rem;
}

.rbcd-success .rbcd-success-products li + li {
  margin-top: 0.25rem;
}

/* v1.1.29: aceptación obligatoria de condiciones y privacidad. */
.rbcd-privacy-consent-field {
  margin: 0.9rem 0 1rem;
}

.rbcd-privacy-consent-label {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0;
  cursor: pointer;
  line-height: 1.45;
}

.rbcd-privacy-consent-label input[type="checkbox"] {
  flex: 0 0 auto;
  margin-top: 0.22rem;
}

.rbcd-privacy-consent-label a {
  text-decoration: underline;
}


/* v1.1.31: selector de pedidos más claro, con productos y acciones separadas. */
.rbcd-order-picker-table-wrap {
  margin-top: 0.9rem;
  border: 1px solid rgba(0, 0, 0, 0.09);
  border-radius: 7px;
  overflow: hidden;
}

.rbcd-order-picker .rbcd-orders-table {
  width: 100%;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
}

.rbcd-order-picker .rbcd-orders-table thead th {
  padding: 0.85rem 0.75rem;
  border: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.11);
  background: #f4f4f4;
  font-weight: 700;
  vertical-align: middle;
}

.rbcd-order-picker .rbcd-orders-table tbody td {
  padding: 0.95rem 0.75rem;
  border: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
  vertical-align: middle;
}

.rbcd-order-picker .rbcd-orders-table tbody tr:last-child td {
  border-bottom: 0;
}

.rbcd-order-picker .rbcd-order-row--disabled {
  opacity: 1;
}

.rbcd-order-picker .rbcd-order-row--disabled td {
  background: #fafafa;
}

.rbcd-orders-col-order { width: 13%; }
.rbcd-orders-col-date { width: 15%; }
.rbcd-orders-col-products { width: 31%; }
.rbcd-orders-col-return { width: 15%; }
.rbcd-orders-col-actions { width: 26%; }

.rbcd-order-picker-reference strong {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.rbcd-order-picker-date {
  white-space: nowrap;
}

.rbcd-order-picker-products {
  min-width: 230px;
  line-height: 1.35;
}

.rbcd-order-picker-product {
  display: block;
}

.rbcd-order-picker-product + .rbcd-order-picker-product {
  margin-top: 0.25rem;
}

.rbcd-order-picker-products-more,
.rbcd-order-picker-request-count,
.rbcd-order-picker-unavailable {
  display: block;
  margin-top: 0.3rem;
  color: #6c757d;
  font-size: 0.85em;
  line-height: 1.3;
}

.rbcd-order-picker-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.86em;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
}

.rbcd-order-picker-badge--submitted {
  background: #d1fae5;
  color: #065f46;
}

.rbcd-order-picker-badge--empty {
  border: 1px solid #d6d9dd;
  background: #fff;
  color: #60656b;
}

.rbcd-order-picker-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.rbcd-order-picker-actions .btn {
  min-height: 34px;
  margin: 0 !important;
  padding: 0.5rem 0.8rem;
  border-radius: 4px;
  line-height: 1.25;
  white-space: normal;
  text-align: center;
}

.rbcd-order-picker-view {
  border: 1px solid #b9bec4 !important;
  background: #fff !important;
  color: inherit !important;
  box-shadow: none !important;
  text-decoration: none !important;
}

.rbcd-order-picker-view:hover,
.rbcd-order-picker-view:focus {
  border-color: #858b92 !important;
  background: #f4f4f4 !important;
  color: inherit !important;
}

@media (max-width: 991px) {
  .rbcd-orders-col-products { width: 27%; }
  .rbcd-orders-col-actions { width: 30%; }

  .rbcd-order-picker-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .rbcd-order-picker-actions .btn {
    width: 100%;
  }
}

@media (max-width: 767px) {
  .rbcd-order-picker-table-wrap {
    border: 0;
    overflow: visible;
  }

  .rbcd-order-picker .rbcd-orders-table tbody tr {
    display: block;
    margin-bottom: 1rem;
    padding: 0;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 7px;
    background: #fff;
    overflow: hidden;
  }

  .rbcd-order-picker .rbcd-orders-table tbody td {
    display: grid;
    grid-template-columns: minmax(95px, 34%) minmax(0, 1fr);
    gap: 0.7rem;
    padding: 0.7rem 0.8rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    background: #fff;
  }

  .rbcd-order-picker .rbcd-orders-table tbody td::before {
    content: attr(data-label);
    font-weight: 700;
    line-height: 1.35;
  }

  .rbcd-order-picker .rbcd-orders-table tbody td:last-child {
    border-bottom: 0;
  }

  .rbcd-order-picker-products {
    min-width: 0;
  }

  .rbcd-order-picker-actions {
    align-items: stretch;
  }
}

@media (max-width: 420px) {
  .rbcd-order-picker .rbcd-orders-table tbody td {
    display: block;
  }

  .rbcd-order-picker .rbcd-orders-table tbody td::before {
    display: block;
    margin-bottom: 0.35rem;
  }
}
