/* Tigra Calendar – Night */

img.tcalIcon {
  cursor: pointer;
  margin-left: 8px;
  vertical-align: middle;
  width: 28px;
  height: 28px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  box-sizing: border-box;
  transition: border-color var(--ease), box-shadow var(--ease), background-color var(--ease);
}

img.tcalIcon:hover {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

/* Keep legacy drop-shadow PNGs out of the modern look */
div#tcalShade,
iframe#tcalIF {
  display: none !important;
}

div#tcal {
  position: absolute;
  visibility: hidden;
  z-index: 1200;
  width: 300px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow), 0 0 0 1px rgba(62, 207, 255, 0.08);
  box-sizing: border-box;
  font-family: var(--font);
}

div#tcal table {
  width: 100%;
  border: 0;
  border-collapse: separate;
  border-spacing: 0;
  background: transparent;
}

/* Navigation */
div#tcal table.ctrl {
  margin: 0 0 8px;
  border-collapse: separate;
  border-spacing: 4px 0;
}

div#tcal table.ctrl td {
  width: 34px;
  height: 34px;
  padding: 0;
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--inset);
  transition: border-color var(--ease), background-color var(--ease), box-shadow var(--ease);
}

div#tcal table.ctrl td:hover {
  border-color: var(--accent);
  background: var(--surface-2);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

div#tcal table.ctrl td img {
  display: block;
  width: 16px;
  height: 16px;
  margin: 0 auto;
  border: 0;
}

div#tcal table.ctrl th {
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: center;
  white-space: nowrap;
}

/* Weekday header */
div#tcal th {
  border: 0;
  padding: 8px 0 6px;
  text-align: center;
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: transparent;
  color: var(--muted);
}

div#tcal tr.wd th {
  border-bottom: 1px solid var(--border);
}

/* Date cells */
div#tcal td {
  border: 0;
  text-align: center;
  padding: 0;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  width: 38px;
  height: 34px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background-color var(--ease), color var(--ease), box-shadow var(--ease);
}

div#tcal table:not(.ctrl) td:hover {
  background: rgba(62, 207, 255, 0.12);
  color: var(--accent);
}

div#tcal td.othermonth {
  color: var(--muted);
  opacity: 0.55;
  font-weight: 500;
}

div#tcal td.weekend {
  background: rgba(62, 207, 255, 0.06);
}

div#tcal td.today {
  box-shadow: inset 0 0 0 1px var(--accent);
  color: var(--accent);
}

div#tcal td.selected {
  background: rgba(62, 207, 255, 0.22);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--accent);
}

div#tcal td.selected:hover {
  background: rgba(62, 207, 255, 0.3);
}
