/* Date and time picker: dimensions and palette follow the amoCRM task picker. */
.cdt-field { position: relative; display: block; min-width: 0; }
.cdt-field > input:not([hidden]) { padding-right: 32px; font-variant-numeric: tabular-nums; }
.cdt-field > input:disabled { cursor: default; }
.cdt-field-icon { position: absolute; top: 50%; right: 10px; width: 16px; height: 16px; transform: translateY(-50%); pointer-events: none; color: #92989b; opacity: .75; }
.cdt-field-icon svg, .cdt-field-icon img { display: block; width: 100%; height: 100%; }
.cdt-date-display { font-variant-numeric: tabular-nums; }

.cdt-popover { position: fixed; inset: auto; margin: 0; padding: 0; border: 0; width: var(--cdt-width, 739px); height: var(--cdt-height, 349px); max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); overflow: visible; background: transparent; color: #363b44; font: 14px/1.4 'PT Sans', Arial, sans-serif; z-index: 1000; outline: none; box-shadow: none; -webkit-user-select: none; user-select: none; }
.cdt-popover:not([hidden]) { display: flex; gap: 5px; }
.cdt-popover[hidden] { display: none !important; }
.cdt-popover::backdrop { background: transparent; pointer-events: none; }
.cdt-popover *, .cdt-popover *::before, .cdt-popover *::after { box-sizing: border-box; }
.cdt-popover button { font: inherit; color: inherit; border-radius: 0; box-shadow: none; }
.cdt-popover button:disabled { cursor: default; }
.cdt-popover button:focus-visible, .cal-app .cdt-popover button:focus-visible { outline: 1px solid #707378; outline-offset: -2px; box-shadow: none; }
.cdt-host-open { overflow: visible !important; }

.cdt-presets, .cdt-main { height: 100%; border: 1px solid #e0e3e6; border-radius: 5px; background: #fff; box-shadow: 0 3px 8px rgba(27, 52, 66, .08), 0 10px 24px rgba(27, 52, 66, .10); }
.cdt-presets { display: flex; flex: 0 0 146px; flex-direction: column; overflow: auto; }
.cdt-preset { flex: 0 0 36px; width: 100%; min-height: 36px; padding: 7px 15px; border: 0; border-bottom: 1px solid #e8eaeb; background: #fff; text-align: left; white-space: nowrap; font-size: 15px !important; line-height: 20px !important; }
.cdt-preset:hover, .cdt-preset:active { background: #e8eaeb; }
.cdt-preset:disabled { color: #92989b; background: #fff; }
.cdt-main { display: flex; flex: 1 1 0; min-width: 0; overflow: hidden; }
.cdt-calendar { flex: 0 1 237px; min-width: 190px; height: 100%; overflow: auto; padding: 10px; }
.cdt-month { display: flex; align-items: center; justify-content: space-between; gap: 4px; height: 24px; margin-bottom: 7px; }
.cdt-month-label { flex: 1; min-width: 0; text-align: center; white-space: nowrap; font-size: 15px; font-weight: 400; line-height: 20px; }
.cdt-month-arrow { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 23px; width: 23px; height: 24px; padding: 0; border: 0; background: transparent; font-size: 20px !important; line-height: 1 !important; }
.cdt-month-arrow:hover { background: #f2f2f2; border-radius: 3px; }
.cdt-month-arrow:disabled { color: #c8cbcd; }
.cdt-weekdays, .cdt-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cdt-weekdays { margin-bottom: 4px; }
.cdt-weekdays > span { display: grid; place-items: center; height: 20px; font-size: 9px; line-height: 14px; }
.cdt-day { display: grid; place-items: center; justify-self: center; width: 29px; max-width: 100%; height: 29px; padding: 0; border: 0; background: transparent; text-align: center; font-size: 13px !important; line-height: 22px !important; }
.cdt-day.is-other { color: #92989b; }
.cdt-day.is-today { font-weight: 700; }
.cdt-day:hover { border-radius: 20px; background: #f2f2f2; }
.cdt-day.is-selected { border-radius: 20px; background: #f5f5f5; color: var(--trade-selected); font-weight: 700; }
.cdt-day:disabled { color: #d9dcde; background: transparent; }

.cdt-time { display: flex; flex: 1 1 348px; flex-direction: column; min-width: 200px; height: 100%; border-left: 1px solid #e8eaeb; }
.cdt-time-caption { display: flex; align-items: center; gap: 7px; flex: 0 0 36px; min-width: 0; min-height: 36px; padding: 5px 8px; border-bottom: 1px solid #e8eaeb; font-size: 13px; line-height: 20px; font-variant-numeric: tabular-nums; }
.cdt-time-caption > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cdt-time-scroll { flex: 1 1 0; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #cdcdcd #eaeaea; }
.cdt-time-grid { position: relative; width: 100%; min-width: 0; }
.cdt-slot { position: relative; display: block; width: 100%; height: 24px; min-height: 0; padding: 0 0 0 76px; border: 0; background: #fff; text-align: left; touch-action: pan-y; }
.cdt-slot::after { position: absolute; top: 0; left: 76px; right: 0; border-top: 1px dotted #e8eaeb; content: ''; }
.cdt-slot.is-hour::after { border-top-style: solid; }
.cdt-slot:hover { background: #f2f6fc; }
.cdt-slot:focus-visible { background: #e9f1ff; }
.cdt-slot:disabled { background: #f8f9fa; color: #c5c8ca; }
.cdt-time-label { position: absolute; left: 0; top: 0; display: block; width: 76px; padding: 0 10px 0 4px; color: #92989b; text-align: right; font-size: 13px; font-weight: 400; line-height: 18px; font-variant-numeric: tabular-nums; }
.cdt-selection { position: absolute; left: 76px; right: 0; z-index: 2; min-height: 0; padding: 3px 7px; overflow: hidden; border: 1px solid #e8eaeb; background: #e9f1ff; color: #363b44; pointer-events: auto; touch-action: none; cursor: move; font-size: 12px; line-height: 14px; }
.cdt-selection .cdt-resize-start, .cdt-selection .cdt-resize-end { position: absolute; left: 0; right: 0; width: 100%; height: 6px; min-height: 0; border: 0; padding: 0; background: transparent; cursor: ns-resize; touch-action: none; }
.cdt-resize-start { top: 0; }
.cdt-resize-end { bottom: 0; }
.cdt-selection > strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 700; }
.cdt-selection > span { display: block; color: #92989b; font-size: 12px; font-weight: 400; font-variant-numeric: tabular-nums; }
.cdt-pointer { position: absolute; left: var(--cdt-arrow-left, 227px); top: -6px; z-index: 3; width: 12px; height: 12px; border-top: 1px solid #e8eaeb; border-left: 1px solid #e8eaeb; background: #fff; transform: rotate(45deg); pointer-events: none; }
.cdt-popover.is-above .cdt-pointer { top: auto; bottom: -6px; transform: rotate(225deg); }
.cdt-presets, .cdt-calendar { scrollbar-width: thin; scrollbar-color: #cdcdcd #eaeaea; }
.cdt-popover ::-webkit-scrollbar { width: 7px; height: 0; }
.cdt-popover ::-webkit-scrollbar-track { background: #eaeaea; }
.cdt-popover ::-webkit-scrollbar-thumb { border-radius: 4px; background: #cdcdcd; }

.cdt-popover.cdt-time-only { width: var(--cdt-width, 348px); }
.cdt-time-only .cdt-presets, .cdt-time-only .cdt-calendar { display: none; }
.cdt-time-only .cdt-time { border-left: 0; }
.cdt-popover.cdt-date-only { width: var(--cdt-width, 237px); height: var(--cdt-height, 251px); }
.cdt-date-only .cdt-calendar { flex: 1 1 auto; min-width: 0; padding: 10px; }

@media (max-width: 740px) {
  .cdt-presets { flex-basis: 136px; }
  .cdt-preset { padding-inline: 10px; font-size: 14px !important; }
  .cdt-calendar { flex-basis: 217px; padding-inline: 7px; }
  .cdt-time { min-width: 180px; }
  .cdt-day { width: 27px; }
}
