/* Availability Calendar Styles */

/* Availability checkmark styling */
.availability-checkmark {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #198754;
  /* Green color */
  font-size: 1.5rem;
  z-index: 30;
}

.availability-checkmark i {
  text-shadow: 0 0 3px rgba(255, 255, 255, 0.7);
  transform: scale(1.2);
  transition: transform 0.2s ease;
}

.availability-checkmark:hover i {
  transform: scale(1.4);
}

.calendar-cell.available {
  background-color: rgba(25, 135, 84, 0.1);
  /* Light green background */
}

/* Availability Block Styles */
.availability-block {
  position: absolute;
  background: linear-gradient(135deg, rgba(28, 187, 140, 0.15), rgba(28, 187, 140, 0.25)) !important;
  border-left: 4px solid #1cbb8c !important;
  width: 100%;
  height: 100%;
  z-index: 10;
  border-radius: 6px;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 1px 3px rgba(28, 187, 140, 0.1);
  backdrop-filter: blur(1px);
}

.availability-block:hover {
  background: linear-gradient(135deg, rgba(28, 187, 140, 0.25), rgba(28, 187, 140, 0.35)) !important;
  border-left: 4px solid #16a085 !important;
  box-shadow: 0 2px 6px rgba(28, 187, 140, 0.2);
  transform: scale(1.02);
}

/* Centered checkmark for availability blocks */
.availability-block::after {
  content: '\2713' !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  color: #1cbb8c !important;
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.9), 0 0 8px rgba(255, 255, 255, 0.6) !important;
  pointer-events: none !important;
  z-index: 15 !important;
  filter: drop-shadow(0 0 2px rgba(28, 187, 140, 0.3)) !important;
}

/* Available text label */
.availability-block::before {
  content: 'Available' !important;
  position: absolute !important;
  bottom: 3px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  font-size: 0.55rem !important;
  font-weight: 600 !important;
  color: #1cbb8c !important;
  pointer-events: none !important;
  z-index: 14 !important;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8) !important;
  letter-spacing: 0.02em !important;
}

/* Multi-hour block styles */
.multi-hour-block {
  position: relative;
  border: 2px solid #1cbb8c !important;
  box-shadow: 0 0 5px rgba(28, 187, 140, 0.5) !important;
  background: linear-gradient(135deg, rgba(28, 187, 140, 0.15), rgba(28, 187, 140, 0.25)) !important;
}

.multi-hour-block:hover {
  background: linear-gradient(135deg, rgba(28, 187, 140, 0.25), rgba(28, 187, 140, 0.35)) !important;
}

.hours-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background-color: #1cbb8c;
  color: white;
  font-size: 10px;
  padding: 1px 4px;
  border-radius: 8px;
  font-weight: bold;
  z-index: 20;
}

/* Success and error indicators */
.success-indicator,
.error-indicator,
.delete-feedback {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  z-index: 25;
  animation: fade-in-out 1s ease;
}

.success-indicator {
  color: #198754;
  /* Green */
  background-color: rgba(25, 135, 84, 0.1);
}

.error-indicator {
  color: #dc3545;
  /* Red */
  background-color: rgba(220, 53, 69, 0.1);
}

.delete-feedback {
  color: #dc3545;
  /* Red */
  background-color: rgba(220, 53, 69, 0.1);
}

/* Leave Block Styles - Read-only, no interactions */
/* Note: Background, border, and shadow colors are now set dynamically via inline styles */
.leave-block {
  position: absolute;
  /* background set dynamically */
  /* border-left set dynamically */
  width: 100%;
  height: 100%;
  z-index: 10;
  border-radius: 6px;
  /* box-shadow set dynamically */
  backdrop-filter: blur(1px);
  /* CSS variables for dynamic colors - set by JavaScript */
  --leave-color: #ffc107;
  --leave-type: 'Approved Leave';
}

/* Centered icon for leave blocks */
.leave-block::after {
  content: '🏖' !important;
  /* Calendar icon - default, can be overridden */
  font-size: 18px !important;
  font-weight: 700 !important;
  position: absolute !important;
  top: 30% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  color: var(--leave-color, #ffc107) !important;
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.9), 0 0 8px rgba(255, 255, 255, 0.6) !important;
  pointer-events: none !important;
  z-index: 15 !important;
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.2)) !important;
}

/* Leave text label */
.leave-block::before {
  content: attr(data-leave-type) !important;
  position: absolute !important;
  bottom: 3px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  font-size: 0.55rem !important;
  font-weight: 600 !important;
  color: var(--leave-color, #ffc107) !important;
  pointer-events: none !important;
  z-index: 14 !important;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8) !important;
  letter-spacing: 0.02em !important;
  text-align: center !important;
}

/* Read-only block styling - applies to leave blocks and other read-only blocks */
.read-only-block {
  pointer-events: none !important;
  cursor: default !important;
}

/* Ensure leave blocks are always read-only regardless of other classes */
.leave-block {
  pointer-events: none !important;
  cursor: default !important;
}

/* Pending Leave Block Styles - Different visual styling for pending PTO */
.leave-block.pending-leave {
  background: linear-gradient(135deg, rgba(255, 152, 0, 0.15), rgba(255, 152, 0, 0.25)) !important;
  border-left: 4px solid #ff9800 !important;
  border-style: dashed !important;
}

/* Pending leave icon */
.leave-block.pending-leave::after {
  content: '\23F3' !important;
  /* Hourglass icon for pending */
  font-size: 18px !important;
  font-weight: 700 !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  color: #ff9800 !important;
  z-index: 10 !important;
}

/* Pending leave text label */
.leave-block.pending-leave::before {
  content: 'Pending Leave' !important;
  position: absolute !important;
  bottom: 3px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  font-size: 9px !important;
  font-weight: 600 !important;
  color: #ff9800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.02em !important;
  text-align: center !important;
}

/* Read-only cells (containing leave blocks) styling */
.calendar-cell.read-only {
  pointer-events: none !important;
  cursor: default !important;
  background-color: rgba(255, 193, 7, 0.05) !important;
  /* Very light yellow tint */
}

@keyframes fade-in-out {
  0% {
    opacity: 0;
  }

  25% {
    opacity: 1;
  }

  75% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}