/* News desk — freeform Event Radar windows */

.nd-desk-host {
  display: none;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  height: 100%;
}

body.event-radar-mode.nd-full-desk .nd-desk-host:not([hidden]) {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  height: 100%;
}

body.event-radar-mode.nd-full-desk .event-radar-shell {
  display: flex;
  flex-direction: column;
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 8px 10px 10px !important;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  overflow: hidden !important;
  font-size: 0.8rem;
}

body.event-radar-mode.nd-full-desk .event-radar-header {
  flex: 0 0 auto;
  margin-bottom: 0;
}

body.event-radar-mode.nd-full-desk .nd-layout-absorbed {
  display: none !important;
}

.nd-layout-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px 12px;
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid rgba(197, 160, 89, 0.22);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
}

.nd-layout-hint {
  margin: 0;
  flex: 1 1 200px;
  font-size: 0.7rem;
  line-height: 1.35;
}

.nd-layout-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 0 0 auto;
  margin-left: auto;
}

.nd-layout-status {
  flex: 1 1 100%;
  margin: 0;
  font-size: 0.7rem;
  text-align: right;
}

.nd-layout-status-error {
  color: #f0a0a0;
}

.nd-layout-canvas {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(12, 16, 24, 0.4), rgba(6, 8, 12, 0.62)),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 23px,
      rgba(255, 255, 255, 0.015) 24px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 23px,
      rgba(255, 255, 255, 0.015) 24px
    );
  overflow: hidden;
}

.nd-win {
  position: absolute;
  display: flex;
  flex-direction: column;
  min-width: 160px;
  min-height: 120px;
  border: 1px solid rgba(197, 160, 89, 0.35);
  border-radius: 8px;
  background: rgba(8, 12, 18, 0.97);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  z-index: 5;
}

.nd-win[hidden] {
  display: none !important;
}

.nd-win-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex: 0 0 auto;
  padding: 5px 10px;
  border-bottom: 1px solid rgba(197, 160, 89, 0.22);
  background: linear-gradient(180deg, rgba(40, 34, 22, 0.95), rgba(16, 18, 24, 0.98));
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.nd-win-title:active {
  cursor: grabbing;
}

.nd-win-title-text {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-soft, #c5a059);
  font-weight: 600;
}

.nd-win-title-hint {
  font-size: 0.62rem;
  color: var(--text-muted, #8a93a3);
  opacity: 0.75;
}

.nd-win-body {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
}

.nd-win-body > .panel {
  flex: 1 1 auto;
  min-height: 0 !important;
  max-height: none !important;
  height: 100% !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: auto;
  display: flex;
  flex-direction: column;
}

.nd-win .eyebrow {
  display: none !important;
}

.nd-win #eventRadarTimeline,
.nd-win #weekAtGlanceGrid,
.nd-win #breakingNewsFeed {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none !important;
  overflow: auto;
}

.nd-win .breaking-news-compact .news-summary {
  display: block;
}

.nd-win-resize {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 16px;
  height: 16px;
  cursor: nwse-resize;
  touch-action: none;
  background:
    linear-gradient(135deg, transparent 50%, rgba(197, 160, 89, 0.55) 50%),
    linear-gradient(135deg, transparent 65%, rgba(197, 160, 89, 0.35) 65%);
  z-index: 3;
}

@media (max-width: 900px) {
  body.event-radar-mode.nd-full-desk .event-radar-shell {
    overflow: hidden !important;
    height: 100%;
  }

  .nd-layout-canvas {
    min-height: 0;
    height: 100%;
  }
}
