/* DroneHQ Calendar Docked Right v21
   Scope: header calendar panel display only.
   Does not modify crawler/status/location/bell/help/system/profile behavior. */

:root {
  --dronehq-calendar-dock-width: 360px;
  --dronehq-calendar-dock-gap: 14px;
}

#dhq-calendar-menu-v20 {
  display: none !important;
}

.dhq-calendar-dock-v21 {
  position: fixed;
  top: var(--app-header-height, var(--shell-header-height, 72px));
  right: var(--dronehq-calendar-dock-gap);
  bottom: var(--dronehq-calendar-dock-gap);
  width: min(var(--dronehq-calendar-dock-width), calc(100vw - 24px));
  z-index: 1190;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(94, 166, 255, 0.28);
  border-radius: 16px;
  background: rgba(7, 22, 43, 0.98);
  color: #eaf3ff;
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.38);
  overflow: hidden;
}

.dhq-calendar-dock-v21[hidden] {
  display: none !important;
}

.dhq-calendar-dock-v21__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.92rem 1rem 0.78rem;
  border-bottom: 1px solid rgba(94, 166, 255, 0.2);
  background: rgba(9, 30, 58, 0.78);
}

.dhq-calendar-dock-v21__eyebrow {
  margin: 0 0 0.16rem;
  color: #4fc3ff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.dhq-calendar-dock-v21__title {
  margin: 0;
  color: #ffffff;
  font-size: 1.18rem;
  font-weight: 800;
  line-height: 1.15;
}

.dhq-calendar-dock-v21__subtle,
.dhq-calendar-dock-v21__empty,
.dhq-calendar-dock-v21__note {
  margin: 0;
  color: #aec0d5;
  font-size: 0.78rem;
  line-height: 1.38;
}

.dhq-calendar-dock-v21__close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(125, 190, 255, 0.42);
  background: rgba(15, 47, 82, 0.86);
  color: #dbeafe;
  font-size: 1.06rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.dhq-calendar-dock-v21__close:hover {
  border-color: rgba(147, 197, 253, 0.72);
  background: rgba(30, 64, 112, 0.94);
}

.dhq-calendar-dock-v21__body {
  padding: 0.92rem 1rem 1rem;
  overflow: auto;
}

.dhq-calendar-dock-v21__month {
  border: 1px solid rgba(94, 166, 255, 0.18);
  border-radius: 14px;
  background: rgba(3, 15, 30, 0.56);
  padding: 0.78rem;
  margin-bottom: 0.78rem;
}

.dhq-calendar-dock-v21__month-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  margin-bottom: 0.58rem;
}

.dhq-calendar-dock-v21__month-name {
  color: #eef6ff;
  font-size: 0.86rem;
  font-weight: 800;
}

.dhq-calendar-dock-v21__today-pill {
  border: 1px solid rgba(94, 166, 255, 0.34);
  border-radius: 999px;
  padding: 0.2rem 0.56rem;
  background: rgba(37, 99, 235, 0.2);
  color: #b8d7ff;
  font-size: 0.68rem;
  font-weight: 700;
}

.dhq-calendar-dock-v21__week,
.dhq-calendar-dock-v21__days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.26rem;
}

.dhq-calendar-dock-v21__week span {
  color: #7f93ad;
  font-size: 0.64rem;
  text-align: center;
}

.dhq-calendar-dock-v21__day {
  min-height: 31px;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.04);
  background: rgba(3, 12, 25, 0.68);
  color: #cbd9ea;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}

.dhq-calendar-dock-v21__day:hover {
  border-color: rgba(94, 166, 255, 0.42);
  background: rgba(94, 166, 255, 0.12);
}

.dhq-calendar-dock-v21__day.is-today {
  border-color: rgba(34, 197, 94, 0.44);
  background: rgba(22, 163, 74, 0.16);
  color: #dcfce7;
}

.dhq-calendar-dock-v21__day.is-selected {
  border-color: rgba(94, 166, 255, 0.64);
  background: rgba(37, 99, 235, 0.26);
  color: #ffffff;
}

