/* Tracker date selection shared with the retained Client workspace. */
body.workspace-modal-open {
  overflow: hidden;
}
.internal-date-range-modal {
  width: min(540px, 96vw);
  max-height: min(820px, 94vh);
  padding: 0;
  overflow: auto;
  border-color: #dbe2ea;
  border-radius: 16px;
}

.internal-date-range-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px 16px;
}

.internal-date-range-head h2 {
  margin: 2px 0 0;
  color: #101828;
  font-size: 21px;
}

.internal-date-range-head p {
  margin: 7px 0 0;
  color: #667085;
  font-size: 14px;
}

.internal-date-range-head .icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.internal-date-range-kicker {
  color: #0b74ea;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.internal-selection-method {
  position: relative;
  margin: 0 24px;
  padding: 14px 16px;
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  background: #fff;
}

.internal-selection-method.is-active {
  border-color: #84adff;
  background: #f8fbff;
  box-shadow: 0 0 0 1px #d1e0ff;
}

.internal-selection-label {
  display: block;
  margin-bottom: 7px;
  color: #344054;
  font-size: 12px;
  font-weight: 700;
}

#internalTimelineSelect {
  width: 100%;
  min-height: 42px;
  background: #fff;
}

#internalTimelineDescription {
  display: block;
  min-height: 18px;
  margin-top: 7px;
  color: #667085;
  font-size: 11px;
}

#internalCustomRangeFields[hidden] {
  display: none;
}

#internalCustomRangeFields {
  margin-top: 14px;
}

.internal-date-range-summary {
  display: grid;
  grid-template-columns: minmax(0, 180px) auto minmax(0, 180px);
  align-items: end;
  justify-content: center;
  gap: 12px;
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 1px solid #dbe7f4;
  border-radius: 12px;
  background: #f8fbff;
}

.internal-date-range-summary label {
  display: grid;
  gap: 6px;
  color: #344054;
  font-size: 12px;
  font-weight: 650;
}

.internal-date-range-summary input {
  width: 100%;
  min-height: 38px;
  padding-right: 34px;
  background: #fff;
  cursor: pointer;
}

.internal-date-range-summary input:hover:not(:disabled) {
  border-color: #84adff;
}

.internal-date-range-summary > span {
  padding-bottom: 10px;
  color: #98a2b3;
  font-size: 12px;
}

.internal-custom-calendar[hidden] {
  display: none;
}

.internal-custom-calendar {
  width: min(320px, calc(100vw - 84px));
  margin: 0 auto 14px;
  padding: 12px;
  border: 1px solid #d0d5dd;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 30px rgb(16 24 40 / 14%);
}

.internal-custom-calendar-head {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.internal-custom-calendar-head strong {
  color: #101828;
  font-size: 14px;
  text-align: center;
}

.internal-custom-calendar-head .icon-button {
  display: grid;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  place-items: center;
  border: 1px solid #eaecf0;
  border-radius: 8px;
  background: #fff;
  color: #344054;
  font-size: 23px;
  line-height: 1;
}

.internal-custom-calendar-head .icon-button:hover:not(:disabled) {
  border-color: #84adff;
  background: #eff4ff;
  color: #175cd3;
}

.internal-custom-calendar-weekdays,
.internal-custom-calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.internal-custom-calendar-weekdays {
  margin-bottom: 4px;
}

.internal-custom-calendar-weekdays span {
  color: #98a2b3;
  font-size: 10px;
  font-weight: 650;
  text-align: center;
}

.internal-custom-calendar-day,
.internal-custom-calendar-blank {
  min-width: 0;
  height: 34px;
}

.internal-custom-calendar-day {
  position: relative;
  display: grid;
  min-height: 34px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #344054;
  font-size: 12px;
  font-weight: 550;
}

.internal-custom-calendar-day:hover:not(:disabled) {
  background: #eff4ff;
  color: #175cd3;
}

.internal-custom-calendar-day.has-data::after {
  position: absolute;
  bottom: 3px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #2e90fa;
  content: "";
}

.internal-custom-calendar-day.is-in-range {
  border-radius: 4px;
  background: #eff4ff;
}

.internal-custom-calendar-day.is-start,
.internal-custom-calendar-day.is-end {
  background: #086bd5;
  color: #fff;
  font-weight: 750;
}

.internal-custom-calendar-day.is-start::after,
.internal-custom-calendar-day.is-end::after {
  background: #fff;
}

.internal-custom-calendar-day:disabled {
  color: #d0d5dd;
  cursor: not-allowed;
}

.internal-custom-calendar-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 10px;
  color: #667085;
  font-size: 10px;
}

