/**
 * Sticky save bar + dirty pulse — shared by long batch forms
 * (club profile, pilot profile). Hangar keeps its own bar; this is the
 * site-wide pattern for “edit then Save”.
 */

@keyframes rcs-dirty-pulse {
  0%, 100% {
    filter: brightness(1);
    box-shadow:
      0 0 0 2px rgba(250, 204, 21, 0.5),
      0 0 10px 1px rgba(250, 204, 21, 0.32);
  }
  50% {
    filter: brightness(1.1);
    box-shadow:
      0 0 0 4px rgba(250, 204, 21, 0.78),
      0 0 18px 3px rgba(250, 204, 21, 0.5);
  }
}

.rcs-btn.rcs-btn--dirty,
.btn.btn--dirty {
  animation: rcs-dirty-pulse 1.05s ease-in-out infinite;
}

.rcs-club-admin-grid > .rcs-dirty-save,
.rcs-profile-main > .rcs-dirty-save {
  grid-column: 1 / -1;
}

.rcs-dirty-save {
  position: -webkit-sticky;
  position: sticky;
  top: 8px;
  z-index: 24;
  flex-shrink: 0;
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--rcs-border, rgba(148, 163, 184, 0.45));
  background: color-mix(in srgb, var(--rcs-panel, #fff) 94%, transparent);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.16);
}

[data-theme="dark"] .rcs-dirty-save {
  background: color-mix(in srgb, var(--rcs-panel, #111827) 92%, transparent);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.36);
}

.rcs-dirty-save__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
}

.rcs-dirty-save__copy {
  min-width: 0;
  flex: 1 1 220px;
}

.rcs-dirty-save__hint {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--rcs-muted, #64748b);
}

.rcs-dirty-save__unsaved {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #a16207;
}

[data-theme="dark"] .rcs-dirty-save__unsaved {
  color: #facc15;
}

.rcs-dirty-save__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
}

.rcs-dirty-save__actions .rcs-club-admin-flash,
.rcs-dirty-save__actions .rcs-status,
.rcs-dirty-save__actions .rcs-error {
  margin: 0;
}

@media (max-width: 640px) {
  .rcs-dirty-save {
    top: 0;
    border-radius: 0 0 14px 14px;
  }
}
