/* All selectors are scoped to the standalone time-range popup. */
.ttr-popup {
  position: fixed;
  z-index: 650;
  width: min(780px, calc(100vw - 20px));
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #c6dce1;
  border-radius: 10px;
  background: #fff;
  color: #203b45;
  box-shadow: 0 12px 40px #173f4e26, 0 2px 8px #173f4e10;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.4;
  text-align: left;
}
.ttr-popup *, .ttr-popup *::before, .ttr-popup *::after { box-sizing: border-box; }
.ttr-popup button, .ttr-popup input { font-family: inherit; }
.ttr-popup button {
  cursor: pointer;
  border: 1px solid #d4e2e6;
  border-radius: 5px;
  background: #fff;
  color: #294b57;
  font-size: 13px;
  line-height: 1.3;
}
.ttr-popup button:hover { background: #edf7f8; }
.ttr-popup button:focus-visible, .ttr-popup input:focus-visible {
  outline: 2px solid #138898;
  outline-offset: 2px;
}
.ttr-popup button:disabled { cursor: default; opacity: .4; }
.ttr-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid #e0e9ec; }
.ttr-header h2 { margin: 0; font-size: 16px; font-weight: 650; letter-spacing: 0; color: #162f39; }
.ttr-popup .ttr-close { width: 30px; height: 30px; padding: 0; border-color: transparent; font-size: 24px; line-height: 1; }
.ttr-layout { display: grid; grid-template-columns: 148px minmax(0, 1fr); }
.ttr-presets { display: flex; flex-direction: column; gap: 5px; padding: 16px 10px; border-right: 1px solid #e0e9ec; background: #f8fbfc; }
.ttr-presets button { padding: 10px 9px; border-color: transparent; background: transparent; text-align: left; white-space: nowrap; }
.ttr-presets .ttr-preset-active { color: #076979; border-color: #b8dce2; background: #e7f5f7; font-weight: 600; }
.ttr-content { min-width: 0; padding: 16px; }
.ttr-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ttr-field { min-width: 0; display: flex; align-items: center; border: 1px solid #ccdfe4; border-radius: 6px; }
.ttr-popup .ttr-boundary { align-self: stretch; border: 0; border-right: 1px solid #dbe7ea; border-radius: 5px 0 0 5px; padding: 8px 11px; background: #f3f7f8; font-weight: 600; }
.ttr-popup .ttr-boundary[aria-pressed="true"] { color: #076979; background: #e4f4f6; box-shadow: inset 0 -2px #087f91; }
.ttr-field input { min-width: 0; width: 100%; padding: 9px 7px; border: 0; border-radius: 0 5px 5px 0; background: #fff; color: #203b45; font-size: 13px; cursor: pointer; }
.ttr-navigation { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 16px 0 10px; }
.ttr-navigation button { flex: 0 0 30px; height: 30px; padding: 0; font-size: 24px; line-height: 1; }
.ttr-navigation .ttr-hint { margin: 0; color: #526e79; font-size: 12px; text-align: center; }
.ttr-calendars { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.ttr-month { min-width: 0; }
.ttr-month h3 { margin: 0 0 10px; color: #203b45; font-size: 14px; font-weight: 650; text-align: center; }
.ttr-weekdays, .ttr-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); text-align: center; }
.ttr-weekdays { margin-bottom: 5px; color: #607a84; font-size: 11px; font-weight: 600; }
.ttr-weekdays span { padding: 4px 0; }
.ttr-days { row-gap: 3px; }
.ttr-days .ttr-day { height: 32px; min-width: 0; padding: 0; border: 1px solid transparent; border-radius: 3px; background: #fff; font-size: 12px; font-variant-numeric: tabular-nums; }
.ttr-days .ttr-day:hover { background: #d7eef2; border-color: #a4d1da; }
.ttr-days .ttr-selected { background: #e4f2f5; border-radius: 0; color: #155465; }
.ttr-days .ttr-today { box-shadow: inset 0 -2px #168d9e; font-weight: 700; }
.ttr-days .ttr-start, .ttr-days .ttr-end { background: #087f91; border-color: #087f91; color: #fff; border-radius: 4px; font-weight: 700; }
.ttr-days .ttr-start:hover, .ttr-days .ttr-end:hover { background: #076b7b; color: #fff; }
.ttr-empty-day { height: 32px; }
.ttr-error { min-height: 17px; margin: 9px 0 0; color: #a22f42; font-size: 12px; }
.ttr-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 18px; border-top: 1px solid #e0e9ec; background: #fbfdfd; }
.ttr-selection { min-width: 0; }
.ttr-selection > span { display: block; margin-bottom: 3px; color: #58727c; font-size: 11px; }
.ttr-summary { display: block; color: #203b45; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ttr-actions { display: flex; flex-shrink: 0; gap: 8px; }
.ttr-actions button { padding: 9px 12px; }
.ttr-popup .ttr-apply { background: #087f91; border-color: #087f91; color: #fff; font-weight: 600; }
.ttr-popup .ttr-apply:hover { background: #076b7b; border-color: #076b7b; }
@media (max-width: 700px) {
  .ttr-layout { grid-template-columns: minmax(0, 1fr); }
  .ttr-presets { display: grid; grid-template-columns: 1fr 1fr; padding: 10px 14px; gap: 4px 10px; border-right: 0; border-bottom: 1px solid #e0e9ec; }
  .ttr-presets button { padding: 8px 10px; }
  .ttr-content { padding: 13px; }
  .ttr-calendars { gap: 12px; }
  .ttr-footer { flex-wrap: wrap; gap: 12px; padding: 12px 14px; }
  .ttr-actions { margin-left: auto; }
}
@media (max-width: 450px) {
  .ttr-header { padding: 11px 13px; }
  .ttr-fields { gap: 8px; }
  .ttr-popup .ttr-boundary { padding: 8px; }
  .ttr-field input { padding: 9px 4px; font-size: 12px; }
  .ttr-calendars { grid-template-columns: minmax(0, 1fr); gap: 17px; }
  .ttr-days .ttr-day, .ttr-empty-day { height: 34px; }
  .ttr-summary { font-size: 12px; }
}
@media print { .ttr-popup { display: none !important; } }
