/* Custom Styles for Skylight Calendar */

/* Smooth, touch-optimized scrolling */
* {
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  box-sizing: border-box;
}

/* Custom scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Active view button styling */
.active-view {
  background-color: #ffffff !important;
  color: #2563eb !important;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1) !important;
}

/* Month grid cells */
.cal-cell {
  background-color: #ffffff;
  border-radius: 0.75rem;
  border: 1px solid #f1f5f9;
  padding: 0.4rem;
  display: flex;
  flex-direction: column;
  transition: all 0.15s ease-in-out;
  cursor: pointer;
  overflow: hidden;
  position: relative;
}

.cal-cell:hover {
  border-color: #cbd5e1;
  background-color: #f8fafc;
}

.cal-cell.is-today {
  border-color: #93c5fd;
  background-color: #f0f7ff;
}

.cal-cell.is-other-month {
  background-color: #fafbfc;
  opacity: 0.45;
}

.cal-cell-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}

.cal-date-number {
  font-size: 0.8rem;
  font-weight: 700;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
}

.is-today .cal-date-number {
  background-color: #2563eb;
  color: #ffffff;
}

/* Event pills in month view */
.event-pill {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.35rem;
  border-radius: 0.375rem;
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  border-left-width: 3px;
  cursor: pointer;
  transition: transform 0.1s ease;
  min-height: 1.25rem;
}

.event-pill-multiday {
  border-left-width: 0 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  padding: 0.15rem 0.4rem;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.08);
}

.event-pill:hover {
  transform: translateY(-1px);
  filter: brightness(0.95);
}

/* Screen transition animations for view switching and swipe */
@keyframes slideInFromRight {
  0% {
    opacity: 0.25;
    transform: translateX(40px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInFromLeft {
  0% {
    opacity: 0.25;
    transform: translateX(-40px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.view-slide-right {
  animation: slideInFromRight 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: transform, opacity;
}

.view-slide-left {
  animation: slideInFromLeft 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: transform, opacity;
}

/* Modal animation */
@keyframes scaleUp {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-scale-up {
  animation: scaleUp 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Equalizer animation */
@keyframes eqBounce {
  0%, 100% { height: 4px; }
  50% { height: 16px; }
}

.animate-eq {
  animation: eqBounce 0.6s infinite ease-in-out alternate;
}

/* Schedule item styling */
.schedule-item {
  position: relative;
  border-left: 4px solid #3b82f6;
  background: #ffffff;
  border-radius: 0.75rem;
  padding: 0.85rem 1.15rem;
  border-top: 1px solid #f1f5f9;
  border-right: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.03);
}

.schedule-item:hover {
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.06);
  transform: translateX(2px);
}

/* Today Hourly Timeline Styling */
.timeline-hour-slot {
  position: relative;
  min-height: 54px;
  border-top: 1px dashed #e2e8f0;
  display: flex;
  transition: background-color 0.15s ease;
}

.timeline-hour-slot:hover {
  background-color: rgba(248, 250, 252, 0.8);
}

.timeline-hour-label {
  width: 58px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  text-align: right;
  padding-right: 0.75rem;
  padding-top: 0.2rem;
  user-select: none;
  shrink: 0;
}

.timeline-hour-content {
  flex: 1;
  position: relative;
  border-left: 2px solid #f1f5f9;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  min-height: 54px;
}

/* Red "Now" line across today's schedule */
.timeline-now-indicator {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background-color: #ef4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
  z-index: 20;
  pointer-events: none;
}

.timeline-now-indicator::before {
  content: '';
  position: absolute;
  left: -4px;
  top: -4px;
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  background-color: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.8);
}

/* Hourly Event Card inside Today Timeline */
.timeline-event-card {
  border-radius: 0.65rem;
  padding: 0.45rem 0.65rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: all 0.15s ease;
  border-left-width: 4px;
  position: relative;
  margin-bottom: 0.35rem;
}

.timeline-event-card:hover {
  transform: translateY(-1px) scale(1.005);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  filter: brightness(0.97);
}

/* News Article Card */
.news-article-item {
  transition: all 0.15s ease;
  border-radius: 0.75rem;
  padding: 0.5rem 0.4rem;
}

.news-article-item:hover {
  background-color: #f8fafc;
  transform: translateX(2px);
}

/* Custom scrollbars for today widgets */
#news-articles-list::-webkit-scrollbar,
#cooking-today-body::-webkit-scrollbar,
#today-timeline-scroll::-webkit-scrollbar {
  width: 4px;
}

#news-articles-list::-webkit-scrollbar-thumb,
#cooking-today-body::-webkit-scrollbar-thumb,
#today-timeline-scroll::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 9999px;
}
