/* Utility CSS Classes for replacing inline styles */

/* Global notification system */
.notification {
  position: fixed;
  top: var(--spacing-xl);
  right: var(--spacing-xl);
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: var(--border-radius-sm);
  color: var(--white);
  font-weight: 500;
  z-index: 2000;
  animation: slideIn 0.3s ease;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.notification.success {
  background: var(--success);
}

.notification.error {
  background: var(--danger);
}

.notification.info {
  background: var(--primary);
}

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

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(20px);
  }
}

/* Utility classes */
.hidden {
  display: none !important;
}

/* Display utilities */
.d-none {
  display: none !important;
}

/* Width utilities */
.w-40 {
  width: var(--size-40) !important;
}

.w-120 {
  width: var(--size-120) !important;
}

/* Text alignment utilities */
.text-center {
  text-align: center !important;
}

.d-block {
  display: block !important;
}

.d-inline {
  display: inline !important;
}

.d-inline-block {
  display: inline-block !important;
}

.d-flex {
  display: flex !important;
}

.d-grid {
  display: grid !important;
}

/* Visibility utilities */
.visibility-hidden {
  visibility: hidden !important;
}

.visibility-visible {
  visibility: visible !important;
}

/* Margin utilities */
.m-0 {
  margin: 0 !important;
}

.mt-10 {
  margin-top: var(--spacing-xs) !important;
}

.mt-15 {
  margin-top: var(--spacing-md) !important;
}

.mt-30 {
  margin-top: var(--spacing-2xl) !important;
}

.mr-15 {
  margin-right: var(--spacing-md) !important;
}

.mb-10 {
  margin-bottom: var(--spacing-xs) !important;
}

/* Padding utilities */
.p-10-15 {
  padding: var(--spacing-xs) var(--spacing-md) !important;
}

/* Text alignment utilities */
.text-right {
  text-align: right !important;
}

.text-left {
  text-align: left !important;
}

/* Cursor utilities */
.cursor-pointer {
  cursor: pointer !important;
}

/* Color utilities */
.text-gray-400 {
  color: var(--gray-400) !important;
}

.text-gray-900 {
  color: var(--gray-900) !important;
}

.cursor-default {
  cursor: default !important;
}

.cursor-not-allowed {
  cursor: not-allowed !important;
}

/* Position utilities */
.position-fixed {
  position: fixed !important;
}

.position-absolute {
  position: absolute !important;
}

.position-relative {
  position: relative !important;
}

/* Positioning helpers */
.top-20 {
  top: 20px !important;
}

.right-20 {
  right: 20px !important;
}

/* Z-index utilities */
.z-10000 {
  z-index: 10000 !important;
}

/* Opacity utilities */
.opacity-0 {
  opacity: 0 !important;
}

.opacity-half {
  opacity: var(--opacity-half) !important;
}

.opacity-full {
  opacity: var(--opacity-visible) !important;
}

/* Flex utilities */
.d-flex-gap {
  display: flex !important;
  gap: var(--spacing-sm) !important;
}

.align-items-center {
  align-items: center !important;
}

/* State classes for common loading/error patterns */
.loading-state {
  display: none !important;
}

.error-state {
  display: none !important;
}

.loading-section {
  display: none !important;
}

/* Width utilities */
.w-full {
  width: var(--width-full) !important;
}

.w-80 {
  width: var(--width-80) !important;
}

/* Color utilities */
.text-primary {
  color: var(--primary) !important;
}

.text-success {
  color: var(--success) !important;
}

.text-danger {
  color: var(--danger) !important;
}

.text-warning {
  color: var(--warning) !important;
}

.text-muted {
  color: var(--text-muted) !important;
}

.text-white {
  color: var(--text-white) !important;
}

/* Background utilities */
.bg-primary {
  background-color: var(--primary) !important;
}

.bg-success {
  background-color: var(--success) !important;
}

.bg-danger {
  background-color: var(--danger) !important;
}

.bg-warning {
  background-color: var(--warning) !important;
}

.bg-light {
  background-color: var(--gray-100) !important;
}

.bg-white {
  background-color: var(--white) !important;
}

/* Border utilities */
.border {
  border: var(--border-width-thin) solid var(--border-color) !important;
}

.border-primary {
  border-color: var(--primary) !important;
}

.border-success {
  border-color: var(--success) !important;
}

.border-danger {
  border-color: var(--danger) !important;
}

.border-radius {
  border-radius: var(--border-radius-md) !important;
}

/* Opacity utilities */
.opacity-50 {
  opacity: var(--opacity-half) !important;
}

.opacity-100 {
  opacity: var(--opacity-visible) !important;
}


/* Loading state utilities */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: var(--size-300);
  text-align: center;
}

