/*
  Visual-product. Копія фрейма «Level0 - base» з Figma, 1420×900.
  Розміри — пікселі фрейма. Палітра й шрифти мокапа локальні, у tokens.css їх немає.
  Обведення в Figma по центру лінії: половина назовні, половина всередині.
*/

[data-module="visual-product"] {
  position: relative;
  height: calc(900px * var(--vp-scale, 1));
}

[data-module="visual-product"][data-fit="none"] {
  width: 1420px;
}

.vp {
  --vp-line: #dde5ee;
  --vp-surface: #f5f7fa;
  --vp-text: #474b5c;
  --vp-muted: #686e87;

  position: absolute;
  top: 0;
  left: 0;
  width: 1420px;
  height: 900px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--vp-surface);
  color: var(--vp-text);
  font-family: "Inter", system-ui, sans-serif;
  line-height: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transform: scale(var(--vp-scale, 1));
  transform-origin: 0 0;
  user-select: none;
}

.vp img {
  max-width: none;
}

.vp b {
  font-weight: 600;
}

.vp__layer {
  position: absolute;
  inset: 0;
}

.vp__layer--tiles {
  inset: auto;
  top: 147px;
  left: 349px;
  width: 1060px;
  height: 753px;
  overflow: hidden;
}

/* Ліва рейка. */

.vp-rail__logo {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 40px;
  height: 40px;
  padding: 13px 0 0 6px;
  border-radius: 8px;
  background: #fff;
  color: #c8c7c0;
  font: 500 12px/14px "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.01em;
}

.vp-rail__nav {
  position: absolute;
  top: 84px;
  left: 8px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.vp-rail__item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 48px;
  height: 52px;
  padding: 6px 12px;
  border-radius: 5px;
  color: #6e6a60;
  font: 600 9px/12px "Mona Sans", system-ui, sans-serif;
  white-space: nowrap;
}

.vp-rail__item.is-active {
  background: rgb(0 0 0 / 0.05);
  color: #262422;
}

.vp-rail__badge {
  position: absolute;
  top: 2px;
  left: 24px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #dc2626;
  color: #fff;
  font-size: 11px;
  line-height: 16px;
  text-align: center;
}

.vp-rail__settings {
  position: absolute;
  top: 792px;
  left: 8px;
  height: 36px;
  justify-content: flex-start;
}

.vp-rail__avatar {
  position: absolute;
  top: 848px;
  left: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

/* Бічна панель. */

.vp-side {
  position: absolute;
  top: 0;
  left: 64px;
  width: 285px;
  height: 900px;
  background: var(--vp-surface);
  box-shadow:
    inset 1px 0 var(--vp-line),
    inset -1px 0 var(--vp-line);
}

.vp-minical {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 257px;
  height: 284px;
  padding: 20px 24px;
  border-radius: 8px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--vp-line);
}

.vp-minical__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 20px;
}

.vp-minical__month {
  display: flex;
  gap: 2px;
  font-size: 16px;
  line-height: 18px;
}

.vp-minical__arrows {
  display: flex;
  gap: 4px;
}

.vp-minical__arrow {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
}

.vp-minical__dates {
  display: grid;
  grid-template-columns: repeat(7, 28px);
  gap: 2px 3px;
}

.vp-minical__cell {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding-bottom: 1px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 500;
  line-height: 14px;
}

.vp-minical__cell--head {
  font-weight: 600;
}

.vp-minical__cell.is-muted {
  color: #aeb2c1;
}

.vp-minical__cell.is-selected {
  border-radius: 50%;
  background: #1d1e25;
  color: var(--vp-surface);
  font-weight: 600;
}

.vp-minical__cell.is-marked {
  border-radius: 50%;
  background: rgb(67 98 203 / 0.2);
  box-shadow: inset 0 0 0 1px #1d1e25;
  color: #1d1e25;
  font-weight: 600;
}

.vp-tasks {
  position: absolute;
  top: 308px;
  left: 12px;
  width: 257px;
  height: 580px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--vp-line);
}

.vp-tasks__expand {
  position: absolute;
  top: 544px;
  left: 221px;
  width: 32px;
  height: 32px;
  padding: 4px;
  border-radius: 50%;
  background: #fff;
}

.vp-tasks__inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  border-radius: 8px;
}

.vp-tasks__title {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding: 8px 8px 8px 12px;
  border-bottom: 1px solid var(--vp-line);
}

.vp-tasks__heading {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 22px;
  margin-top: 2px;
  padding: 2px 4px 2px 2px;
}

.vp-tasks__name {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 16px;
  font-weight: 600;
  line-height: 18px;
}

.vp-tasks__add {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  background: #eef2f7;
}

.vp-tasks__tagbar {
  position: relative;
  flex: none;
  height: 36px;
  margin: 0 8px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--vp-surface);
}

.vp-tasks__tags {
  position: absolute;
  top: 7px;
  left: 8px;
  display: flex;
  gap: 4px;
  width: 201px;
  height: 22px;
  overflow: hidden;
}

.vp-tasks__tag {
  flex: none;
  padding: 4px 6px;
  border-radius: 4px;
  color: var(--vp-muted);
  font-size: 12px;
  line-height: 14px;
}

