/*
 * deadlines.css — styles for the research deadline calendar.
 * Everything is scoped under .rdc. Colors are derived from the host page's text
 * color (currentColor), so the widget fits light and dark homepages alike.
 * Override the variables below on .rdc to match your site.
 */
.rdc {
  --rdc-line: color-mix(in srgb, currentColor 14%, transparent);
  --rdc-soft: color-mix(in srgb, currentColor 5%, transparent);
  --rdc-muted: color-mix(in srgb, currentColor 62%, transparent);
  --rdc-accent: #2563eb;
  --rdc-warn: #d9480f;
  --rdc-radius: 8px;
  --rdc-dialog-bg: Canvas;
  --rdc-dialog-fg: CanvasText;
  font-size: 15px;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}
.rdc *, .rdc *::before, .rdc *::after { box-sizing: border-box; }
.rdc button, .rdc select, .rdc input { font: inherit; color: inherit; }
.rdc a { color: var(--rdc-accent); }
.rdc h3, .rdc h4 { margin: 0; line-height: 1.25; }

.rdc-about { margin: 0 0 14px; font-size: 13.5px; color: var(--rdc-muted); }

/* ---------- controls */
.rdc-controls { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.rdc-chips, .rdc-types { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.rdc-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--rdc-line); background: transparent;
  color: var(--rdc-muted); transition: background .15s, border-color .15s;
}
.rdc-chip .rdc-dot { opacity: .35; }
.rdc-chip.on { color: inherit; border-color: color-mix(in srgb, var(--c) 55%, transparent); background: color-mix(in srgb, var(--c) 13%, transparent); }
.rdc-chip.on .rdc-dot { opacity: 1; }
.rdc-chip:hover { border-color: var(--c); }
.rdc-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; }
.rdc-link { background: none; border: 0; padding: 4px 6px; cursor: pointer; color: var(--rdc-accent); text-decoration: underline; text-underline-offset: 2px; }
.rdc-types { font-size: 14px; color: var(--rdc-muted); gap: 6px 16px; }
.rdc-check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.rdc-check input { accent-color: var(--rdc-accent); margin: 0; }
.rdc-select { margin-left: auto; padding: 4px 8px; border-radius: 6px; border: 1px solid var(--rdc-line); background: transparent; }
.rdc-select option { color: CanvasText; background: Canvas; }

