.sp-account,
.sp-account *,
.sp-auth-my-account,
.sp-auth-my-account * {
  box-sizing: border-box;
}

.sp-account,
.sp-auth-my-account {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.sp-auth-modal {
  z-index: 200000 !important;
}

.sp-auth-modal__dialog {
  z-index: 200001 !important;
}

.sp-auth-modal__header.sp-auth-modal__header--booking {
  display: block;
  width: 100%;
}

.sp-auth-booking-modal__toolbar,
.sp-auth-booking-modal__toolbar-divider,
.sp-auth-booking-modal__header-body,
.sp-auth-booking-modal__hero {
  width: 100%;
  min-width: 0;
}

.sp-account-guest:not(.sp-account-guest-gate),
.sp-auth-my-account-guest {
  padding: 1.5rem;
  border: 1px solid var(--sp-ma-color-border, var(--sp-wp-border, #e0e0e0));
  border-radius: var(--sp-ma-radius-card, 20px);
  background: var(--sp-ma-color-base, var(--sp-wp-base, #fff));
}

.sp-account .sp-auth-status-badge,
.sp-auth-my-account .sp-auth-status-badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  border-radius: var(--sp-ma-radius-control, 12px);
  padding: 0.125rem 0.5rem;
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.sp-account .sp-auth-status-badge--completed,
.sp-auth-my-account .sp-auth-status-badge--completed {
  color: #166534 !important;
  background-color: color-mix(in oklab, #22c55e 22%, transparent) !important;
}

.sp-account .sp-auth-status-badge--processing,
.sp-auth-my-account .sp-auth-status-badge--processing {
  color: color-mix(in oklab, var(--sp-wp-primary, #2563eb) 88%, #0f172a) !important;
  background-color: color-mix(in oklab, var(--sp-wp-primary, #2563eb) 18%, transparent) !important;
}

.sp-account .sp-auth-status-badge--pending,
.sp-auth-my-account .sp-auth-status-badge--pending {
  color: #92400e !important;
  background-color: color-mix(in oklab, #f59e0b 24%, transparent) !important;
}

.sp-account .sp-auth-status-badge--on-hold,
.sp-auth-my-account .sp-auth-status-badge--on-hold {
  color: #9a3412 !important;
  background-color: color-mix(in oklab, #fb923c 22%, transparent) !important;
}

.sp-account .sp-auth-status-badge--cancelled,
.sp-account .sp-auth-status-badge--failed,
.sp-auth-my-account .sp-auth-status-badge--cancelled,
.sp-auth-my-account .sp-auth-status-badge--failed {
  color: #991b1b !important;
  background-color: color-mix(in oklab, #ef4444 18%, transparent) !important;
}

.sp-account a.sp-auth-booking-recap__invoice--download,
.sp-account a.sp-auth-booking-recap__invoice--download:hover,
.sp-account a.sp-auth-booking-recap__invoice--download:active,
.sp-account a.sp-auth-booking-recap__invoice--download:focus,
.sp-account a.sp-auth-booking-recap__invoice--download:focus-visible,
.sp-account a.sp-auth-booking-recap__invoice--download:visited,
.sp-auth-my-account a.sp-auth-booking-recap__invoice--download,
.sp-auth-my-account a.sp-auth-booking-recap__invoice--download:hover,
.sp-auth-my-account a.sp-auth-booking-recap__invoice--download:active,
.sp-auth-my-account a.sp-auth-booking-recap__invoice--download:focus,
.sp-auth-my-account a.sp-auth-booking-recap__invoice--download:focus-visible,
.sp-auth-my-account a.sp-auth-booking-recap__invoice--download:visited {
  color: #fff !important;
  text-decoration: none !important;
}

.sp-account .sp-auth-status-badge--refunded,
.sp-auth-my-account .sp-auth-status-badge--refunded {
  color: var(--sp-wp-subtle, #64748b) !important;
  background-color: color-mix(in oklab, var(--sp-wp-subtle, #64748b) 24%, transparent) !important;
}

.sp-account .sp-auth-status-badge--default,
.sp-auth-my-account .sp-auth-status-badge--default {
  color: var(--sp-wp-contrast, #0f172a) !important;
  background-color: color-mix(in oklab, var(--sp-wp-muted, #e2e8f0) 72%, var(--sp-wp-base, #fff)) !important;
}

/* Bouton outline profil : neutralise les hovers du thème WP/Kadence. */
.sp-account button.sp-auth-btn--outline,
.sp-account button.sp-auth-btn--outline:hover,
.sp-account button.sp-auth-btn--outline:active,
.sp-account button.sp-auth-btn--outline:focus,
.sp-account button.sp-auth-btn--outline:focus-visible,
.sp-auth-my-account button.sp-auth-btn--outline,
.sp-auth-my-account button.sp-auth-btn--outline:hover,
.sp-auth-my-account button.sp-auth-btn--outline:active,
.sp-auth-my-account button.sp-auth-btn--outline:focus,
.sp-auth-my-account button.sp-auth-btn--outline:focus-visible {
  background: transparent !important;
  background-color: transparent !important;
  color: var(--sp-wp-primary, #32678a) !important;
  border-color: var(--sp-wp-primary, #32678a) !important;
  opacity: 1 !important;
  box-shadow: none !important;
  transform: none !important;
  transition: none !important;
}

.sp-account button.sp-auth-btn--outline:hover > span,
.sp-auth-my-account button.sp-auth-btn--outline:hover > span {
  text-decoration: underline !important;
  text-underline-offset: 0.15em;
}

.sp-account button.sp-auth-btn--outline:hover .sp-auth-profile__edit-btn-icon,
.sp-auth-my-account button.sp-auth-btn--outline:hover .sp-auth-profile__edit-btn-icon {
  text-decoration: none !important;
}

.sp-auth-card--profile .sp-admin-profile-preview {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--sp-wp-contrast, #1d2327);
}

.sp-auth-card--profile .sp-admin-profile-preview__label {
  margin: 0;
  font-weight: 600;
  white-space: nowrap;
}

.sp-auth-card--profile .sp-admin-profile-preview__select {
  margin: 0;
  min-width: 9rem;
  max-width: 11rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--sp-wp-border, #c3c4c7);
  border-radius: var(--sp-ma-radius-control, 12px);
  background: #fff;
  color: inherit;
  font-size: inherit;
  cursor: pointer;
}

.sp-auth-card--profile:has(.sp-admin-profile-preview) .sp-auth-profile__greeting {
  padding-right: 11rem;
}

@media (max-width: 640px) {
  .sp-auth-card--profile .sp-admin-profile-preview {
    position: static;
    justify-content: flex-end;
    margin-bottom: 0.75rem;
  }

  .sp-auth-card--profile:has(.sp-admin-profile-preview) .sp-auth-profile__greeting {
    padding-right: 0;
  }
}
