/* Footer button wrapper */
.sys_desistpedido-footer-wrapper {
  display: flex;
  margin: 24px auto;
  padding: 16px 16px;
}

.sys_desistpedido-footer-wrapper--left {
  justify-content: flex-start;
}

.sys_desistpedido-footer-wrapper--center {
  justify-content: center;
}

.sys_desistpedido-footer-wrapper--right {
  justify-content: flex-end;
}

.sys_desistpedido-footer-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--sys_desistpedido-button-color, #f44708);
  color: var(--sys_desistpedido-button-font-color, #ffffff);
  padding: 10px 10px;

  font-weight: 600;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.15);
  transition:
    transform 0.2s ease,
    filter 0.2s ease,
    box-shadow 0.2s ease;
  text-decoration: none;
}

.sys_desistpedido-footer-button--small {
  padding: 6px 14px;
  font-size: 0.875rem;
}

.sys_desistpedido-footer-button--medium {
  padding: 10px 20px;
  font-size: 1rem;
}

.sys_desistpedido-footer-button--large {
  padding: 14px 28px;
  font-size: 1.0625rem;
}

.sys_desistpedido-footer-button:hover,
.sys_desistpedido-footer-button:focus {
  transform: translateY(-2px);
  filter: brightness(0.95);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.18);
  color: var(--sys_desistpedido-button-font-color, #ffffff);
}

.sys_desistpedido-footer-button:focus-visible,
.sys_desistpedido-btn:focus-visible,
.sys_desistpedido-form .form-control:focus-visible,
.sys_desistpedido-form input:focus-visible,
.sys_desistpedido-form textarea:focus-visible {
  outline: 3px solid #005fcc;
  outline-offset: 3px;
}

@media (max-width: 576px) {
  .sys_desistpedido-footer-button {
    width: 100%;
    padding: 16px 20px;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .sys_desistpedido-footer-button,
  .sys_desistpedido-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    min-height: 44px;
  }

  .sys_desistpedido-note-textarea {
    min-height: 80px;
    rows: 3;
  }

  .sys_desistpedido-form .form-control {
    font-size: 1rem;
  }
}

/* Account card (displayCustomerAccount hook) */
.sys_desistpedido-account-card {
  --sys_desistpedido-account-brand: #f1b218;
}

.sys_desistpedido-account-card__inner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.sys_desistpedido-account-card__icon {
  font-size: 2rem;
  color: var(--sys_desistpedido-account-brand);
  line-height: 1;
}

.sys_desistpedido-account-card__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: inherit;
}

.sys_desistpedido-account-card__title {
  font-size: 1rem;
  font-weight: 600;
}

.sys_desistpedido-account-card__subtitle {
  font-size: 0.8125rem;
  color: rgba(15, 23, 42, 0.7);
  line-height: 1.4;
}

.sys_desistpedido-account-legacy {
  list-style: none;
}

/* Privacy / Withdrawal notice on CMS pages */
.sys_desistpedido-privacy {
  margin-top: 24px;
  padding: 16px 20px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #f8fafc;
}

.sys_desistpedido-privacy__note {
  margin: 0 0 12px;
  color: #0f172a;
  font-size: 0.9375rem;
  line-height: 1.5;
  white-space: pre-line;
}

.sys_desistpedido-privacy__title {
  margin: 0 0 12px;
  font-size: 1.05rem;
  font-weight: 600;
  color: #0f172a;
}

.sys_desistpedido-privacy__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}

.sys_desistpedido-privacy__link:hover,
.sys_desistpedido-privacy__link:focus {
  text-decoration: underline;
}

/* Customer-facing legal info notice (Directiva 2011/83/UE), withdrawal form */
.sys_desistpedido-legal-info {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 24px;
  padding: 16px 20px;
  border: 1px solid #bce8f1;
  border-radius: 8px;
  background: #eef6fc;
}

.sys_desistpedido-legal-info__icon {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #ffffff;
  color: #2563a8;
}

.sys_desistpedido-legal-info__icon .material-icons {
  font-size: 18px;
  line-height: 1;
}

.sys_desistpedido-legal-info__title {
  margin: 0 0 4px;
  font-weight: 600;
  color: #1f4d77;
}

.sys_desistpedido-legal-info__text {
  margin: 0;
  color: #2c5d85;
  font-size: 0.9375rem;
  line-height: 1.55;
}

/* Front-side withdrawal form */
.sys_desistpedido-form {
  margin-bottom: 32px;
}

