/* vote.ing core styles – shared layout and structure */
:root {
  --theme: #0e76bc;
  --accent: #3CB043;

  /* Checkbox Accent */
  --checkbox-accent-light: var(--session-theme) #0e76bc;
  --checkbox-accent-dark: var(--session-theme) #0e76bc;

  /* Checkbox Hover Background */
  --checkbox-item-hover-light: #fff;
  --checkbox-item-hover-dark: #fff;

  /* List Item Checked Background */
  --item-checked-bg-light: var(--session-accent) #3CB043;
  --item-checked-bg-dark: var(--session-accent) #3CB043;

  /* Divider lines */
  --divider-color-light: #ddd;
  --divider-color-dark: #444;
}

/* Light and Dark mode structure */
body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  transition: background 0.3s, color 0.3s;
  min-height: 100vh;
}

body.light {
  background-color: #fff;
  color: black;
}

body.dark {
  background-color: #111;
  color: white;
}
html, body {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
}

body > .container {
  flex: 1;
}

header {
  background: linear-gradient(to right, var(--session-theme) #0e76bc, var(--session-accent) #3CB043);
  color: white;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 60px;
  box-sizing: border-box;
}
.menu {
  background-color: var(--menu-bg-light);
  color: var(--menu-text-light);
  font-weight: bold;
}

body.dark .menu {
  background-color: var(--menu-bg-dark);
  color: var(--menu-text-dark);
}
#list-subtitle {
  text-align: center;
}
#page-header {
  min-height: 60px;
}

.logo img {
  height: 40px;
}

h1 {
  text-align: center;
  font-size: 1.8rem;
  margin-top: 1rem;
  color: var(--session-theme) #0e76bc;
}
body.dark h1 {
  color: var(--heading-dark);
}


footer {
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
  color: var(--main-text);
  border-top: 1px solid var(--border-color);
}

a {
  color: var(--session-accent) #3CB043;
  text-decoration: none;
}

a:hover {
  color: var(--session-theme) #0e76bc;
  text-decoration: underline;
}

body.dark a {
  color: #3CB043;
}

.center {
  text-align: center;
}

em {
  font-style: italic;
}

li em {
  white-space: normal;
  font-style: italic;
}
/* Home Page */ 

/* make each column a “card” matching your other panels */
.live-section {
  background: var(--panel-bg, #f6f6f6);
  border-left: 4px solid var(--accent-color, #3CB043);
  padding: 1.5rem;
  border-radius: 0.8rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* dark-mode variant */
body.dark .live-section {
  background: #1a1a1a;
  border-left-color: #0e76bc;
}

/* give the whole two-column block some horizontal breathing room */
.live-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin: 3rem 1rem;
}

/* give the whole two-column block some horizontal breathing room */
.centre-column {
  display: flex;
  max-width: 75rem;
  flex-wrap: wrap;
  gap: 2rem;
  margin: 3rem 5rem;
  margin-left: auto;
  margin-right: auto;
}

.centre-section {
  background: var(--panel-bg, #f6f6f6);
  border-left: 4px solid var(--accent-color, #3CB043);
  padding: 1.5rem;
  border-radius: 0.8rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

body.dark .centre-section {
  background: #1a1a1a;
  border-left-color: #0e76bc;
}

/* make each column a “card” matching your other panels */
.live-section {
  flex: 0 0 420px;            /* <- fixed 380px wide */
  max-width: 420px;           /* <- never grow past that */
  background: var(--panel-bg, #f6f6f6);
  border-left: 4px solid var(--accent-color, #3CB043);
  padding: 1.5rem;
  border-radius: 0.8rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* dark-mode variant */
body.dark .live-section {
  background: #1a1a1a;
  border-left-color: #0e76bc;
}

/* give the whole two-column block some horizontal breathing room */
.live-columns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin: 1rem 1rem;
}

/* Optional: collapse to full-width on small screens */
@media (max-width: 840px) {
  .live-section {
    flex: 1 1 100%;
    max-width: 100%;
 }
}

body.dark a {
  color: white;
  font-weight: bold;
}

/* Slideshow */

/* Make the slideshow wrapper fill the card */
.screenshots .slideshow {
  width: 100%;
  max-width: 100%;
}

/* Force the slide image to scale down to its container */
#slide-img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 0.5rem;
}

 .slideshow {
      position: relative;
      width: 100%;
      max-width: 100%;
    }
    .slideshow button {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      background: rgba(0,0,0,0.5);
      border: none;
      color: #fff;
      font-size: 1.5rem;
      padding: 0.5rem;
      opacity: 0;
      cursor: pointer;
      transition: opacity 0.3s ease;
      z-index: 2;
    }
    .slideshow:hover button {
      opacity: 1;
    }
    .slideshow button#prev {
      left: 0.5rem;
    }
    .slideshow button#next {
      right: 0.5rem;
    }
    /* Ensure slide image fits container */
    #slide-img {
      display: block;
      width: 100%;
      height: auto;
      object-fit: contain;
      border-radius: 0.5rem;
    }


/* End of Homepage Code */

.create-live-button {
  display: block;
  margin: 1.5rem auto 0;
  background-color: var(--accent-color, #3CB043);
  color: white;
  font-size: 1.05rem;
  padding: 0.65rem 1.4rem;
  border: none;
  border-radius: 2rem;
  cursor: pointer;
  transition: background 0.3s ease;
  width: fit-content;
}

/* form#create-form, 
form#edit-form  input {
  background: #fff;
  color: #222;
}
 */


#items-container input[type="text"] {
  margin-bottom: 0.75rem;
}

button[type="submit"] {
  background-color: #0e76bc;
  color: white;
  padding: 0.75rem 1.5rem;
  font-size: 1.1rem;
  border: none;
  border-radius: 2rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

button[type="submit"]:hover {
  background-color: #095e94;
}

#items-container input[type="text"] {
  width: 100%;
  box-sizing: border-box;
}



#text-mirror {
  position: absolute;
  visibility: hidden;
  white-space: pre;
  font-family: inherit;
  font-size: 1rem;
  padding: 0.7rem;
}


#output-panel a {
  word-break: break-word;
  color: #0e76bc;
}

/* —— Lightbox tweaks —— */

/* Constrain the enlarged image to the viewport */
#lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 0.5rem;
}