.internal-custom-calendar-legend > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2e90fa;
}

.internal-date-range-status {
  min-height: 20px;
  margin: 14px 24px 0;
  color: #475467;
  font-size: 13px;
}

.internal-date-range-status.bad {
  color: #b42318;
}

.internal-sync-loader {
  margin: 14px 24px 0;
  padding: 15px 16px;
  border: 1px solid #b2ccff;
  border-radius: 12px;
  background: linear-gradient(145deg, #f5f9ff, #fff);
}

.internal-sync-loader[hidden] {
  display: none;
}

#internalSyncSelectionContent[hidden],
#submitInternalDateRange[hidden] {
  display: none;
}

.internal-sync-loader-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.internal-sync-loader-head > div {
  min-width: 0;
}

.internal-sync-loader-head strong {
  display: block;
  color: #1849a9;
  font-size: 14px;
}

.internal-sync-loader-head p {
  margin: 3px 0 0;
  color: #475467;
  font-size: 12px;
}

.internal-sync-loader-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 3px solid #d1e0ff;
  border-top-color: #0b74ea;
  border-radius: 50%;
  animation: internal-loader-spin 0.8s linear infinite;
}

.internal-sync-loader-range {
  margin: 11px 0 0;
  color: #344054;
  font-size: 12px;
  font-weight: 650;
}

.internal-sync-loader > small {
  display: block;
  margin-top: 9px;
  color: #667085;
  font-size: 11px;
}

.internal-sync-loader.is-success,
.internal-sync-loader.is-empty {
  border-color: #abefc6;
  background: #f6fef9;
}

.internal-sync-loader.is-success .internal-sync-loader-icon,
.internal-sync-loader.is-empty .internal-sync-loader-icon,
.internal-sync-loader.is-error .internal-sync-loader-icon {
  display: grid;
  place-items: center;
  border: 0;
  animation: none;
  color: #fff;
  font-size: 17px;
  font-weight: 800;
}

.internal-sync-loader.is-success .internal-sync-loader-icon,
.internal-sync-loader.is-empty .internal-sync-loader-icon {
  background: #079455;
}

.internal-sync-loader.is-success .internal-sync-loader-head strong,
.internal-sync-loader.is-empty .internal-sync-loader-head strong {
  color: #067647;
}

.internal-sync-loader.is-error {
  border-color: #fecdca;
  background: #fff6f5;
}

.internal-sync-loader.is-error .internal-sync-loader-icon {
  background: #d92d20;
}

.internal-sync-loader.is-error .internal-sync-loader-head strong {
  color: #b42318;
}

@keyframes internal-loader-spin {
  to {
    transform: rotate(360deg);
  }
}

.internal-date-range-actions {
  margin-top: 14px;
  padding: 16px 24px 20px;
  border-top: 1px solid #eaecf0;
  background: #f9fafb;
}

.internal-date-range-actions.is-loading {
  justify-content: flex-end;
}

@media (max-width: 560px) {
  .internal-date-range-modal {
    width: min(430px, 96vw);
  }

  .internal-date-range-head {
    padding: 18px 18px 14px;
  }

  .internal-date-range-summary {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 9px;
    margin: 0 0 14px;
    padding: 12px;
  }

  .internal-date-range-summary > span {
    display: none;
  }

  .internal-date-range-summary label {
    width: min(240px, 100%);
  }

  .internal-custom-calendar {
    width: min(320px, calc(100vw - 72px));
  }

  .internal-selection-method {
    margin-inline: 18px;
    padding: 12px;
  }

  .internal-date-range-status {
    margin-inline: 18px;
  }

  .internal-sync-loader {
    margin-inline: 18px;
  }

  .internal-date-range-actions {
    padding: 14px 18px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .internal-sync-loader-icon {
    animation: none;
  }
}