.sys_desistpedido-form-group {
  margin-bottom: 1.25rem;
}

.sys_desistpedido-form-group label {
  font-weight: 600;
  color: #0f172a;
}

.sys_desistpedido-scope {
  border: 0;
  padding: 0;
}

.sys_desistpedido-scope__legend {
  margin-bottom: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
}

.sys_desistpedido-radio {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 0.5rem;
  font-weight: 400;
}

.sys_desistpedido-radio input {
  margin-top: 0.25rem;
}

.sys_desistpedido-contract-parts {
  margin-top: 1rem;
}

.sys_desistpedido-contract-parts__rows {
  overflow-x: auto;
  padding-bottom: 2px;
}

.sys_desistpedido-contract-part-row {
  display: grid;
  grid-template-columns: minmax(160px, 2fr) minmax(140px, 1.4fr) minmax(80px, 0.6fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 0.75rem;
  min-width: 560px;
}

.sys_desistpedido-contract-part-field label {
  display: block;
  margin: 0;
}

.sys_desistpedido-contract-part-field .form-control {
  margin-top: 0.25rem;
}

.sys_desistpedido-contract-part-add {
  margin-top: 0.25rem;
}

.sys_desistpedido-contract-part-remove {
  white-space: nowrap;
}

.sys_desistpedido-form .form-control[aria-invalid="true"] {
  border-color: #dc2626;
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.25);
}

.sys_desistpedido-field-error {
  display: block;
  margin-top: 4px;
  color: #dc2626;
  font-size: 0.875rem;
  line-height: 1.4;
}

.sys_desistpedido-form-errors {
  margin-bottom: 1rem;
}

.sys_desistpedido-order-email-mismatch {
  display: block;
  margin: -8px 0 16px;
  padding: 10px 14px;
  border: 1px solid #dc2626;
  border-radius: 6px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
}

.sys_desistpedido-order-email-mismatch[hidden] {
  display: none;
}

.sys_desistpedido-policy {
  margin: 0 0 1.5rem;
  padding: 12px 16px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  background: #f8fafc;
}

.sys_desistpedido-policy > summary {
  cursor: pointer;
  font-weight: 600;
  color: #0f172a;
  list-style: revert;
}

.sys_desistpedido-policy__content {
  margin-top: 12px;
  color: #0f172a;
  font-size: 0.9375rem;
  line-height: 1.55;
  white-space: pre-line;
}

.sys_desistpedido-btn {
  min-height: 44px;
  padding: 0.625rem 1.25rem;
  font-weight: 600;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    filter 0.15s ease;
}

.sys_desistpedido-btn:hover {
  transform: translateY(-1px);
  filter: brightness(0.97);
}

/* Confirmation receipt */
.sys_desistpedido-confirmation {
  padding: 16px 20px;
  border: 1px solid rgba(15, 23, 42, 0.25);
  border-radius: 8px;
  text-align: left;
}

.sys_desistpedido-confirmation__title {
  margin: 0 0 12px;
  font-size: 1.25rem;
  font-weight: 600;
}

.sys_desistpedido-confirmation__message {
  margin-top: 12px;
  color: #0f172a;
}

/* Step 1 -> Step 2 guest flow: "Buscar" + item selection (item f) */
.sys_desistpedido-step1-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.5rem;
}

.sys_desistpedido-search-status {
  color: #475569;
  font-size: 0.9rem;
}

.sys_desistpedido-step2 {
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 1.5rem;
}

.sys_desistpedido-step2[hidden] {
  display: none;
}

.sys_desistpedido-step2__legend {
  font-size: 1.05rem;
  font-weight: 600;
  color: #0f172a;
  padding: 0;
  margin-bottom: 1rem;
}

.sys_desistpedido-order-info {
  font-size: 0.9rem;
  color: #475569;
  background: #f1f5f9;
  border-radius: 6px;
  padding: 0.6rem 0.85rem;
  margin-bottom: 1rem;
}

.sys_desistpedido-order-info:empty {
  display: none;
}

.sys_desistpedido-items {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
}

.sys_desistpedido-item {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 10px;
}

.sys_desistpedido-item--excluded {
  background: #fef2f2;
  border-color: rgba(220, 38, 38, 0.3);
}

.sys_desistpedido-checkbox {
  display: flex;
  align-items: flex-start;
  text-align: left;
  gap: 10px;
  font-weight: 400;
  cursor: pointer;
  width: 100%;
}

