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

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

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

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

/* Global confirm modal (replaces browser confirm dialogs) */
body.confirm-modal-open {
  overflow: hidden;
}

.confirm-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
}

.confirm-modal {
  width: min(100%, 30rem);
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.2);
}

.confirm-modal__header {
  padding: 1rem 1.25rem 0.75rem;
  border-bottom: 1px solid #f1f5f9;
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
}

.confirm-modal__content {
  padding: 1rem 1.25rem;
}

.confirm-modal__message {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #334155;
  white-space: pre-line;
}

.confirm-modal__actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  padding: 0.75rem 1.25rem 1.25rem;
}

.confirm-modal__input {
  width: 100%;
  margin-top: 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.65rem;
  padding: 0.6rem 0.75rem;
  font-size: 0.9rem;
  color: #0f172a;
}

.confirm-modal__input:focus {
  outline: 2px solid #f59e0b;
  outline-offset: 1px;
  border-color: #f59e0b;
}

.confirm-modal__button {
  border: 0;
  border-radius: 0.65rem;
  padding: 0.55rem 0.95rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.confirm-modal__button--secondary {
  background: #f8fafc;
  color: #334155;
  border: 1px solid #e2e8f0;
}

.confirm-modal__button--primary {
  background: #0f172a;
  color: #ffffff;
}

.confirm-modal__button--danger {
  background: #dc2626;
  color: #ffffff;
}

.confirm-modal__button--secondary:hover {
  background: #f1f5f9;
}

.confirm-modal__button--primary:hover {
  background: #020617;
}

.confirm-modal__button--danger:hover {
  background: #b91c1c;
}

/* Calendar density tuning for crowded week view */
.calendar-week-grid .calendar-block {
  overflow: hidden;
  border-radius: 0.6rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1);
}

.calendar-week-grid .calendar-block__title {
  line-height: 1.2;
}

.calendar-week-grid .calendar-block__meta {
  line-height: 1.15;
}

.calendar-density-compact .calendar-week-grid .calendar-block {
  padding: 0.2rem 0.35rem !important;
  border-width: 1px !important;
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.12);
}

.calendar-density-compact .calendar-week-grid .calendar-block svg {
  width: 0.72rem;
  height: 0.72rem;
  margin-top: 0.1rem;
}

.calendar-density-compact .calendar-week-grid .calendar-block__title {
  font-size: 0.68rem;
  line-height: 1.05;
  font-weight: 600;
}

.calendar-density-compact .calendar-week-grid .calendar-block__meta {
  display: none;
}

.calendar-density-compact .calendar-week-grid .resize-handle {
  height: 0.5rem !important;
}

.calendar-density-compact .calendar-week-grid .resize-handle > div {
  width: 1.1rem !important;
  margin-top: 0.1rem !important;
}

.resize-handle-grip {
  background-color: currentColor;
  opacity: 0.95;
}
