:root {
  --pch-accent: #c96b3c;
  --pch-accent-dark: #a5532f;
  --sunday: #e0523f;
}

.djas-calendar {
  max-width: 1100px;
  margin: auto;
  font-family: Inter, system-ui, sans-serif;
  background: linear-gradient(#fde7d7, #f8d1b8);
  padding: 20px;
  border-radius: 14px;
}

.djas-cal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-btn,
.info-btn {
  background: var(--accent-dark);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
}

.info-btn {
  font-weight: 700;
}

.djas-weekdays,
#djas-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.djas-weekdays {
  margin-top: 10px;
  font-weight: 600;
}

.djas-weekdays .sun {
  color: var(--sunday);
}

#djas-calendar-grid {
  gap: 8px;
  margin-top: 10px;
  grid-auto-rows: 100px;
}

.day-cell {
  background: #fff;
  border-radius: 10px;
  padding: 6px;
  height: 100px;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.day-cell.empty {
  background: transparent;
}

.date {
  font-weight: 700;
  font-size: 13px;
}

.date.sunday {
  color: var(--sunday);
}

.event {
  font-size: 12px;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.more {
  font-size: 11px;
  color: var(--accent);
  margin-top: auto;
}

/* Modal */
.djas-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  background: rgba(0, 0, 0, 0.25);
  z-index: 1000;
}

.djas-backdrop.open {
  display: flex;
  align-items: center;
  justify-content: center;
}

.djas-modal {
  background: #fff;
  border-radius: 12px;
  padding: 16px 18px;
  width: 480px;
  max-width: 90%;
  font-size: 12px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 6px;
  right: 10px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
}

.djas-footer {
  margin-top: 12px;
  font-size: 11px;
  text-align: center;
}

.djas-layout {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 20px;
  align-items: start;
}

.djas-qr {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  font-size: 13px;
}

.djas-qr img {
  width: 160px;
  max-width: 100%;
  height: auto;
}

.djas-qr p {
  margin-top: 8px;
  padding: 0 8px;
  color: #333;
}

/* Mobile */
@media (max-width: 900px) {
  .djas-layout {
    grid-template-columns: 1fr;
  }

  .djas-qr {
    margin-top: 16px;
  }
}

/* ===================== */
/* SKELETON LOADER */
/* ===================== */

.djas-skeleton {
  width: 100%;
  animation: fadeIn 0.2s ease-in;
}

.skeleton-header {
  height: 36px;
  width: 200px;
  margin: 0 auto 14px;
  border-radius: 8px;
  background: #f1cbb3;
  display: none;
}

.skeleton-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 10px;
  display: none;
}

.skeleton-weekdays span {
  height: 16px;
  border-radius: 6px;
  background: #f1cbb3;
  display: none;
}

.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.skeleton-cell {
  height: 120px;
  border-radius: 10px;
  background: linear-gradient(90deg, #c9c9c9 25%, #9c9c9c 37%, #bbbbbb 63%);
  background-size: 400% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
}

/* Hide real calendar initially */
.djas-calendar,
.djas-qr {
  opacity: 0;
}

/* Animation */
@keyframes shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