/* Common button styling inside the lightbox */
#lightbox button {
  position: absolute;
  background: rgba(0,0,0,0.6);
  border: none;
  color: #fff;
  font-size: 1.5rem;
  padding: 0.5rem;
  cursor: pointer;
  z-index: 2;
}

/* Close “×” in the top-right */
#lightbox-close {
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
}

/* Prev/Next arrows vertically centered */
#lightbox-prev,
#lightbox-next {
  top: 50%;
  transform: translateY(-50%);
}

#lightbox-prev {
  left: 1rem;
}

#lightbox-next {
  right: 1rem;
}

#lightbox button {
  opacity: 0;
  transition: opacity 0.2s ease;
}

#lightbox:hover button {
  opacity: 1;
}



/* —— QR box styling —— */

/* style the QR wrapper */
#output-panel #qr {
  margin: 1.5rem auto 0;           /* center horizontally */
  padding: 1rem;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  width: max-content;             /* shrink‐wrap to its contents */
}

/* override the generated canvas */
#output-panel #qr canvas {
  display: block;
  margin: 0 auto;
  width: 150px !important;        /* force smaller QR */
  height: 150px !important;
  image-rendering: pixelated;     /* keep crisp edges */
}

#output-panel a {
  word-break: break-word;
  color: #0e76bc;
}


/* login panel styling */
#login-panel {
  max-width: 600px;
  margin: 2rem auto;
  padding: 1.5rem;
  background: #222;
  color: #fff;
  border-radius: 0.5rem;
  text-align: center;
}
#login-panel label {
  display: block;
  margin: 0.75rem 0;
}
#login-panel input {
  width: 60%;
  padding: 0.5rem;
  border: 1px solid #444;
  border-radius: 0.25rem;
}
#login-panel button {
  margin-top: 1rem;
}
.error-msg {
  color: #f55;
  margin-top: 0.5rem;
}
/* ─── Results header gradient ───────────────────────────────────────── */
#header {
  /* override the solid blue with a gradient of your session’s theme → accent */
  background: linear-gradient(
    to right,
    var(--theme-color, #0e76bc),
    var(--accent-color, #3CB043)
  ) !important;
}

/* cookie stuff */
.vote-cookie-warning {
  background: #fff4c4;
  color: #333;
  border: 1px solid #e0c651;
  padding: 1rem;
  border-radius: 0.75rem;
  margin-bottom: 1.5rem;
  max-width: fit-content;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  font-size: 0.95rem;
}

/* Dark mode version */
body.dark .vote-cookie-warning {
  background: #2c2c2c;
  color: #f0f0f0;
  border: 1px solid #666;
}

.vote-cookie-warning {
  opacity: 0;
  animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}
/* ────────────────────────────────────────────────────
   Global modal overlay / dialog
   ──────────────────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;                       /* top/right/bottom/left:0 */
  background: rgba(0,0,0,0.5);    /* translucent backdrop */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}
.modal.hidden {
  display: none;
}

.modal-dialog {
  background: var(--panel-bg);
  border-radius: 0.6rem;
  padding: 1.5rem;
  max-width: 90%;
  width: 20rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  text-align: center;
}
.modal-dialog p {
  margin: 0 0 1rem;
  font-size: 1rem;
  color: var(--main-text);
}

/* two buttons side by side */
.modal-buttons {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}
.modal-buttons .btn-primary,
.modal-buttons .btn-secondary {
  flex: 1;
  padding: 0.6rem;
  font-size: 0.95rem;
}

/* cancel button style */
.btn-secondary {
  background: #ccc;
  color: #333;
  border: none;
  border-radius: 0.4rem;
  cursor: pointer;
  transition: filter 0.2s;
}
.btn-secondary:hover {
  filter: brightness(1.1);
}
