/* Lich thang dang luoi (calendar.js). Moi class co tien to aero-cal. */
.aero-cal { display: flex; flex-direction: column; gap: 12px; }
.aero-cal-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.aero-cal-nav, .aero-cal-side { display: flex; align-items: center; gap: 8px; }
.aero-cal-title { min-width: 150px; margin: 0; text-align: center; font: 700 18px var(--font-heading); color: #15243a; }
.aero-cal-arrow, .aero-cal-today, .aero-cal-views button, .aero-cal-close { min-height: 38px; border: 1px solid #c5d3e2; border-radius: 10px; background: #fff; color: #33475e; font: 600 14px var(--font-body); cursor: pointer; }
.aero-cal-arrow { width: 38px; font-size: 20px; line-height: 1; }
.aero-cal-today { padding: 0 14px; }
.aero-cal-count { font-size: 13px; font-weight: 600; color: #5a6b7f; }
.aero-cal-views { display: flex; gap: 3px; padding: 3px; border: 1px solid #d3deea; border-radius: 11px; background: #eef3f9; }
.aero-cal-views button { min-height: 32px; border: 0; background: transparent; padding: 0 12px; }
.aero-cal-views button.is-active { background: #fff; color: #0f4ea3; box-shadow: 0 1px 4px rgba(16,52,87,.14); }
.aero-cal-arrow:hover, .aero-cal-today:hover { border-color: #1769ce; color: #0f4ea3; }

.aero-cal-grid { border: 1px solid #d3deea; border-radius: 14px; overflow: hidden; background: #fff; }
.aero-cal-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.aero-cal-row + .aero-cal-row { border-top: 1px solid #e3eaf2; }
.aero-cal-dow { padding: 9px 10px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #4d6178; background: #f3f6fa; }
.aero-cal-dow.is-weekend { color: #b3261e; }
.aero-cal-cell { min-height: 112px; padding: 6px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.aero-cal-cell + .aero-cal-cell { border-left: 1px solid #e3eaf2; }
.aero-cal-cell.is-weekend { background: #fbfcfe; }
.aero-cal-cell.is-outside { background: #f6f8fb; }
.aero-cal-cell.is-outside .aero-cal-daynum { color: #66768a; }
.aero-cal-cell.is-selected { box-shadow: inset 0 0 0 2px #1769ce; }
.aero-cal-daynum { align-self: flex-start; min-width: 28px; height: 28px; border: 0; border-radius: 99px; background: transparent; font: 600 13px var(--font-body); color: #33475e; cursor: pointer; }
.aero-cal-daynum:hover { background: #eef3f9; }
.aero-cal-cell.is-today .aero-cal-daynum { background: #1769ce; color: #fff; }
.aero-cal-chips { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.aero-cal-chip { display: flex; align-items: center; gap: 6px; width: 100%; min-width: 0; min-height: 24px; padding: 3px 7px; border: 0; border-radius: 7px; background: var(--chip-bg); color: var(--chip-fg); font: 600 12px var(--font-body); text-align: left; cursor: pointer; }
.aero-cal-chip:hover { filter: brightness(1.08); }
.aero-cal-chip.is-important { box-shadow: inset 3px 0 0 rgba(0,0,0,.35); }
.aero-cal-chip-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aero-cal-chip-count { padding: 0 6px; border-radius: 99px; background: rgba(255,255,255,.28); font-size: 11px; }
.aero-cal-more { align-self: flex-start; border: 0; background: none; padding: 1px 4px; color: #0f4ea3; font: 700 12px var(--font-body); cursor: pointer; }
.aero-cal-dots { display: none; }
.aero-cal-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13px; color: #33475e; }
.aero-cal-legend-item { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.aero-cal-legend-item i, .aero-cal-dots i { display: inline-block; width: 10px; height: 10px; border-radius: 99px; }

.aero-cal-agenda { display: flex; flex-direction: column; gap: 10px; }
.aero-cal-agenda-day { padding: 12px 14px; border: 1px solid #d3deea; border-radius: 12px; background: #fff; }
.aero-cal-agenda-day h4 { margin: 0 0 8px; font: 700 14px var(--font-body); color: #15243a; text-transform: capitalize; }
.aero-cal-agenda-items { display: flex; flex-direction: column; gap: 6px; }
.aero-cal-agenda-items .aero-cal-chip { flex-wrap: wrap; min-height: 34px; padding: 6px 10px; font-size: 13px; }
.aero-cal-chip-sub { flex-basis: 100%; font-weight: 500; opacity: .92; }
.aero-cal-empty { margin: 0; padding: 24px; text-align: center; color: #5a6b7f; border: 1px dashed #b9c7d6; border-radius: 12px; }

.aero-cal-drawer-wrap { position: fixed; inset: 0; z-index: 300; }
.aero-cal-backdrop { position: absolute; inset: 0; background: rgba(4, 17, 31, .45); }
.aero-cal-drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); display: flex; flex-direction: column; gap: 14px; padding: 20px; overflow-y: auto; background: #fff; box-shadow: -12px 0 40px rgba(4,17,31,.25); animation: aero-cal-in .22s ease-out; }
.aero-cal-drawer header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.aero-cal-drawer h3 { margin: 0; font: 700 18px var(--font-heading); color: #15243a; }
.aero-cal-close { width: 38px; font-size: 20px; }
.aero-cal-detail { display: flex; flex-direction: column; gap: 12px; }
.aero-cal-detail-bar { height: 4px; border-radius: 99px; }
.aero-cal-detail p { margin: 0; color: #33475e; }
.aero-cal-detail dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 14px; margin: 0; }
.aero-cal-detail dt { font-weight: 700; color: #5a6b7f; }
.aero-cal-detail dd { margin: 0; color: #15243a; }
@keyframes aero-cal-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }

html[data-theme="dark"] .aero-cal-title, html[data-theme="dark"] .aero-cal-agenda-day h4, html[data-theme="dark"] .aero-cal-drawer h3, html[data-theme="dark"] .aero-cal-detail dd { color: #e6eef7; }
html[data-theme="dark"] :is(.aero-cal-arrow, .aero-cal-today, .aero-cal-close) { border-color: #304b68; background: #101d2e; color: #c9d6e4; }
html[data-theme="dark"] .aero-cal-views { border-color: #243950; background: #0e1b2c; }
html[data-theme="dark"] .aero-cal-views button { color: #9eb2c8; }
html[data-theme="dark"] .aero-cal-views button.is-active { background: #1c3350; color: #fff; box-shadow: none; }
html[data-theme="dark"] :is(.aero-cal-grid, .aero-cal-agenda-day) { border-color: #22364b; background: #101d2e; }
html[data-theme="dark"] .aero-cal-row + .aero-cal-row, html[data-theme="dark"] .aero-cal-cell + .aero-cal-cell { border-color: #1c2d40; }
html[data-theme="dark"] .aero-cal-dow { background: #0e1b2c; color: #8da2b9; }
html[data-theme="dark"] .aero-cal-dow.is-weekend { color: #ff9b95; }
html[data-theme="dark"] .aero-cal-cell.is-weekend { background: #0f1b2b; }
html[data-theme="dark"] .aero-cal-cell.is-outside { background: #0b1624; }
html[data-theme="dark"] .aero-cal-cell.is-outside .aero-cal-daynum { color: #5d7188; }
html[data-theme="dark"] .aero-cal-daynum { color: #c9d6e4; }
html[data-theme="dark"] .aero-cal-daynum:hover { background: #172a40; }
html[data-theme="dark"] .aero-cal-cell.is-today .aero-cal-daynum { background: #1f6fd6; color: #fff; }
html[data-theme="dark"] :is(.aero-cal-count, .aero-cal-empty, .aero-cal-detail dt) { color: #8da2b9; }
html[data-theme="dark"] .aero-cal-legend, html[data-theme="dark"] .aero-cal-detail p { color: #c9d6e4; }
html[data-theme="dark"] .aero-cal-more { color: #7db6ff; }
html[data-theme="dark"] .aero-cal-drawer { background: #0f1c2d; }
html[data-theme="dark"] .aero-cal-empty { border-color: #304b68; }

@media (max-width: 700px) {
  .aero-cal-toolbar { flex-direction: column; align-items: stretch; }
  .aero-cal-nav { justify-content: space-between; }
  .aero-cal-title { min-width: 0; flex: 1; font-size: 16px; }
  .aero-cal-side { justify-content: space-between; }
  .aero-cal-cell { min-height: 54px; padding: 4px 2px; align-items: center; }
  .aero-cal-dow { padding: 7px 2px; text-align: center; font-size: 11px; }
  .aero-cal-chips, .aero-cal-more { display: none; }
  .aero-cal-dots { display: flex; gap: 3px; justify-content: center; }
  .aero-cal-dots i { width: 7px; height: 7px; }
  .aero-cal-daynum { min-width: 30px; height: 30px; }
}
@media (prefers-reduced-motion: reduce) { .aero-cal-drawer { animation: none; } }
