/* board.css - 캘린더 및 게시판 전용 스타일 */

#calendar {
  background: #ffffff;
  border: 1px solid #e8e8e4;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

.notice-item { border-left: 3px solid #1a1a1a; padding: 10px 14px; margin-bottom: 8px; border-radius: 0 5px 5px 0; background: #fff; border-top: 1px solid #e8e8e4; border-right: 1px solid #e8e8e4; border-bottom: 1px solid #e8e8e4; transition: box-shadow 0.15s; }
.notice-item:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.07); }
.notice-item a { color: #1a1a1a; font-weight: 500; text-decoration: none; font-size: 0.9rem; }

.event-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #e8e8e4;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  background: #fff;
}
.event-table thead tr {
  background: #f5f5f3;
}
.event-table th {
  padding: 12px 16px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid #e8e8e4;
  text-align: left;
}
.event-table th:last-child,
.event-table td:last-child {
  text-align: center;
  width: 90px;
}
.event-table td {
  padding: 14px 16px;
  font-size: 0.88rem;
  color: #1a1a1a;
  border-bottom: 1px solid #f0f0ee;
  vertical-align: middle;
}
.event-table tbody tr:last-child td {
  border-bottom: none;
}
.event-row { cursor: pointer; transition: background 0.12s; }
.event-row:hover { background: #f7f7f5; }
.event-table td:first-child { color: #888; font-size: 0.82rem; white-space: nowrap; }
.event-table td:nth-child(2) { font-weight: 500; }

.badge-full { background: #c62828; color: #fff; padding: 3px 10px; border-radius: 20px; font-size: 0.72rem; font-weight: 600; white-space: nowrap; }
.badge-open { background: #2e7d32; color: #fff; padding: 3px 10px; border-radius: 20px; font-size: 0.72rem; font-weight: 600; white-space: nowrap; }

.cal-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.cal-toolbar strong { font-size: 1.05rem; font-weight: 700; color: #1a1a1a; }
.cal-nav-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #e8e8e4;
  background: #fff;
  color: #1a1a1a;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, border-color 0.12s;
}
.cal-nav-btn:hover { background: #f5f5f3; border-color: #d8d8d4; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  position: relative;
}
.cal-weekday {
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 8px 0;
  border-bottom: 1px solid #e8e8e4;
}
.cal-cell {
  aspect-ratio: 1 / 0.85;
  border-right: 1px solid #f0f0ee;
  border-bottom: 1px solid #f0f0ee;
  padding: 6px;
  overflow: hidden;
  position: relative;
  cursor: default;
}
.cal-cell.is-empty { cursor: default; }
.cal-grid .cal-cell:nth-child(7n) { border-right: none; }
.cal-day-num {
  font-size: 0.82rem;
  color: #1a1a1a;
  display: inline-block;
}

.cal-weekday.cal-sun { color: #c62828; }
.cal-weekday.cal-sat { color: #1565c0; }
.cal-cell.is-sun .cal-day-num { color: #c62828; }
.cal-cell.is-sat .cal-day-num { color: #1565c0; }
.cal-cell.is-today { background: #fff8e1; }
.cal-cell.is-today .cal-day-num {
  background: #1a1a1a;
  color: #fff;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
}

.cal-pill {
  margin-top: 3px;
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: #eef2ff;
  color: #3949ab;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.cal-pill:hover { background: #e0e6fb; }
.cal-more {
  margin-top: 3px;
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: #f0f0ee;
  color: #666;
  cursor: pointer;
  display: inline-block;
}
.cal-more:hover { background: #e5e5e1; }

.cal-popover {
  position: absolute;
  z-index: 20;
  background: #fff;
  border: 1px solid #e8e8e4;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  padding: 8px;
  min-width: 160px;
  max-width: 240px;
}
.cal-popover-item {
  font-size: 0.8rem;
  padding: 6px 8px;
  border-radius: 5px;
  cursor: pointer;
  color: #1a1a1a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-popover-item:hover { background: #f5f5f3; }

@media (max-width: 480px) {
  .cal-cell .cal-pill,
  .cal-cell .cal-more {
    display: none;
  }
  .cal-cell.has-events::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 6px;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #3949ab;
  }
}

.event-hovercard {
  display: none;
  position: absolute;
  z-index: 30;
  width: 240px;
  background: var(--card-bg, #fff);
  border: 1px solid var(--card-border, #e8e8e4);
  border-radius: var(--radius, 8px);
  box-shadow: var(--card-shadow-hover, 0 6px 20px rgba(0,0,0,0.12));
  overflow: hidden;
  animation: hovercard-in 0.14s ease-out;
}
@keyframes hovercard-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.event-hovercard::before {
  content: "";
  display: block;
  height: 3px;
  background: var(--accent, #2e7d32);
}
.hovercard-title {
  margin: 0;
  padding: 12px 14px 8px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary, #1a1a1a);
  line-height: 1.35;
}
.hovercard-attendees {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 0 14px 10px;
}
.hovercard-chip {
  font-size: 0.7rem;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 20px;
  background: #eef2ff;
  color: #3949ab;
  white-space: nowrap;
}
.hovercard-empty {
  font-size: 0.76rem;
  color: var(--text-muted, #999);
}
.hovercard-content {
  margin: 0;
  padding: 10px 14px 12px;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-secondary, #666);
  border-top: 1px solid var(--divider, #f0f0ee);
}

@media (prefers-color-scheme: dark) {
  .hovercard-chip { background: #262b4a; color: #a3b1f0; }
}
:root[data-theme="dark"] .hovercard-chip { background: #262b4a; color: #a3b1f0; }
:root[data-theme="light"] .hovercard-chip { background: #eef2ff; color: #3949ab; }
