/* Club calendar (public front page) and birthday calendar — shared styles. */

.cal-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin-bottom: 0.75rem; }
.cal-toolbar h2 { margin: 0; font-size: 1.35rem; color: var(--navy); min-width: 10.5rem; }
.cal-toolbar .nav { display: flex; gap: 0.35rem; }
.cal-toolbar .nav a, .cal-views a {
  text-decoration: none; background: #eef1f9; color: var(--navy); font-weight: 600; font-size: 0.88rem;
  padding: 0.4rem 0.75rem; border-radius: 6px;
}
.cal-toolbar .nav a:hover, .cal-views a:hover { background: #dde3f5; }
.cal-views { display: flex; gap: 0.25rem; margin-left: auto; }
.cal-views a.active { background: var(--navy); color: #fff; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 1rem; font-size: 0.82rem; color: var(--muted); margin-bottom: 0.75rem; }
.cal-legend span::before { content: ""; display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 3px; margin-right: 0.35rem; vertical-align: -1px; }
.cal-legend .game::before { background: var(--navy); }
.cal-legend .event::before { background: var(--watermelon); }
.cal-legend .birthday::before { background: #d97706; }

/* Month grid */
.cal-grid { width: 100%; border-collapse: collapse; table-layout: fixed; background: #fff;
            border-radius: 10px; overflow: hidden; box-shadow: 0 1px 4px rgba(20,30,60,0.08); }
.cal-grid th { background: #eef1f9; color: var(--navy); font-size: 0.8rem; text-transform: uppercase;
               letter-spacing: 0.03em; padding: 0.45rem; text-align: center; border: 1px solid var(--border); }
.cal-grid td { vertical-align: top; height: 7.5rem; padding: 0.3rem; border: 1px solid var(--border); }
.cal-grid td.other-month { background: #fafbfd; }
.cal-grid td.other-month .day-num { color: #b6bfd3; }
.cal-grid td.today { background: #fff8f8; box-shadow: inset 0 0 0 2px var(--watermelon); }
.cal-grid .day-num { font-size: 0.8rem; font-weight: 700; color: var(--navy); margin-bottom: 0.2rem; }
.cal-grid td.today .day-num { color: var(--watermelon); }

.cal-item {
  display: block; text-decoration: none; font-size: 0.74rem; line-height: 1.25; margin-bottom: 0.2rem;
  padding: 0.18rem 0.35rem; border-radius: 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  color: #fff; background: var(--navy); border: 0; width: 100%; text-align: left; font-family: inherit; cursor: pointer;
}
.cal-item .t { font-weight: 700; margin-right: 0.25rem; }
.cal-item:hover, .cal-item:focus-visible { filter: brightness(1.15); outline: none; box-shadow: 0 0 0 2px rgba(27,42,74,0.25); }
.cal-item.event { background: var(--watermelon); }
.cal-item.birthday { background: #fff4e5; color: #7a3d00; white-space: normal; cursor: default; border-left: 3px solid #d97706; }
.cal-item.birthday .sub { display: block; color: #9a5a1a; font-size: 0.68rem; }
.cal-more { font-size: 0.74rem; font-weight: 600; color: var(--navy); text-decoration: none; }
.cal-more:hover { text-decoration: underline; }

/* List view */
.cal-list .day { margin-bottom: 1rem; }
.cal-list .day h3 { font-size: 0.95rem; color: var(--navy); margin: 0 0 0.4rem; padding-bottom: 0.3rem; border-bottom: 1px solid var(--border); }
.cal-list .day.past { opacity: 0.6; }
.cal-list .day.is-today h3 { color: var(--watermelon); }
.cal-list a.row {
  display: flex; gap: 0.75rem; align-items: baseline; text-decoration: none; color: var(--text);
  background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--navy); border-radius: 6px;
  padding: 0.55rem 0.75rem; margin-bottom: 0.35rem;
}
.cal-list a.row.event { border-left-color: var(--watermelon); }
.cal-list a.row:hover { background: #f7f9fd; }
.cal-list a.row .time { font-weight: 700; min-width: 4.5rem; color: var(--navy); font-size: 0.9rem; }
.cal-list a.row .what { font-weight: 600; }
.cal-list a.row .sub { color: var(--muted); font-size: 0.85rem; display: block; font-weight: 400; }
.cal-empty { color: var(--muted); text-align: center; padding: 1.5rem 0; }

/* Details (pop-up and stand-alone page) */
dialog.cal-dialog { border: 0; border-radius: 12px; padding: 0; width: min(560px, calc(100vw - 2rem));
                    box-shadow: 0 10px 40px rgba(20,30,60,0.3); }
dialog.cal-dialog::backdrop { background: rgba(18,32,58,0.45); }
dialog.cal-dialog .close { position: absolute; top: 0.6rem; right: 0.6rem; background: #eef1f9; color: var(--navy);
                           border-radius: 50%; width: 2rem; height: 2rem; padding: 0; font-size: 1.1rem; line-height: 1; }
dialog.cal-dialog .close:hover { background: #dde3f5; }
.cal-details { padding: 1.5rem 1.5rem 1.25rem; text-align: left; }
.cal-details .kind { display: inline-block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
                     color: #fff; background: var(--navy); padding: 0.15rem 0.5rem; border-radius: 999px; }
.cal-details .kind.event { background: var(--watermelon); }
.cal-details h3 { margin: 0.5rem 2rem 0.25rem 0; color: var(--navy); font-size: 1.25rem; }
.cal-details .when { color: var(--muted); margin-bottom: 1rem; font-weight: 600; }
.cal-details dl { display: grid; grid-template-columns: 7rem 1fr; gap: 0.45rem 0.75rem; margin: 0 0 1rem; font-size: 0.92rem; }
.cal-details dt { color: var(--muted); }
.cal-details dd { margin: 0; }
.cal-details .score { font-size: 1.1rem; font-weight: 800; color: var(--navy); }
.cal-details .note { background: #fff8e6; border: 1px solid #f3dfb0; color: #6b4b00; border-radius: 6px; padding: 0.6rem 0.75rem; font-size: 0.88rem; margin-bottom: 1rem; }
.cal-details .desc { white-space: pre-line; margin-bottom: 1rem; line-height: 1.5; }
.cal-details img.flyer { max-width: 100%; border-radius: 8px; margin-bottom: 1rem; display: block; }
.cal-details .actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

@media (max-width: 700px) {
  .cal-grid td { height: 3.4rem; padding: 0.2rem; }
  .cal-grid th { font-size: 0.68rem; padding: 0.3rem 0; }
  .cal-grid .cal-item, .cal-grid .cal-more { font-size: 0; padding: 0; width: 0.55rem; height: 0.55rem; border-radius: 50%;
                                             display: inline-block; margin: 0 0.1rem 0 0; border: 0; }
  .cal-grid .cal-more { display: none; }
  .cal-grid .cal-item.birthday { background: #d97706; }
  .cal-details dl { grid-template-columns: 5.5rem 1fr; }
  .cal-toolbar h2 { font-size: 1.15rem; min-width: 0; }
}
