/* Στυλ για τον τίτλο με στρογγυλές γωνίες και σκιά */
#pageTitleOverlay {
  position: fixed;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  box-shadow: 4px 4px 8px rgba(0,0,0,0.5);
  padding: 5px 10px;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  border-radius: 8px;
}
#pageTitleOverlay h1,
#pageTitleOverlay h2 {
  margin: 0;
  white-space: nowrap;
}
#pageTitleOverlay h1 {
  font-size: 24px;
  font-weight: bold;
  color: black;
  letter-spacing: 1px;
}
#pageTitleOverlay h2 {
  font-size: 11px;
  color: #333;
}
body {
  font-family: 'Roboto', sans-serif;
  margin: 0;
  overflow: hidden;
  background: #f7f7f7;
  padding-top: 60px;
}
.canvas {
  position: absolute;
  background: transparent;
  transition: all 0.6s ease-in-out;
}
canvas {
  padding: 8px;
  filter: drop-shadow(4px 4px 4px rgba(0,0,0,0.5));
  overflow: visible;
}
#canvasTableBackground {
  position: absolute;
  background: white;
  border: 1px solid rgba(0,0,0,0.1);
  box-shadow: 6px 6px 10px rgba(0,0,0,0.3);
  z-index: -5;
  opacity: 1;
  transition: all 0.5s ease-in-out;
}
/* Ομαδοποίηση καμβάδων */
#canvasS_groups, #canvasD_groups, #canvasP_groups {
  position: absolute;
  z-index: 60;
}
/* Sector canvases */
#canvasS { z-index: 10; }
#canvasF { z-index: 20; }
#canvasD { z-index: 30; }
#canvasP { z-index: 40; }
#canvasPeriods { z-index: 50; }
/* Button panel */
#buttonPanel {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
#buttonPanel button {
  background-color: #008CBA;
  color: white;
  padding: 10px 15px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  box-shadow: 4px 4px 4px rgba(0,0,0,0.5);
  font-size: 1em;
}
#buttonPanel button:disabled {
  background-color: #ccc;
  color: #666;
  cursor: not-allowed;
}
/* Διάταξη 2x2 για collapsed κατάσταση */
#buttonPanel.collapsed {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 5px;
  grid-template-areas: 
     "next toggle"
     "fill reset";
}
#nextState { grid-area: next; }
#toggleFBlock { grid-area: toggle; }
#fillAll { grid-area: fill; }
#reset { grid-area: reset; }
/* Offscreen canvas */
#offscreenCanvas { display: none; }
/* Balloon overlay */
#balloonOverlay {
  position: absolute;
  background: white;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.3);
  padding: 6px 8px;
  border-radius: 5px;
  z-index: 150;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  font-size: 13px;
}
/* Info Panels */
#infoPanelFull {
  position: fixed;
  top: 0;
  left: 20px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.2);
  box-shadow: inset 0 4px 8px rgba(0,0,0,0.4);
  border-radius: 8px;
  padding: 10px;
  z-index: -10;
  transition: all 0.5s ease;
  opacity: 1;
}
#infoPanelCollapsed {
  position: fixed;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.2);
  box-shadow: inset 0 4px 8px rgba(0,0,0,0.4);
  border-radius: 8px;
  padding: 10px;
  z-index: -20;
  transition: all 0.5s ease;
  opacity: 1;
}
/* Δεξί συρτάρι οδηγιών */
.drawer-right {
  width: 1050px;
  height: 420px;
  position: fixed;
  top: calc(50% - 80px);
  transform: translateY(-50%);
  right: -1045px; /* Όταν κλειστό, εμφανίζονται 5px */
  background-color: white;
  color: #000;
  padding: 10px;
  box-sizing: border-box;
  transition: right 0.3s ease-in-out;
  border-radius: 8px 0 0 8px;
  box-shadow: 4px 4px 8px rgba(0,0,0,0.5);
  z-index: 1100;
  overflow: visible;
}
.drawer-right.active {
  right: 0;
}
/* Toggle κουμπί για το drawer (fixed θέση, μετακινούμενο μέσω JS) */
.toggleBtnRight {
  position: fixed;
  left: auto;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background-color: #007bff;
  color: #fff;
  border: none;
  padding: 7px 8px;
  cursor: pointer;
  border-radius: 0 0 0 5px;
  font-size: 18px;
  z-index: 2000;
  transition: left 0.3s ease-in-out;
  width: 30px;
}
.toggleBtnRight:hover { 
  background-color: #0056b3; 
}
/* Στυλ για το iframe */
#instructionsFrame {
  width: 100%;
  height: calc(100% - 10px);
  border: none;
}