.loading-spinner {
  width: var(--size-md);
  height: var(--size-md);
  border: 4px solid var(--border-color-light);
  border-top: 4px solid var(--primary);
  border-radius: var(--border-radius-full);
  animation: spin var(--animation-duration-spin) linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Error display utilities */
.error-fixed {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--danger);
  color: var(--text-white);
  padding: var(--spacing-sm);
  border-radius: var(--border-radius-sm);
  z-index: 10000;
}

/* Form state utilities */
.form-saving {
  opacity: var(--opacity-disabled);
  pointer-events: none;
}

.form-error {
  border-color: var(--danger) !important;
  background-color: var(--danger-alpha-1) !important;
}

.form-success {
  border-color: var(--success) !important;
  background-color: var(--success-alpha-1) !important;
}

/* Progress bar utilities */
.progress-fill {
  height: var(--width-full);
  background: linear-gradient(90deg, var(--success) 0%, var(--primary) 100%);
  border-radius: var(--border-radius-sm);
  transition: width var(--transition-base);
}

/* Flex utilities */
.flex-column {
  flex-direction: column !important;
}

.flex-row {
  flex-direction: row !important;
}

.justify-center {
  justify-content: center !important;
}

.justify-between {
  justify-content: space-between !important;
}

.align-center {
  align-items: center !important;
}

.align-start {
  align-items: flex-start !important;
}

/* Gradient utilities */
.gradient-danger {
  background: linear-gradient(45deg, var(--danger), var(--chart-orange)) !important;
}

.gradient-danger-hover {
  background: linear-gradient(45deg, var(--danger-hover), var(--warning-hover)) !important;
}

/* Presentation mode utilities */
.presentation-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
}

.presentation-title-section {
  flex: 1;
  min-width: 200px;
}

.presentation-title {
  margin: 0;
  font-size: 24px;
  font-weight: normal;
  color: var(--text-primary);
}

.presentation-counter-section {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.presentation-counter-icon {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
}

.presentation-counter-text {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary);
}

.presentation-close-section {
  flex: 0 0 auto;
  margin-left: 20px;
}

.presentation-container {
  height: calc(100vh - 200px);
  min-height: calc(100vh - 200px);
  max-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 40px;
}

.presentation-loading {
  text-align: center;
}

.presentation-loading h3 {
  color: var(--primary);
  margin-bottom: 20px;
}

.presentation-loading p {
  color: var(--text-secondary);
}

/* Transform utilities for JavaScript styling compliance */
.rotate-0 {
  transform: rotate(0deg);
  transition: transform 0.2s ease;
}

.rotate-90 {
  transform: rotate(90deg);
  transition: transform 0.2s ease;
}

/* Overflow utilities for modal state management */
.overflow-hidden {
  overflow: hidden;
}

.overflow-auto {
  overflow: auto;
}

/* Display utilities for JavaScript styling compliance */
.display-none {
  display: none;
}

.display-block {
  display: block;
}

/* Animation utilities for notifications */
.fade-out {
  animation: fadeOut 0.3s ease-out forwards;
}

/* Circular fade-out for save notifications */
.save-notification.fade-out {
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Week navigation utilities */
.week-nav-hidden {
  display: none;
  margin-right: var(--spacing-md);
}

/* Section spacing utilities */  
.section-mt-30 {
  margin-top: var(--spacing-2xl);
}

/* Icon transform utilities */
.icon-translate-x-1 {
  transform: translateX(1px);
}

/* Conditional display utilities */
.friday-hidden {
  display: none;
}

/* Margin utilities for component spacing */
.margin-10-15 {
  margin: var(--spacing-xs) var(--spacing-md);
}

/* Global Save Status System - Circular Floating Notifications */
.save-notification {
  position: fixed;
  top: var(--spacing-xl);
  right: var(--spacing-xl);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: var(--white);
  z-index: 2000;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
}

/* Show animation for new notifications */
.save-notification.show {
  opacity: 1;
  transform: scale(1);
}

/* Initial hidden state for new notifications */
.save-notification.initial {
  opacity: 0;
  transform: scale(0.8);
}

/* Icon sizing within circular notifications */
.save-notification svg {
  width: 24px;
  height: 24px;
  color: var(--white);
}

/* Status-specific styling - colors set via JavaScript */
.save-notification-pending {
  /* Background color set via JavaScript */
}

.save-notification-saving {
  /* Background color set via JavaScript */
}

.save-notification-saved {
  /* Background color set via JavaScript */
}

.save-notification-error {
  /* Background color set via JavaScript */
}

.save-notification-retry {
  /* Background color set via JavaScript */
}

.save-notification-no-changes {
  /* Background color set via JavaScript */
}

/* Spin animation for save notification icons */
.save-notification .spin {
  animation: spin 1s linear infinite;
}