/* Settings → Calendar card. Colours come from the room tokens in /shared/style.css. */

.cal-link { scroll-margin-top: 18px; }
.cal-link [hidden] { display: none; } /* .btn sets its own display, which would beat [hidden] */
.cal-intro { max-width: 60ch; color: var(--ink-2); }

.cal-steps-title { margin: 18px 0 8px; color: var(--ink); font-size: 14.5px; font-weight: 650; }
.cal-steps { display: flex; flex-direction: column; gap: 6px; max-width: 62ch; margin: 0; padding-left: 22px; color: var(--ink-2); }
.cal-steps li::marker { color: var(--accent); font-weight: 700; }
.cal-steps b { color: var(--ink); font-weight: 650; }

.cal-other { max-width: 62ch; margin-top: 14px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-item); background: rgb(255 255 255 / 35%); }
.cal-other summary { color: var(--ink); font-weight: 600; cursor: pointer; }
.cal-other summary:hover { color: var(--accent); }
.cal-other[open] summary { margin-bottom: 4px; }
.cal-other .cal-steps-title:first-of-type { margin-top: 10px; }

.cal-form { max-width: 560px; margin-top: 20px; }

/* After setup: a compact list of calendars, each with a small ⋯ menu. */
.cal-feeds { display: flex; flex-direction: column; max-width: 620px; margin: 0; padding: 0; list-style: none; }
.cal-feed { display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cal-feed:first-child { padding-top: 2px; }
.cal-feed .cal-dot { margin-top: 6px; }
.cal-feed-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cal-feed-name { overflow-wrap: anywhere; color: var(--ink); font-weight: 600; }
.cal-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-wash); }
.cal-feed.has-problem .cal-dot { background: var(--amber); box-shadow: 0 0 0 4px var(--fill); }

.cal-menu { position: relative; }
/* An open menu can hang below the card: lift the card over the next one. */
.cal-link:has(.cal-menu[open]) { position: relative; z-index: 6; }
.cal-menu summary {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r-control);
  color: var(--ink-2); font-size: 18px; line-height: 1; list-style: none; cursor: pointer;
}
.cal-menu summary::-webkit-details-marker { display: none; }
.cal-menu summary:hover, .cal-menu[open] summary { background: var(--fill); color: var(--ink); }
.cal-menu summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cal-menu-pop {
  position: absolute; z-index: 5; top: calc(100% + 4px); right: 0; display: flex; flex-direction: column; min-width: 150px; padding: 6px;
  border: 1px solid var(--edge); border-radius: var(--r-item); background: var(--glass-strong); box-shadow: var(--lift);
  backdrop-filter: blur(20px) saturate(1.35);
}
.cal-menu-item { padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: var(--ink); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.cal-menu-item:hover, .cal-menu-item:focus-visible { background: var(--fill); outline: none; }
.cal-menu-item:last-child { color: var(--loss); }

.cal-feed-edit { margin-top: 8px; }
.cal-inline { display: flex; flex-direction: column; gap: 8px; max-width: 460px; }
.cal-inline .form-actions { gap: 12px; }

/* Quiet text buttons: "+ Add a calendar link", Cancel. */
.cal-text-btn { padding: 4px 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.cal-text-btn:hover { color: var(--accent-deep); text-decoration: underline; }
.cal-text-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.cal-add-toggle { margin-top: 10px; }
#calendar-list-status:empty { display: none; }
#calendar-list-status { margin-top: 8px; }

.cal-add { max-width: 620px; margin-top: 10px; }
.cal-help { display: flex; flex-direction: column; gap: 4px; margin: 0 0 4px; padding-left: 18px; color: var(--ink-2); font-size: 13px; }
.cal-help b { color: var(--ink); font-weight: 600; }
.cal-add .cal-form { margin-top: 12px; }
