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

/* Toast Notifications */
#toast-container {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 9999;
  max-width: 24rem;
}

[data-toast] {
  margin-bottom: 0.5rem;
  transition: all 0.3s ease-out;
  transform: translateX(0);
  opacity: 1;
}

.toast .alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Enhanced styling for better visibility */
.toast .alert-success {
  background-color: #d1fae5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.toast .alert-error {
  background-color: #fee2e2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

.toast .alert-warning {
  background-color: #fef3c7;
  border: 1px solid #fcd34d;
  color: #92400e;
}

.toast .alert-info {
  background-color: #dbeafe;
  border: 1px solid #93c5fd;
  color: #1e40af;
}

/* Mobile responsive */
@media (max-width: 640px) {
  #toast-container {
    top: 1rem;
    right: 1rem;
    left: 1rem;
    max-width: none;
  }
}

/* Animation keyframes for smoother transitions */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}


.urgent-badge {
  background-color: #ef4444;
  color: white;
  animation: pulse-badge 1.5s ease-in-out infinite;
}

@keyframes pulse-badge {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
  }
}

/* FullCalendar Custom Styling */
/* Override FullCalendar theme with PPATAX brand colors */
.fc {
  --fc-border-color: #e5e7eb;
  --fc-button-bg-color: #315483;
  --fc-button-border-color: #315483;
  --fc-button-hover-bg-color: #264166;
  --fc-button-hover-border-color: #264166;
  --fc-button-active-bg-color: #1e324d;
  --fc-button-active-border-color: #1e324d;
  --fc-today-bg-color: #eff6ff;
  --fc-neutral-bg-color: #f9fafb;
  --fc-page-bg-color: #ffffff;
}

/* Calendar container */
.fc {
  font-family: inherit;
}

/* Header toolbar styling */
.fc .fc-toolbar {
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.fc .fc-toolbar-title {
  font-size: 1.875rem;
  font-weight: 700;
  color: #111827;
}

/* Button styling */
.fc .fc-button {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.5rem;
  text-transform: capitalize;
  transition: all 0.2s ease;
}

.fc .fc-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.fc .fc-button-primary:not(:disabled):active,
.fc .fc-button-primary:not(:disabled).fc-button-active {
  background-color: var(--fc-button-active-bg-color);
  border-color: var(--fc-button-active-border-color);
}

/* Day grid styling */
.fc .fc-daygrid-day {
  transition: background-color 0.2s ease;
}

.fc .fc-daygrid-day:hover {
  background-color: #f9fafb;
}

.fc .fc-daygrid-day-top {
  padding: 0.5rem;
}

.fc .fc-daygrid-day-number {
  padding: 0.25rem 0.5rem;
  font-weight: 500;
  color: #374151;
}

/* Today highlighting */
.fc .fc-day-today {
  background-color: var(--fc-today-bg-color) !important;
}

.fc .fc-day-today .fc-daygrid-day-number {
  background-color: #315483;
  color: white;
  border-radius: 9999px;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

/* Event styling */
.fc-event {
  border-radius: 0.375rem;
  padding: 0.25rem 0.5rem;
  margin-bottom: 0.125rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.fc-event:hover {
  filter: brightness(0.95);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.fc-event-title {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fc-event-time {
  font-weight: 400;
  opacity: 0.9;
}

/* Week and day view styling */
.fc .fc-timegrid-slot {
  height: 3rem;
}

.fc .fc-timegrid-slot-label {
  vertical-align: middle;
  font-size: 0.875rem;
  color: #6b7280;
}

.fc .fc-timegrid-event {
  border-radius: 0.375rem;
  border: none;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

/* Current time indicator */
.fc .fc-timegrid-now-indicator-line {
  border-color: #ef4444;
  border-width: 2px;
}

.fc .fc-timegrid-now-indicator-arrow {
  border-color: #ef4444;
}

/* More link styling */
.fc .fc-more-link {
  color: #315483;
  font-weight: 500;
  font-size: 0.875rem;
}

.fc .fc-more-link:hover {
  color: #264166;
  text-decoration: underline;
}

/* Popover styling */
.fc .fc-popover {
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  border: 1px solid #e5e7eb;
}

.fc .fc-popover-header {
  background-color: #f9fafb;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  font-weight: 600;
  color: #111827;
}

.fc .fc-popover-body {
  padding: 0.5rem;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .fc .fc-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .fc .fc-toolbar-chunk {
    display: flex;
    justify-content: center;
    margin-bottom: 0.5rem;
  }

  .fc .fc-toolbar-title {
    font-size: 1.5rem;
    text-align: center;
  }

  .fc .fc-button {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
  }

  .fc .fc-daygrid-day-number {
    font-size: 0.875rem;
  }

  .fc-event {
    font-size: 0.75rem;
  }
}

/* Loading state */
.fc .fc-loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Theme Colors */
.bg-primary {
  background-color: #315483;
}

.text-primary {
  color: #315483;
}

.border-primary {
  border-color: #315483;
}

.bg-accent {
  background-color: #f3b249;
}

.text-accent {
  color: #f3b249;
}