.dhq-calendar-dock-v21__section {
  padding: 0.78rem 0;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.dhq-calendar-dock-v21__section h4 {
  margin: 0 0 0.34rem;
  color: #f5f9ff;
  font-size: 0.82rem;
  font-weight: 800;
}

.dhq-calendar-dock-v21__event-empty {
  border: 1px dashed rgba(94, 166, 255, 0.22);
  border-radius: 12px;
  padding: 0.72rem;
  background: rgba(8, 25, 48, 0.48);
}

.dhq-calendar-dock-v21__event-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 0.65rem;
  align-items: start;
  border-left: 3px solid rgba(94, 166, 255, 0.72);
  padding: 0.55rem 0.65rem;
  margin-top: 0.46rem;
  border-radius: 10px;
  background: rgba(10, 28, 52, 0.74);
}

.dhq-calendar-dock-v21__event-time {
  color: #dbeafe;
  font-size: 0.74rem;
  font-weight: 800;
}

.dhq-calendar-dock-v21__event-title {
  margin: 0 0 0.14rem;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
}

.dhq-calendar-dock-v21__event-meta {
  margin: 0;
  color: #9fb2c8;
  font-size: 0.72rem;
  line-height: 1.32;
}

.dhq-calendar-dock-v21__actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.5rem;
  margin-top: 0.72rem;
}

.dhq-calendar-dock-v21__action {
  min-height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(94, 166, 255, 0.28);
  background: rgba(12, 32, 63, 0.74);
  color: #dbeafe;
  text-decoration: none;
  padding: 0.5rem 0.68rem;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
}

.dhq-calendar-dock-v21__action.primary {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(14, 165, 233, 0.82));
  color: #ffffff;
  border-color: rgba(147, 197, 253, 0.38);
}

.dhq-calendar-dock-v21__note {
  margin-top: 0.78rem;
  padding-top: 0.72rem;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

/* Wide screens: reserve workspace room just like Help docked-right. */
@media (min-width: 1180px) {
  body.dronehq-calendar-docked-open {
    --dronehq-calendar-dock-space: min(var(--dronehq-calendar-dock-width), 31vw);
  }

  body.dronehq-calendar-docked-open main,
  body.dronehq-calendar-docked-open .app-main,
  body.dronehq-calendar-docked-open .shell-main,
  body.dronehq-calendar-docked-open .page-main,
  body.dronehq-calendar-docked-open .workspace-main,
  body.dronehq-calendar-docked-open .dashboard-main,
  body.dronehq-calendar-docked-open .app-content,
  body.dronehq-calendar-docked-open .shell-content,
  body.dronehq-calendar-docked-open .page-content,
  body.dronehq-calendar-docked-open .content-shell,
  body.dronehq-calendar-docked-open .dashboard-shell,
  body.dronehq-calendar-docked-open .settings-shell,
  body.dronehq-calendar-docked-open .preflight-workspace,
  body.dronehq-calendar-docked-open .fleet-shell {
    padding-right: calc(var(--dronehq-calendar-dock-space) + var(--dronehq-calendar-dock-gap)) !important;
    transition: padding-right 160ms ease;
  }

  .dhq-calendar-dock-v21 {
    width: var(--dronehq-calendar-dock-space);
    max-width: var(--dronehq-calendar-dock-space);
  }
}

/* Smaller screens: do not squeeze the page into an unusable layout. */
@media (max-width: 1179px) {
  body.dronehq-calendar-docked-open main,
  body.dronehq-calendar-docked-open .app-main,
  body.dronehq-calendar-docked-open .shell-main,
  body.dronehq-calendar-docked-open .page-main,
  body.dronehq-calendar-docked-open .workspace-main,
  body.dronehq-calendar-docked-open .dashboard-main,
  body.dronehq-calendar-docked-open .app-content,
  body.dronehq-calendar-docked-open .shell-content,
  body.dronehq-calendar-docked-open .page-content {
    padding-right: 0 !important;
  }

  .dhq-calendar-dock-v21 {
    max-width: min(380px, calc(100vw - 24px));
  }
}
