/* Right panel layout (detail child / ultrawide) — global Gantt styles removed (FS-003) */
.right {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #fbfaf8, #eef5f1);
  border-left: 1px solid #e5e5e5;
}

.right:not(.detail-open):not(.calendar-open) {
  display: none;
}

.right.detail-open {
  display: block;
  position: relative;
  flex: 0 0 clamp(400px, 35vw, 600px);
  width: clamp(400px, 35vw, 600px);
  z-index: 1000;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.05);
  border-left: 1px solid #e5e5e5;
}

.right.calendar-open {
  display: block;
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  border-left: 1px solid #e5e5e5;
}

.app:not(.detail-docked) .main {
  flex: 0 0 100%;
  width: 100%;
  min-width: 100%;
}

.app.detail-docked .main {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
}

.app.timeline-only-view .main {
  display: none;
}
.app.timeline-only-view .right {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  min-width: 100%;
  border-left: none;
}
.app.timeline-only-view .right.detail-open .detail-view {
  transform: translateX(0);
  opacity: 1;
}

.app.dual-mode-parent .right {
  display: none;
}
.app.dual-mode-parent .main {
  flex: 0 0 100%;
  width: 100%;
  min-width: 100%;
}

/* Embedded team calendar (?view=calendar, FS-005) */
.timeline-view {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.timeline-view.cal-mode {
  background: #fff;
}

.timeline-header {
  flex: 0 0 auto;
}

.timeline-header .side-title-main {
  color: #00c896;
  font-weight: 700;
}

.global-calendar-embed {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
}

.global-calendar-embed .tcal-window {
  position: absolute;
  inset: 0;
  height: auto;
}
