﻿/* layout.css */
/* -------- Fullscreen viewer mode -------- */
	/* =========================================================
   VIEWER OVERLAY (linkViewer) - CLEAN VERSION
   ========================================================= */

/* Når viewer er åben: ingen scroll bagved */
body.viewer-open{
  overflow: hidden;
}

/* Overlay fylder hele skærmen */
body.viewer-open #linkViewer{
  position: fixed;
  inset: 0;
  z-index: 9999;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: var(--bg);
  display: grid !important;
  grid-template-rows: auto 1fr; /* header + iframe */
  padding: 0;                  /* vigtigt: ingen “luft” på mobil */
}

/* Skjul resten af siden mens viewer er åben */
body.viewer-open .overblik,
body.viewer-open .menu-panel,
body.viewer-open #importantContent{
  display: none !important;
}

/* LinkViewer base */
#linkViewer{
  flex-direction: column;
  min-height: 0;
}
#linkViewer[aria-hidden="true"]{ display:none; }
#linkViewer[aria-hidden="false"]{ display:flex; }

/* ===== Header layout: venstre | center | højre ===== */
#viewerHeader{
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
}

/* Venstre: logo + titel */
.viewer-kicker{
  display: flex;
  align-items: center;
  gap: 8px;
}
.viewer-logo{
  width: 56px;
  height: 56px;
  object-fit: contain;
}
.viewer-text{
  font-size: clamp(18px, 1.8vw, 22px);
  font-weight: 800;
}

/* Center: ur */
.viewer-clock{
  justify-self: center;
  text-align: center;
  font-size: clamp(18px, 1.8vw, 22px);
  font-weight: 800;
}

/* Højre: knapper */
.viewer-actions{
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ===== FrameWrap + iframe fylder ALT ===== */
#frameWrap{
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: var(--block);
  display: flex;
}
#viewerFrame{
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: var(--block);
}