.vp-tasks__tags-fade {
  position: absolute;
  top: 0;
  left: 196px;
  width: 13px;
  height: 36px;
  background: linear-gradient(to right, rgb(245 247 250 / 0), var(--vp-surface));
}

.vp-tasks__tags-more {
  position: absolute;
  top: 10px;
  left: 217px;
}

.vp-tasks__list {
  display: flex;
  flex: none;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0 8px;
  list-style: none;
}

.vp-task {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 8px;
  border-radius: 4px;
}

.vp-task__check {
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px #757a95;
}

.vp-task__line,
.vp-task__main {
  display: flex;
  flex: 1;
  align-items: center;
  min-width: 0;
}

.vp-task__line {
  gap: 8px;
}

.vp-task__main {
  gap: 4px;
}

.vp-task__title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  font-size: 14px;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vp-task__marks {
  display: flex;
  flex: none;
  align-items: center;
  gap: 4px;
}

.vp-task__when {
  flex: none;
  color: #4362cb;
  font-size: 12px;
  font-weight: 500;
}

.vp-tasks__fade {
  position: absolute;
  top: 540px;
  left: 0;
  width: 334px;
  height: 40px;
  background: linear-gradient(to bottom, rgb(255 255 255 / 0), #fff);
}

/* Панелі над сіткою. Відлік x — від лівого краю області календаря (349). */

.vp-main {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 349px;
  background: #fff;
}

.vp-segment {
  position: absolute;
  top: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 36px;
  padding: 2px 4px 2px 2px;
  border-radius: 8px;
  background: #f4f4f2;
}

.vp-lenses {
  left: 15px;
}

.vp-views {
  left: 678px;
}

.vp-segment__item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.vp-segment__item.is-active {
  background: #fff;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.12);
}

.vp-lenses .is-active {
  justify-content: flex-start;
  width: 36px;
  padding: 0 8px;
}

.vp-segment__item--text,
.vp-today__label {
  color: #5b5750;
  font: 600 12px/14px "Mona Sans", system-ui, sans-serif;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.vp-segment__item--text {
  width: auto;
  padding: 0 12px;
}

.vp-views .is-active {
  color: #45413e;
}

.vp-month {
  position: absolute;
  top: 16px;
  left: 189px;
  color: #000;
  font: 400 24px/24px "Mona Sans", system-ui, sans-serif;
  white-space: nowrap;
}

.vp-month-caret {
  position: absolute;
  top: 20px;
  left: 298px;
}

.vp-today {
  position: absolute;
  top: 14px;
  left: 547px;
  display: flex;
  align-items: center;
  height: 28px;
}

.vp-today__arrow {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 5px;
}

.vp-today__label {
  display: flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
}

.vp-new {
  position: absolute;
  top: 14px;
  left: 1022px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 28px;
  border-radius: 5px;
}

.vp-chips {
  position: absolute;
  top: 60px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 665px;
  height: 32px;
  overflow: hidden;
}

.vp-chip {
  display: flex;
  flex: none;
  align-items: center;
  height: 20px;
  padding: 0 4px 0 2px;
}

.vp-chip__badge {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin: 2px;
  border-radius: 50%;
  background: var(--chip);
}

.vp-chip__label,
.vp-add__label {
  font: 500 12px/12px "Mona Sans", system-ui, sans-serif;
  white-space: nowrap;
}

.vp-chip__label {
  padding: 0 4px;
  color: rgb(0 0 0 / 0.75);
}

.vp-add__rule {
  position: absolute;
  top: 66px;
  left: 692.5px;
  width: 1px;
  height: 20px;
  background: rgb(0 0 0 / 0.12);
}

.vp-add__badge {
  position: absolute;
  top: 67px;
  left: 708px;
  overflow: visible;
  filter: drop-shadow(0 0 2px rgb(0 0 0 / 0.1));
}

.vp-add__plus {
  position: absolute;
  top: 71px;
  left: 712px;
}

.vp-add__label {
  position: absolute;
  top: 69px;
  left: 731px;
  color: #4e4a45;
  line-height: 14px;
}

.vp-dayhead {
  position: absolute;
  top: 115px;
  color: var(--vp-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 14px;
  white-space: nowrap;
}

.vp-dayhead--today {
  top: 117px;
  color: #1d1e25;
  line-height: 10px;
  letter-spacing: -0.04em;
}

.vp-dayhead__today {
  position: absolute;
  top: 108px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #1d1e25;
  color: var(--vp-surface);
  font-size: 12px;
  font-weight: 700;
  line-height: 12px;
}

/* Сітка й години. Відлік — від області календаря (349, 147). */

.vp-grid {
  position: absolute;
  top: 147px;
  left: 349px;
  width: 1060px;
  height: 753px;
  overflow: hidden;
}

.vp-grid__row {
  position: absolute;
  left: 64.94px;
  width: 994.04px;
  height: 1px;
  margin-top: -0.5px;
  background: var(--vp-line);
}

.vp-grid__col {
  position: absolute;
  top: -1px;
  bottom: 0;
  width: 1px;
  margin-left: -0.5px;
  background: var(--vp-line);
}

.vp-grid__hour {
  position: absolute;
  right: 1006.25px;
  color: var(--vp-muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 12px;
  white-space: nowrap;
}

/* Тайли. Фон і внутрішня половина обведення — на __clip, зовнішня половина й тінь — на самому тайлі. */

.vp-tile {
  --tile-fill: #4362cb;
  --tile-stroke: #2f4ba9;
  --tile-stroke-half: 0.5px;
  --tile-ink: #e4e9f8;
  --tile-shadow: 0 0 transparent;

  position: absolute;
  border-radius: 8px;
  box-shadow:
    0 0 0 var(--tile-stroke-half) var(--tile-stroke),
    var(--tile-shadow);
  color: var(--tile-ink);
}

.vp[data-tile-shadow="on"] [data-layer="2"] .vp-tile {
  --tile-shadow: 0 4px 4px rgb(11 11 15 / 0.1);
}

.vp-tile__clip {
  position: absolute;
  inset: 0;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 8px;
  overflow: hidden;
  border-radius: inherit;
  background: var(--tile-fill);
  box-shadow: inset 0 0 0 var(--tile-stroke-half) var(--tile-stroke);
}

.vp-tile--center .vp-tile__clip {
  justify-content: center;
}

.vp-tile__title {
  display: flex;
  flex: none;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  line-height: 14px;
}

.vp-tile__name {
  flex: 1;
  min-width: 0;
  overflow-wrap: break-word;
}

.vp-tile__question {
  flex: none;
  font-weight: 500;
}

.vp-tile__time {
  display: flex;
  flex: none;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  line-height: 12px;
}

.vp-tile__time-text {
  min-width: 0;
}

.vp-tile--truncate .vp-tile__name,
.vp-tile--truncate-time .vp-tile__time-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vp-tile__hatch {
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: 5px;
  width: 116px;
  border-radius: 8px;
  background: repeating-linear-gradient(
    135deg,
    transparent 0 3.096px,
    var(--tile-hatch) 3.096px 6.096px,
    transparent 6.096px 8.839px
  );
  opacity: var(--tile-hatch-opacity);
  mix-blend-mode: var(--tile-hatch-blend, normal);
}

.vp-tile__dash {
  position: absolute;
  top: -0.5px;
  left: -0.5px;
  overflow: visible;
  fill: none;
  stroke: #2f4ba9;
  stroke-dasharray: 4 4;
}

.vp-tile--awareness {
  --tile-fill: var(--vp-surface);
  --tile-stroke: var(--vp-line);
  --tile-ink: #aeb2c1;
}

.vp-tile--awareness .vp-tile__title {
  font-weight: 500;
}

.vp-tile--awareness.vp-tile--strong .vp-tile__title {
  font-weight: 600;
}

.vp-tile--navy {
  --tile-fill: #2f4ba9;
  --tile-stroke: #23387f;
  --tile-ink: #c9d2f0;
}

.vp-tile--ink {
  --tile-fill: #172555;
  --tile-stroke: #0c132a;
  --tile-ink: #c9d2f0;
}

.vp-tile--violet {
  --tile-fill: #7c3aed;
  --tile-stroke: #5b21b6;
  --tile-ink: rgb(255 255 255 / 0.9);
}

.vp-tile--amber {
  --tile-fill: #f59e0b;
  --tile-stroke: #b45309;
  --tile-ink: #78350f;
}

.vp-tile--maybe {
  --tile-stroke-half: 0.25px;
  --tile-hatch: #fff;
  --tile-hatch-opacity: 0.4;
  --tile-hatch-blend: overlay;
}

.vp-tile--pending {
  --tile-fill: var(--vp-surface);
  --tile-stroke: transparent;
  --tile-ink: #333642;
  --tile-hatch: #2f4ba9;
  --tile-hatch-opacity: 0.1;
}

/* Минула подія: синій під білим шаром 30%, без обведення, текст приглушений. */
.vp-tile--past {
  --tile-fill: #7b91db;
  --tile-stroke: transparent;

  border-radius: 4px;
}

.vp-tile--past .vp-tile__title,
.vp-tile--past .vp-tile__time {
  opacity: 0.6;
}

/* Лінія поточного часу. У Figma — окремий шар «Time Bar Level4» над тайлами. */

.vp-now {
  position: absolute;
  inset: 0;
}

.vp-now__dot,
.vp-now__bar,
.vp-now__line {
  position: absolute;
}

.vp-now__dot {
  top: calc(var(--now-y) - 4px);
  left: calc(var(--today-x) - 5.86px);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e80004;
}

.vp-now__bar {
  top: calc(var(--now-y) - 1.5px);
  left: calc(var(--today-x) + 0.64px);
  width: 128px;
  height: 3px;
  background: #e80004;
}

.vp-now__line {
  top: calc(var(--now-y) - 0.5px);
  left: 68.97px;
  width: 993.42px;
  height: 1px;
  background: repeating-linear-gradient(to right, rgb(232 0 4 / 0.55) 0 2px, transparent 2px 4px);
}
