/* Fullscreen Layout */

.fullscreen-container {
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  background: #000 radial-gradient(circle at 50% 50%, rgba(168, 85, 247, 0.1) 0%, transparent 80%);
  overflow: hidden;
  z-index: 9999;
}

.main-body {
  flex: 1;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  padding: 2rem 6rem;
  gap: 6rem;
  max-height: calc(100vh - 120px);
  width: 100%;
}

.main-body.cols-1 {
    justify-content: center;
}

.main-body.cols-3 {
    justify-content: space-between;
}

/* Scaling logic for fewer columns */
.main-body.cols-1 .metrics-column {
    flex-direction: row;
    max-width: 1200px;
    width: 100%;
    gap: 10rem;
    transform: none;
}

.main-body.cols-1 .metrics-column .fs-card {
    flex: 1;
    transform: scale(1.3);
}

.main-body.cols-1 .chart-column {
    max-width: 700px;
    transform: scale(1.3);
}

.main-body.cols-1 .status-column {
    transform: scale(1.6);
}

.main-body.cols-2 .metrics-column, .main-body.cols-2 .chart-column {
    max-width: 600px;
    transform: scale(1.15);
}

.main-body.cols-2 .status-column {
    transform: scale(1.3);
}

.metrics-column, .chart-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 450px;
  min-width: 350px;
}

.status-column {
  flex: 1.5;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 3rem;
}

.indicator-label {
  font-size: 0.9rem;
  letter-spacing: 0.2rem;
  color: var(--color-grey-3);
  text-align: center;
}

.fs-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  padding: 2.5rem;
  border-radius: 20px;
  backdrop-filter: blur(10px);
}

.fs-card label {
  display: block;
  font-size: 0.9rem;
  letter-spacing: 0.2rem;
  color: var(--color-grey-3);
  margin-bottom: 2rem;
  text-align: center;
}

.fs-gauge-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 2rem;
}

.fs-gauge-container canvas {
  width: 100% !important;
  height: 100% !important;
}

.fs-gauge-container .fs-value {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 5rem;
    margin-bottom: 0;
}

/* Hide canvas by default */
.fs-gauge-container canvas {
    display: none;
}

.cols-1 .fs-gauge-container canvas {
    display: block;
}

.cols-1 .fs-gauge-container .fs-value {
    font-size: 6rem;
}

.fs-value {
  font-size: 5rem;
  font-weight: 900;
  margin-bottom: 0.5rem;
  text-align: center;
}

.fs-value-small {
  font-size: 3rem;
  font-weight: 900;
  margin-bottom: 2rem;
}

.fs-desc {
  font-size: 1.1rem;
  color: var(--color-grey-3);
  font-style: italic;
}

.hidden {
  display: none !important;
}

.status-circle-wrapper {
  position: relative;
}

.column {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

/* Column 1: Metrikker */
.metric-block {
  margin: 3rem 0;
}

.metric-block label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  letter-spacing: 0.3em;
  color: var(--color-grey-3);
  margin-bottom: 0.5rem;
}

.value-display {
  font-size: clamp(4rem, 8vw, 9rem);
  font-weight: 900;
  color: #fff;
  line-height: 1;
}

.value-display .unit {
  font-size: 2.5rem;
  color: var(--color-grey-3);
  margin-left: 1rem;
}

.metric-block .description {
  margin-top: 0.5rem;
  color: var(--color-grey-3);
  font-style: italic;
  font-size: 0.8rem;
}

/* Column 2: Status Circle */
.center-col {
  align-items: center;
}

.status-circle {
  width: min(30vw, 30vh);
  height: min(30vw, 30vh);
  border-radius: 50%;
  border: 4px solid var(--aq-good);
  background: rgba(34, 197, 94, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: all 1.5s ease;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: pulse-ring 3s infinite;
}

.circle-content label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: var(--color-grey-2);
  margin-bottom: 0.5rem;
}

#fs-status-label {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 900;
  margin: 0.5rem 0;
  color: var(--aq-good);
}

.raw-value {
  color: var(--color-grey-3);
  font-size: 1.2rem;
}

/* Column 3: Minigraff */
.chart-block label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: var(--color-grey-3);
  margin-bottom: 1rem;
}

.fs-chart-container {
  height: clamp(150px, 25vh, 250px);
}

/* Bottom Bar */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 3rem;
  border-top: 1px solid rgba(168, 85, 247, 0.2);
}

.fs-close-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  padding: 0.6rem 1.2rem;
  background: var(--color-accent);
  color: #fff;
  text-decoration: none;
  font-family: 'Orbitron', sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 6px;
  z-index: 1000;
  transition: opacity 0.2s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.fs-close-btn:hover {
  opacity: 0.9;
}

.online-indicator {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--aq-good);
  box-shadow: 0 0 10px var(--aq-good);
}

/* Fullscreen Dropdown - Opens Upwards */
#fs-device-dropdown .dropdown-menu {
  top: auto;
  bottom: calc(100% + 1rem);
  background: rgba(13, 13, 13, 0.98);
  border: 1px solid rgba(168, 85, 247, 0.3);
}

#fs-device-dropdown .dropdown-trigger {
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

#fs-device-dropdown #fs-device-name {
  font-weight: 700;
  font-size: 1rem;
}

#fs-device-dropdown .location-tag {
  font-size: 0.7rem;
  border-left: none;
  padding-left: 0.5rem;
  color: var(--color-grey-3);
  display: inline;
}

.location-tag {
  color: var(--color-grey-3);
  margin-left: 1rem;
  padding-left: 1rem;
  border-left: 1px solid rgba(255,255,255,0.1);
  font-weight: 400;
}

.bb-left, .bb-center {
  color: var(--color-grey-2);
  font-size: 0.9rem;
}

.bb-right {
  width: 200px;
  height: 2px;
  background: rgba(255,255,255,0.05);
  position: relative;
}

.refresh-line {
  height: 100%;
  width: 100%;
  background: var(--color-accent);
  transform-origin: right;
}

.credit {
  position: absolute;
  bottom: 0.5rem;
  right: 3rem;
  font-size: 0.6rem;
  color: var(--color-grey-3);
  opacity: 0.3;
}

/* Status variants for fullscreen */
.status-good { border-color: var(--aq-good); background-color: rgba(34, 197, 94, 0.08); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
.status-low { border-color: var(--aq-low); background-color: rgba(234, 179, 8, 0.08); box-shadow: 0 0 0 0 rgba(234, 179, 8, 0.7); }
.status-high { border-color: var(--aq-high); background-color: rgba(249, 115, 22, 0.08); box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.7); }
.status-critical { border-color: var(--aq-critical); background-color: rgba(239, 68, 68, 0.08); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
.status-offline { border-color: var(--color-grey-3); background-color: rgba(71, 85, 105, 0.08); box-shadow: none; animation: none; }
