/*
 * 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.
 */

/* Alert badge pulse — draws attention to new alerts in the sidebar */
@keyframes alert-pulse {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.4); }
  50% { transform: scale(1); }
  75% { transform: scale(1.4); }
}
.animate-alert-pulse {
  animation: alert-pulse 0.8s ease-in-out;
}

/* Flash alert banner — pulses background for urgency */
@keyframes flash-alert {
  0%, 100% { background-color: #fef2f2; }
  25% { background-color: #fecaca; }
  50% { background-color: #fef2f2; }
  75% { background-color: #fecaca; }
}
.animate-flash-alert {
  animation: flash-alert 1.2s ease-in-out;
}

/* Live Edit mode */
.edit-mode-offset {
  padding-top: 3.5rem;
}

.edit-mode .live-edit-field {
  position: relative;
  outline: 2px dashed transparent;
  outline-offset: 4px;
  transition: outline-color 0.15s ease;
  cursor: pointer;
}

.edit-mode .live-edit-field:hover {
  outline-color: #3b82f6;
}

.live-edit-pencil {
  display: none;
  position: absolute;
  top: -0.5rem;
  right: -0.5rem;
  width: 1.75rem;
  height: 1.75rem;
  background: #3b82f6;
  color: white;
  border-radius: 9999px;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  z-index: 10;
  text-decoration: none;
}

.edit-mode .live-edit-field:hover .live-edit-pencil {
  display: flex;
}

.edit-mode .live-edit-image-wrapper {
  position: relative;
  cursor: pointer;
}

.live-edit-camera-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  z-index: 10;
}

.edit-mode .live-edit-image-wrapper:hover .live-edit-camera-overlay {
  display: flex;
}

.edit-mode .gallery-image-wrapper {
  position: relative;
}

.gallery-delete-btn {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  width: 1.5rem;
  height: 1.5rem;
  background: rgba(239, 68, 68, 0.9);
  color: white;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 10;
  cursor: pointer;
  border: none;
}

.edit-mode .gallery-image-wrapper:hover .gallery-delete-btn {
  opacity: 1;
}

.loading {
  opacity: 0.5;
  pointer-events: none;
}