.sys_desistpedido-item__label {
  flex-wrap: wrap;
}

.sys_desistpedido-item__name {
  font-weight: 600;
  color: #0f172a;
}

.sys_desistpedido-item__meta {
  color: #475569;
}

.sys_desistpedido-item__excluded-message {
  margin: 8px 0 0 26px;
  color: #b91c1c;
  font-size: 0.875rem;
  line-height: 1.4;
}

.sys_desistpedido-item__excluded-message[hidden] {
  display: none;
}

/* Registered-customer orders + requests grids (item g) */
.sys_desistpedido-orders-section {
  margin-bottom: 2.5rem;
}

.sys_desistpedido-orders-section__title {
  font-size: 1.15rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 1rem;
}

.sys_desistpedido-empty-state {
  color: #475569;
  font-style: italic;
}

.sys_desistpedido-table-wrapper {
  overflow-x: auto;
}

.sys_desistpedido-table {
  width: 100%;
  border-collapse: collapse;
}

.sys_desistpedido-table th,
.sys_desistpedido-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
  vertical-align: top;
}

.sys_desistpedido-table th {
  font-weight: 600;
  color: #0f172a;
  background: #f8fafc;
  white-space: nowrap;
}

.sys_desistpedido-table__actions-col {
  white-space: nowrap;
}

.sys_desistpedido-table__items-cell {
  min-width: 220px;
  white-space: pre-line;
}

.sys_desistpedido-btn--small {
  min-height: 36px;
  padding: 0.4rem 0.9rem;
  font-size: 0.875rem;
}

.sys_desistpedido-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}

.sys_desistpedido-badge--pending {
  background: #fef3c7;
  color: #92400e;
}

.sys_desistpedido-badge--success {
  background: #dcfce7;
  color: #166534;
}

.sys_desistpedido-badge--danger {
  background: #fee2e2;
  color: #991b1b;
}

/* Per-request detail/timeline view + PDF download (item h) */
.sys_desistpedido-detail {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.sys_desistpedido-detail__summary p {
  margin: 0 0 6px;
  color: #0f172a;
}

.sys_desistpedido-detail__rejection-reason {
  padding: 14px 18px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  border-radius: 8px;
}

.sys_desistpedido-detail__rejection-reason .sys_desistpedido-orders-section__title {
  margin-bottom: 6px;
  color: #991b1b;
}

.sys_desistpedido-detail__rejection-reason p {
  margin: 0;
  color: #7f1d1d;
}

.sys_desistpedido-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid rgba(15, 23, 42, 0.15);
}

.sys_desistpedido-timeline__step {
  position: relative;
  padding: 0 0 1.5rem 24px;
}

.sys_desistpedido-timeline__step:last-child {
  padding-bottom: 0;
}

.sys_desistpedido-timeline__marker {
  position: absolute;
  left: -7px;
  top: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #cbd5e1;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.15);
}

.sys_desistpedido-timeline__step--done .sys_desistpedido-timeline__marker {
  background: #16a34a;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.25);
}

.sys_desistpedido-timeline__step--current .sys_desistpedido-timeline__marker {
  background: #f1b218;
  box-shadow: 0 0 0 2px rgba(241, 178, 24, 0.3);
}

.sys_desistpedido-timeline__label {
  display: block;
  font-weight: 600;
  color: #0f172a;
}

.sys_desistpedido-timeline__date {
  display: block;
  color: #475569;
  font-size: 0.875rem;
  margin-top: 2px;
}

.sys_desistpedido-detail__fields {
  display: grid;
  grid-template-columns: minmax(160px, 280px) 1fr;
  gap: 6px 16px;
  margin: 0 0 1.5rem;
}

.sys_desistpedido-detail__fields dt {
  font-weight: 600;
  color: #0f172a;
}

.sys_desistpedido-detail__fields dd {
  margin: 0;
  color: #0f172a;
}

.sys_desistpedido-detail__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.sys_desistpedido-detail__cancel-form {
  display: inline-flex;
  margin: 0;
}

.sys_desistpedido-detail__back-link {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}

.sys_desistpedido-detail__back-link:hover,
.sys_desistpedido-detail__back-link:focus {
  text-decoration: underline;
}

@media (max-width: 480px) {
  .sys_desistpedido-detail__fields {
    grid-template-columns: 1fr;
  }

  .sys_desistpedido-detail__actions {
    flex-direction: column;
    align-items: stretch;
  }
}
