/* D'Key Civic – Smart Calendar (public-safe)
   Used on events.html.
*/

.civic-cal {
  margin-top: 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

body.dark .civic-cal {
  background: rgba(20, 20, 20, 0.68);
  border-color: rgba(255, 255, 255, 0.10);
}

.civic-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.civic-cal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 92px;
}

.civic-cal-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
  text-align: center;
}

.civic-cal-sub {
  font-size: 0.82rem;
  opacity: 0.78;
  margin-top: 2px;
}

body.dark .civic-cal-head {
  border-bottom-color: rgba(255, 255, 255, 0.10);
}

.civic-cal-title {
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 0.95rem;
  opacity: 0.95;
}

.civic-cal-btn {
  border: 1px solid rgba(0, 0, 0, 0.14);
  background: rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  padding: 6px 10px;
  cursor: pointer;
  line-height: 1;
  font-size: 1.1rem;
}

.civic-cal-btn--today {
  font-size: 0.86rem;
  padding: 7px 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

body.dark .civic-cal-btn {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.25);
  color: rgba(255, 255, 255, 0.92);
}

.civic-cal-btn:hover {
  transform: translateY(-1px);
}

.civic-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.18);
}

body.dark .civic-cal-grid {
  border-bottom-color: rgba(255, 255, 255, 0.10);
}

.civic-cal-dow {
  padding: 8px 6px;
  font-size: 0.78rem;
  font-weight: 700;
  opacity: 0.65;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.45);
  text-align: center;
}

body.dark .civic-cal-dow {
  border-bottom-color: rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.20);
}

.civic-cal-day {
  position: relative;
  min-height: 58px;
  padding: 10px 10px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: background 0.12s ease;
}

body.dark .civic-cal-day {
  border-color: rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.22);
}

.civic-cal-day:hover {
  background: rgba(194, 155, 64, 0.10);
}

body.dark .civic-cal-day:hover {
  background: rgba(194, 155, 64, 0.14);
}

.civic-cal-day.is-out {
  opacity: 0.32;
  cursor: default;
}

.civic-cal-day.is-out:hover {
  background: transparent;
}

.civic-cal-num {
  font-weight: 700;
  font-size: 0.92rem;
}

.civic-cal-dot {
  position: absolute;
  bottom: 10px;
  left: 10px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(194, 155, 64, 0.95);
  box-shadow: 0 0 0 3px rgba(194, 155, 64, 0.18);
}

.civic-cal-day.is-today {
  outline: 2px solid rgba(194, 155, 64, 0.55);
  outline-offset: 2px;
}

.civic-cal-day.is-selected {
  background: rgba(194, 155, 64, 0.14);
  border-color: rgba(194, 155, 64, 0.35);
}

body.dark .civic-cal-day.is-selected {
  background: rgba(194, 155, 64, 0.18);
}

.civic-cal-panel {
  padding: 12px 12px 14px;
}

.civic-cal-panel-inner {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  padding: 12px 12px;
  background: rgba(255, 255, 255, 0.55);
}

body.dark .civic-cal-panel-inner {
  border-color: rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.20);
}

.civic-cal-list {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.civic-cal-list li {
  padding: 10px 0;
  border-top: 1px dashed rgba(0, 0, 0, 0.12);
}

.civic-cal-actions-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.civic-cal-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  background: rgba(194, 155, 64, 0.95);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.civic-cal-action--ghost {
  background: rgba(255, 255, 255, 0.65);
  color: rgba(0, 0, 0, 0.82);
}

body.dark .civic-cal-action {
  border-color: rgba(255, 255, 255, 0.18);
}

body.dark .civic-cal-action--ghost {
  background: rgba(0, 0, 0, 0.28);
  color: rgba(255, 255, 255, 0.92);
}

body.dark .civic-cal-list li {
  border-top-color: rgba(255, 255, 255, 0.12);
}

.civic-cal-item-title {
  font-weight: 800;
  margin: 0 0 2px;
}

.civic-cal-item-meta {
  margin: 0;
  opacity: 0.85;
  font-size: 0.93rem;
}

.civic-cal-mini {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.civic-cal-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.10);
  background: rgba(255, 255, 255, 0.55);
}

body.dark .civic-cal-tag {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.20);
}

@media (max-width: 520px) {
  .civic-cal-day {
    min-height: 50px;
    padding: 9px 8px;
    border-radius: 12px;
  }
  .civic-cal-num {
    font-size: 0.86rem;
  }
  .civic-cal-grid {
    gap: 6px;
    padding: 10px;
  }
}
