/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *
 *= require_tree .
 *= require_self
 */

/* Incident spacing */
.incident-wrapper:not(:last-child) {
  margin-bottom: 1.5rem; /* 24px spacing between incidents */
}

/* Timeline styles have been moved to app/assets/tailwind/application.css for proper theme integration */

/* Toast notification animations */
@keyframes slide-in-right {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slide-out-right {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.animate-slide-in-right {
  animation: slide-in-right 0.3s ease-out forwards;
}

.animate-slide-out-right {
  animation: slide-out-right 0.3s ease-out forwards;
}

@keyframes shake-no {
  0% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-6px);
  }
  40% {
    transform: translateX(6px);
  }
  60% {
    transform: translateX(-4px);
  }
  80% {
    transform: translateX(4px);
  }
  100% {
    transform: translateX(0);
  }
}

.join-org-invalid {
  animation: shake-no 0.45s ease-in-out;
}

.join-org-error {
  border-color: #f87171;
  box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.2);
  transition: border-color 0.6s ease, box-shadow 0.6s ease;
}

.icon-picker-popover {
  z-index: 2000;
}

.color-picker-popover {
  z-index: 2000;
}

/* Toast notification container styles */
#notifications {
  pointer-events: none;
}

#notifications > * {
  pointer-events: auto;
  margin-bottom: 0.5rem;
}

/* Dockview styles live in dockview.css */

/* Incident context menu */
.incident-context-menu {
  color: rgb(15 23 42);
}

.incident-context-menu__list {
  min-width: 220px;
  padding: 0.35rem;
  margin: 0;
  list-style: none;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  box-shadow: 0 18px 40px -24px rgba(15, 23, 42, 0.45), 0 6px 12px -6px rgba(15, 23, 42, 0.25);
}

.incident-context-menu__row {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  gap: 0.6rem;
  align-items: center;
  width: 100%;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  font-size: 0.82rem;
  line-height: 1;
  color: inherit;
  text-decoration: none;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
}

.incident-context-menu__row:hover,
.incident-context-menu__row:focus-visible {
  background: rgba(15, 23, 42, 0.06);
}

.incident-context-menu__row--active {
  background: rgba(15, 23, 42, 0.08);
  font-weight: 600;
}

.incident-context-menu__row--header {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.6);
  position: relative;
  padding-top: 0.55rem;
  padding-bottom: 0.35rem;
}

.incident-context-menu__row--header::after {
  content: "";
  position: absolute;
  left: 0.6rem;
  right: 0.6rem;
  bottom: 0.15rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(15, 23, 42, 0.25), transparent);
}

.incident-context-menu__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: rgba(15, 23, 42, 0.6);
}

.incident-context-menu__icon--success {
  color: #16a34a;
}

.incident-context-menu__icon--danger {
  color: #ef4444;
}

.incident-context-menu__icon--warning {
  color: #f59e0b;
}

.incident-context-menu__label {
  color: rgba(15, 23, 42, 0.92);
}

.incident-context-menu__chevron {
  font-size: 0.7rem;
  color: rgba(15, 23, 42, 0.3);
}

.incident-context-menu__level {
  font-size: 0.65rem;
  justify-self: end;
  opacity: 0.65;
  transform: translateY(-0.5px);
}

.incident-context-menu__level--critical {
  color: #f87171;
}

.incident-context-menu__level--high {
  color: #fb923c;
}

.incident-context-menu__level--medium {
  color: #94a3b8;
}

.incident-context-menu__level--low {
  color: #38bdf8;
}

/* Incident seal overlay */
.incident--sealed {
  position: relative;
  overflow: hidden;
}

.incident-seal-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(241, 245, 249, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.incident-seal-overlay__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

.incident-seal-overlay__id {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: rgba(15, 23, 42, 0.8);
}

.incident-seal-overlay__label {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.9);
}

.incident-context-menu__divider {
  height: 1px;
  margin: 0.35rem 0.4rem;
  background: rgba(15, 23, 42, 0.1);
}

.incident-context-menu__submenu {
  position: relative;
}

.incident-context-menu__list--submenu {
  position: absolute;
  left: calc(100% - 6px);
  top: -6px;
  display: none;
  z-index: 10;
}

.incident-context-menu__submenu:hover .incident-context-menu__list--submenu,
.incident-context-menu__list--submenu:hover {
  display: block;
}

.dev-toolbar {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--dev-toolbar-height, 40px);
  background: rgba(15, 23, 42, 0.94);
  color: #e2e8f0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
  backdrop-filter: blur(6px);
}

.dev-toolbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 0.85rem;
  gap: 1rem;
}

.dev-toolbar__left,
.dev-toolbar__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dev-toolbar__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.4rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0f172a;
  background: #fbbf24;
  border-radius: 999px;
}

.dev-toolbar__title {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.dev-toolbar__meta {
  font-size: 0.75rem;
  opacity: 0.7;
}

.dev-toolbar__form {
  margin: 0;
}

.dev-toolbar__button {
  border: none;
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  color: #0f172a;
  background: #e2e8f0;
}

.dev-toolbar__button.is-on {
  background: #22c55e;
  color: #052e16;
}

.dev-toolbar__button.is-off {
  background: #f97316;
  color: #431407;
}

.dev-toolbar__timer {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.dev-toolbar__timer-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.7;
}

.dev-toolbar__timer-value {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.dev-toolbar__timer-value.is-locked {
  color: #fbbf24;
}

.dev-toolbar-offset {
  top: var(--dev-toolbar-height, 0px);
}

.dev-toolbar-offset-4 {
  top: calc(var(--dev-toolbar-height, 0px) + 1rem);
}