/* ---------- layout */
.rdc-main { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
@media (max-width: 900px) { .rdc-main { grid-template-columns: minmax(0, 1fr); } }

/* ---------- month */
.rdc-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.rdc-month { font-size: 1.2em; }
.rdc-navbtns { display: flex; gap: 4px; }
.rdc-btn {
  min-width: 34px; height: 32px; padding: 0 10px; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--rdc-line); background: transparent;
}
.rdc-btn:hover { background: var(--rdc-soft); }
.rdc-grid {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  border: 1px solid var(--rdc-line); border-radius: var(--rdc-radius); overflow: hidden;
}
.rdc-wd { padding: 6px 8px; font-size: 12px; font-weight: 600; color: var(--rdc-muted); text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--rdc-line); }
.rdc-day {
  min-height: 96px; padding: 4px; display: flex; flex-direction: column; gap: 3px; min-width: 0;
  border-right: 1px solid var(--rdc-line); border-bottom: 1px solid var(--rdc-line);
}
.rdc-day:nth-child(7n) { border-right: 0; }
.rdc-day.out { background: var(--rdc-soft); }
.rdc-day.out .rdc-num { opacity: .45; }
.rdc-num { font-size: 12px; padding: 1px 4px; align-self: flex-start; border-radius: 999px; color: var(--rdc-muted); }
.rdc-day.today .rdc-num { background: var(--rdc-accent); color: #fff; font-weight: 600; }

.rdc-pill {
  display: block; width: 100%; text-align: left; cursor: pointer;
  padding: 2px 6px; border: 0; border-left: 3px solid var(--c); border-radius: 4px;
  background: color-mix(in srgb, var(--c) 16%, transparent);
  font-size: 12px; font-weight: 600; line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rdc-pill small { font-weight: 400; color: var(--rdc-muted); font-size: 11px; }
.rdc-pill:hover { background: color-mix(in srgb, var(--c) 28%, transparent); }
.rdc-pill.t-abstract { background: transparent; border: 1px dashed color-mix(in srgb, var(--c) 70%, transparent); border-left: 3px solid var(--c); }
.rdc-pill.t-rebuttal { background: transparent; font-weight: 500; }
.rdc-pill.t-notification { background: transparent; font-weight: 500; border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); border-left: 3px double var(--c); }
.rdc-pill.t-notification small { font-style: italic; }
.rdc-pill.est { background: transparent; border: 1px dotted var(--c); border-left: 3px dotted var(--c); opacity: .7; font-weight: 500; }
.rdc-more { border: 0; background: none; padding: 0 6px; text-align: left; font-size: 11px; color: var(--rdc-accent); cursor: pointer; }

@media (max-width: 640px) {
  .rdc-day { min-height: 64px; padding: 2px; }
  .rdc-wd { padding: 4px 2px; text-align: center; font-size: 10px; }
  .rdc-pill { font-size: 10px; padding: 1px 3px; }
  .rdc-pill small { display: none; }
  .rdc-select { margin-left: 0; }
}

/* ---------- upcoming */
.rdc-upcoming h3 { font-size: 1.1em; margin: 6px 0 10px; }
.rdc-upcoming h4 { font-size: .85em; text-transform: uppercase; letter-spacing: .05em; color: var(--rdc-muted); margin: 18px 0 8px; }
.rdc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rdc-row {
  width: 100%; display: flex; align-items: stretch; gap: 10px; text-align: left; cursor: pointer;
  padding: 8px 10px 8px 0; border: 1px solid var(--rdc-line); border-radius: var(--rdc-radius); background: transparent; overflow: hidden;
}
.rdc-row:hover { background: var(--rdc-soft); }
.rdc-row.muted { color: var(--rdc-muted); }
.rdc-bar { width: 4px; flex: none; background: var(--c); border-radius: 0 3px 3px 0; margin: -8px 0; }
.rdc-row.muted .rdc-bar { opacity: .5; }
.rdc-rowmain { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rdc-rowtitle { display: flex; align-items: baseline; gap: 6px; }
.rdc-rowsub { font-size: 12.5px; color: var(--rdc-muted); }
.rdc-rowsub.note { font-style: italic; }
.rdc-rowsub.notif { color: inherit; }
.rdc-row.muted .rdc-rowsub.notif { color: var(--rdc-muted); }
.rdc-field { margin-left: auto; font-size: 11px; color: var(--rdc-muted); font-weight: 400; }
.rdc-cd { flex: none; align-self: center; font-weight: 700; font-size: 13px; padding: 2px 8px; border-radius: 999px; background: var(--rdc-soft); white-space: nowrap; }
.rdc-cd.soon { color: #fff; background: var(--rdc-warn); }
.rdc-cd.tba { font-weight: 500; }
.rdc-cd.notif { background: transparent; border: 1px solid var(--rdc-line); font-weight: 600; }
.rdc-cd.action { background: transparent; border: 1px solid var(--rdc-warn); color: var(--rdc-warn); }
.rdc-rowsub.review { color: inherit; }
.rdc-pill.t-revision { background: transparent; border: 1px solid var(--c); border-left: 3px solid var(--c); font-weight: 600; }
.rdc-table tr.t-rebuttal:not(.past) td:first-child, .rdc-table tr.t-revision:not(.past) td:first-child { color: var(--rdc-warn); }
.rdc-table tr.t-notification:not(.past) td:first-child { color: var(--rdc-accent); }
.rdc-empty { color: var(--rdc-muted); }

/* ---------- all conferences overview */
.rdc-overview { margin-top: 32px; }
.rdc-overview > h3 { font-size: 1.1em; margin-bottom: 12px; }
.rdc-ovgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 14px; align-items: start; }
.rdc-ovgroup { border: 1px solid var(--rdc-line); border-top: 3px solid var(--c); border-radius: var(--rdc-radius); padding: 10px 12px 6px; }
.rdc-ovgroup h4 { display: flex; align-items: center; gap: 8px; font-size: .95em; margin: 0 0 4px; }
.rdc-ovlist { list-style: none; margin: 0; padding: 0; }
.rdc-ovlist li + li { border-top: 1px solid var(--rdc-line); }
.rdc-ov {
  width: 100%; display: flex; flex-direction: column; gap: 2px; text-align: left; cursor: pointer;
  padding: 8px 6px; border: 0; border-radius: 6px; background: transparent;
}
.rdc-ov:hover { background: var(--rdc-soft); }
.rdc-ovname { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.rdc-ovfull { font-size: 12.5px; color: var(--rdc-muted); }
.rdc-ovstatus { display: flex; flex-direction: column; font-size: 13px; }
.rdc-ovline b { font-weight: 600; }
.rdc-ovline.open b { color: var(--rdc-warn); }
.rdc-ovline.pending b { color: var(--rdc-accent); }
.rdc-ovline.tba { color: var(--rdc-muted); }
.rdc-ovmeta { font-size: 12px; color: var(--rdc-muted); }

/* ---------- footer */
.rdc-foot { margin-top: 14px; font-size: 12.5px; color: var(--rdc-muted); }

/* ---------- dialog */
.rdc-dialog {
  width: min(640px, calc(100vw - 32px)); max-height: min(80vh, 760px);
  padding: 0; border: 1px solid var(--rdc-line); border-radius: 12px;
  background: var(--rdc-dialog-bg); color: var(--rdc-dialog-fg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
}
.rdc-dialog::backdrop { background: rgba(0, 0, 0, .35); }
.rdc-dhead { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; background: var(--rdc-dialog-bg); border-bottom: 1px solid var(--rdc-line); }
.rdc-dhead h3 { display: flex; align-items: center; gap: 8px; flex: 1; font-size: 1.2em; }
.rdc-dbody, .rdc-daylist { padding: 14px 18px 18px; }
.rdc-daylist { display: flex; flex-direction: column; gap: 6px; }
.rdc-daylist .rdc-pill { font-size: 14px; padding: 6px 10px; }
.rdc-desc { margin: 0 0 12px; color: var(--rdc-muted); }
.rdc-ed { margin-top: 14px; }
.rdc-ed h4 { display: flex; align-items: baseline; gap: 10px; font-size: 1em; }
.rdc-ext { font-size: 13px; font-weight: 400; }
.rdc-meta { margin: 4px 0 0; font-size: 13px; color: var(--rdc-muted); }
.rdc-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 13.5px; }
.rdc-table td { padding: 6px 8px 6px 0; border-top: 1px solid var(--rdc-line); vertical-align: top; }
.rdc-table td:first-child { font-weight: 600; white-space: nowrap; }
.rdc-table tr.past { color: var(--rdc-muted); }
.rdc-table tr.past td:nth-child(2) { text-decoration: line-through; text-decoration-color: var(--rdc-line); }
.rdc-orig { font-size: 11.5px; color: var(--rdc-muted); }
.rdc-cdcell { text-align: right; }
.rdc-est-note { padding: 10px 12px; border: 1px dotted var(--rdc-line); border-radius: var(--rdc-radius); font-size: 13.5px; background: var(--rdc-soft); }
