/* Shared controls inherit the site's palette and type. */
.gn-date-trigger {
  font: inherit;
  font-size: .85rem;
  color: var(--text, #222);
  background: var(--surface, #fff);
  border: 1px solid var(--line, #aaa);
  border-radius: 6px;
  padding: 8px 10px;
  min-height: 36px;
  cursor: pointer;
}
.gn-date-trigger:disabled { opacity: .5; cursor: default; }
.gn-date-dialog {
  box-sizing: border-box;
  width: min(420px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  padding: 20px;
  border: 1px solid var(--line, #aaa);
  border-radius: 8px;
  color: var(--text, #222);
  background: var(--surface, #fff);
  font: inherit;
}
.gn-date-dialog::backdrop { background: rgb(0 0 0 / 45%); }
.gn-date-dialog h2 { margin: 0 0 16px; font-size: 1.1rem; }
.gn-date-fields { display: grid; grid-template-columns: 1.4fr .7fr 1fr; gap: 12px; }
.gn-date-fields label { display: grid; gap: 6px; font-size: .875rem; }
.gn-date-dialog input, .gn-date-dialog select, .gn-date-dialog button {
  box-sizing: border-box;
  min-width: 0;
  min-height: 40px;
  padding: 8px;
  border: 1px solid var(--line, #aaa);
  border-radius: 4px;
  font: inherit;
  color: inherit;
  background: var(--surface-2, #f5f5f5);
}
.gn-date-dialog input, .gn-date-dialog select { width: 100%; }
.gn-date-dialog button { cursor: pointer; }
.gn-date-shortcuts, .gn-date-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.gn-date-actions { justify-content: flex-end; }
.gn-date-error { font-size: .875rem; }
.gn-date-error:empty { display: none; }
.gn-date-dialog :focus-visible, .gn-date-trigger:focus-visible {
  outline: 2px solid var(--accent, #555); outline-offset: 2px;
}
/* Expose the formerly transparent nav input; retain its existing handlers. */
.datebar { flex-wrap: wrap; }
.datebar .dlabel { min-width: 0; text-align: left; }
.datebar .dlabel b { display: none; }
.datebar .dlabel span { font-size: .75rem; text-transform: none; letter-spacing: normal; }
.datebar .dlabel input {
  position: static; opacity: 1; width: auto; height: auto;
  min-height: 28px; cursor: text; color: var(--text);
  font: inherit; font-size: .875rem; color-scheme: inherit;
}
.datebar .dlabel input:focus-visible { opacity: 1; }
.datebar .gn-date-trigger { font-size: .8rem; padding: 8px; }
@media (max-width: 600px) {
  .datebar { display: grid; grid-template-columns: 36px minmax(0, 1fr) 36px auto; }
  .datebar #dPrev { grid-column: 1; grid-row: 1; }
  .datebar .dlabel { grid-column: 2; grid-row: 1; }
  .datebar #dNext { grid-column: 3; grid-row: 1; }
  .datebar #dToday { grid-column: 4; grid-row: 1; }
  .datebar .gn-date-trigger { grid-column: 1 / -1; grid-row: 2; border-top: 1px solid var(--line); }
  .datebar .dlabel input { width: 100%; min-width: 0; }
}
