/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

@keyframes shimmer-slide {
  0%   { transform: translateX(-150%); }
  100% { transform: translateX(250%); }
}

.processing-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.45) 50%, transparent 100%);
  animation: shimmer-slide 1.8s ease-in-out infinite;
}

/* Table row entry animation */
@keyframes row-enter {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.row-entering {
  animation: row-enter 300ms ease-out forwards;
}

/* Expandable cell content (description, filename sub-rows) */
.expandable-cell-item {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 300ms ease-in-out;
}
.expandable-cell-item.is-expanded {
  grid-template-rows: 1fr;
}
.expandable-cell-item > div {
  overflow: hidden;
}

/* Archived record row styling */
.record--archived {
  background-color: rgb(255 251 235); /* amber-50 */
  opacity: 0.75;
}
.record--archived:hover {
  background-color: rgb(254 243 199); /* amber-100 */
}

/* Animated notification banner */
.notification-banner-wrapper {
  display: grid;
  grid-template-rows: 0fr;
  margin-bottom: 0;
  transition: grid-template-rows 300ms ease-in-out, margin-bottom 300ms ease-in-out;
}
.notification-banner-wrapper.is-open {
  grid-template-rows: 1fr;
  margin-bottom: 1rem;
}
.notification-banner-wrapper > div {
  overflow: hidden;
}
.notification-banner-inner {
  transition: background-color 300ms ease-in-out,
              border-color 300ms ease-in-out,
              color 300ms ease-in-out;
}
.banner-theme-amber {
  background-color: rgb(255 251 235); /* amber-50 */
  border-color:     rgb(253 230 138); /* amber-200 */
  color:            rgb(146 64 14);   /* amber-800 */
}
.banner-theme-green {
  background-color: rgb(240 253 244); /* green-50 */
  border-color:     rgb(187 247 208); /* green-200 */
  color:            rgb(22 101 52);   /* green-800 */
}

/* ── Impersonation banner ─────────────────────────────────────────────────── */
/* Breathing animation: brightens over 5 s, holds dark for ~10 s, repeats.   */
@keyframes impersonation-breathe {
  0%   { background-color: #c0392b; } /* bright crimson  */
  33%  { background-color: #7b241c; } /* darkest crimson (~10 s dark phase) */
  100% { background-color: #c0392b; } /* back to bright  */
}

.impersonation-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: 3rem;
  background-color: #c0392b;
  color: #ffffff;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.875rem;
  animation: impersonation-breathe 15s ease-in-out infinite;
}

.impersonation-banner-spacer {
  height: 3rem;
}
.impersonation-banner__stop-btn {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 0.25rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.impersonation-banner__stop-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}
@media (prefers-reduced-motion: reduce) {
  .impersonation-banner {
    animation: none;
  }
}
