/* ==============================
   Lashes Pereira — Agenda styles
   ============================== */

html, body { height: 100%; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
[x-cloak] { display: none !important; }

/* Sidebar transition for mobile */
.sidebar { transition: transform .2s ease; }
@media (max-width: 1023px) {
  .sidebar {
    position: fixed; top: 3.5rem; bottom: 0; left: 0; width: 16rem; z-index: 20;
    transform: translateX(-100%);
  }
  .sidebar.open { transform: translateX(0); }
}

/* ==============================
   Calendar grid — shared
   ============================== */
.cal-wrap {
  display: grid;
  grid-template-columns: 64px 1fr;
  min-width: 100%;
  position: relative;
}
.cal-hours {
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 3;
  border-right: 1px solid #E5E7EB;
}
.cal-hour-row {
  height: 80px; /* 60min = 4 * 20px slots */
  box-sizing: border-box;
  border-bottom: 1px solid #F3F4F6;
  padding: 2px 6px;
  font-size: 11px;
  color: #9CA3AF;
  text-align: right;
}

.cal-columns {
  display: grid;
  position: relative;
}

.cal-col-header {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 4;
  border-bottom: 1px solid #E5E7EB;
  border-right: 1px solid #F3F4F6;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.cal-col-body {
  position: relative;
  border-right: 1px solid #F3F4F6;
  background-image:
    linear-gradient(to bottom, rgba(0,0,0,0) 0, rgba(0,0,0,0) 79px, #F3F4F6 79px, #F3F4F6 80px),
    linear-gradient(to bottom, rgba(0,0,0,0) 0, rgba(0,0,0,0) 19px, #F9FAFB 19px, #F9FAFB 20px);
  background-repeat: repeat-y;
  background-size: 100% 80px, 100% 20px;
}

.cal-col-body.weekend { background-color: #FAFAF9; }

/* Half-hour faint line */
.cal-col-body::after {
  content: '';
}

/* Appointment block */
.cal-event {
  position: absolute;
  left: 2px;
  right: 2px;
  min-height: 18px;
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 11px;
  line-height: 1.2;
  color: #fff;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
  border-left: 4px solid rgba(0,0,0,.25);
  transition: transform .1s, box-shadow .1s;
}
.cal-event:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,.15);
  z-index: 5;
}
.cal-event .ev-title {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-event .ev-sub {
  opacity: .9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-event.cancelled {
  opacity: .4;
}
.cal-event.cancelled .ev-title { text-decoration: line-through; }

/* Now indicator */
.cal-now-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 0;
  border-top: 2px solid #EF4444;
  z-index: 6;
  pointer-events: none;
}
.cal-now-line::before {
  content: '';
  position: absolute;
  left: -5px;
  top: -5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #EF4444;
}

/* Staff avatar */
.staff-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.staff-name {
  font-size: 13px;
  font-weight: 500;
  color: #111827;
  text-align: center;
}
.staff-meta {
  font-size: 10px;
  color: #9CA3AF;
}

/* Scrollbar polish */
main#main-grid::-webkit-scrollbar { width: 10px; height: 10px; }
main#main-grid::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 6px; border: 2px solid #fff; }
main#main-grid::-webkit-scrollbar-track { background: transparent; }

/* Week columns weekend tint */
.day-col-header-today { color: #E91E63; font-weight: 700; }
.day-col-header-today .day-col-dot {
  width: 6px; height: 6px; border-radius: 50%; background: #E91E63; display: inline-block; margin-left: 4px; vertical-align: middle;
}

/* Skeleton block */
.skeleton {
  background: linear-gradient(90deg, #F3F4F6 0%, #E5E7EB 50%, #F3F4F6 100%);
  background-size: 200% 100%;
  animation: skeleton-shine 1.3s linear infinite;
  border-radius: 6px;
}
@keyframes skeleton-shine {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Responsive */
@media (max-width: 640px) {
  .cal-columns { min-width: 100%; }
}