/* ===== Mobil/tablet tweaks ===== */
@media (max-width: 1024px){
  /* Skjul titel på mobil/tablet (som du ønskede) */
  #viewerHeader .viewer-text{
    display: none;
  }

  /* Lidt større logo */
  .viewer-logo{
    width: 64px;
    height: 64px;
  }

  /* Stor tilbage-knap (touch) */
  #backBtn,
  #viewerHeader .btn{
    font-size: 18px;
    padding: 14px 18px;
    border-radius: 14px;
    min-height: 48px;
    min-width: 48px;
  }
}

	/* ---------- BOARD (OPSLAGSTAVLE) ---------- */
    .board{
      display:grid;
      min-height: 100svh;
      gap: var(--gap);
      padding: var(--gap);

      /* Desktop default: 3 zoner */
      grid-template-columns: 260px 1fr 260px;
      grid-template-areas: "overblik vigtig menu";
      align-items: stretch;
    }

    .panel{
      border-radius: var(--radius);
      padding: var(--pad);
      background: var(--panel);
      box-shadow: 0 10px 25px rgba(0,0,0,.25);
      overflow: hidden;
      border: 1px solid #ffffff10;
    }

    /* board columns */
    .menu-panel{ grid-area: menu; background: var(--panel2); }
    .overblik{ grid-area: overblik; background: var(--panel2); }
    .vigtig{
      grid-area: vigtig;
      background: #ffffff10;
      border: 1px solid #ffffff1a;

      /* gør at iframe kan fylde hele panelet */
      display:flex;
      flex-direction: column;
      min-height: 0;
    }

    .kicker{
      text-transform: uppercase;
      letter-spacing: .08em;
      font-size: 12px;
      color: var(--muted);
      margin: 0 0 10px 0;
    }

    .clock{
      font-size: clamp(38px, 3.8vw, 42px);
	  font-weight: 800;
      line-height: 1.0;
      margin: 0;
      font-variant-numeric: tabular-nums;
	  text-align: center;
    }
    .date{
      margin: 8px 0 14px 0;
      font-size: 18px;
      color: var(--muted);
	  text-align: center;
    }

    .status{
      display:flex;
      align-items:center;
      gap: 10px;
      padding: 12px 14px;
      border-radius: 14px;
      background: var(--block);
      border: 1px solid var(--outline);
      margin: 12px 0 18px 0;
    }
    .status .dot{
      width: 14px; height: 14px;
      border-radius: 999px;
      background: var(--open);
      box-shadow: 0 0 0 4px rgba(34,197,94,.15);
      flex: 0 0 auto;
    }

    .block{
      background: var(--block);
      border: 1px solid var(--outline);
      border-radius: 14px;
      padding: 14px;
      margin-top: 12px;
    }

    .list{
      margin: 10px 0 0 0;
      padding: 0;
      list-style: none;
      display: grid;
      gap: 10px;
    }
    .list li{
      padding: 12px 12px;
      border-radius: 12px;
      background: #ffffff0a;
      border: 1px solid #ffffff10;
      display:flex;
      justify-content: space-between;
      gap: 12px;
    }
    .list .time{
      color: var(--accent);
      font-weight: 900;
      white-space: nowrap;
      font-variant-numeric: tabular-nums;
    }
    .list .text{
      color: var(--text);
      font-weight: 700;
      overflow:hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .vigtig .headline{
      font-size: clamp(34px, 3.4vw, 88px);
      font-weight: 950;
      line-height: 1.05;
      margin: 10px 0 10px 0;
    }
    .vigtig .message{
      font-size: clamp(18px, 1.7vw, 38px);
      color: var(--text);
      line-height: 1.25;
      margin: 0;
      max-width: 34ch;
    }
    .vigtig .hint{
      margin-top: 18px;
      color: var(--muted);
      font-size: 14px;
    }
	
	.important-grid{
	  display:grid;
	  gap:14px;
	  align-items:start;
	  grid-template-columns: 1fr;
	}
	
	.poster-frame{
	  width: 100%;
	  max-width: 560px;
	  margin: 12px auto 0;

	  /* A4 portræt */
	  aspect-ratio: 1 / 1.4142;

	  border-radius: 14px;
	  overflow: hidden;
	  border: 1px solid var(--outline);
	  background: var(--block);
	  box-shadow: 0 10px 25px rgba(0,0,0,.25);
	}

	/* iframe skal bare fylde boksen */
	.poster-frame iframe{
	  width: 100%;
	  height: 100%;
	  border: 0;
	  display: block;
	}

	/* Mobil/tablet: behold A4, men begræns højden */
	@media (max-width: 899px){
	  .poster-frame{
		max-width: 100%;
		max-height: 65vh; /* så den ikke tager hele skærmen */
	  }
	}    
	@media (min-width: 600px){
	  .poster-frame iframe{
		width: 100%;
		max-width: none;
	  }
	}
	@media (min-width: 1025px){
		.poster-frame{
			max-width: 560px;
		}
		 
		.desktop-mobilepay{
			display: none !important;
		}
	}
	@media (max-width: 1024px) {
      .menu-panel{ display:none!important; } /*Fjerner menu på mobil*/
	  .kasse-block{ display:none; } /*Fjerner ønskekasse på mobil*/
	  .board{
        grid-template-columns: 340px 1fr;
        grid-template-areas: "overblik vigtig";
      }
    }
    @media (max-width: 899px){
      .board{
        grid-template-columns: 1fr;
        grid-template-areas:
          "overblik"
          "vigtig";
      }
      .vigtig .message{ max-width: 100%; }
      .list .text{ white-space: normal; }
    }
	
    @media (max-width: 599px){
      :root{ 
	  --gap: 12px; 
	  --pad: 14px; }
      .clock{ display:none; } /* mobil: ingen ur */
      .date{ font-size: 28px; font-weight: 700; text-align: center; }	 
    }
	/* Desktop: 3 kolonner */
	@media (min-width: 1025px){
	  .important-grid{
		grid-template-columns: 1fr 1fr 1fr;
	  }
	}

	/* Ryd op i margins */
	.important-col > .block:first-child{
	  margin-top: 0;
	}
	/* responsive */
	
