/* =====================================
   MAIN.CSS - Centrale layout voor platform
   ===================================== */

/* ------------------------- */
/* ROOT VARIABELEN & BASICS */
/* ------------------------- */
:root {
  --neon-blue-1: rgb(47, 95, 255);
  --neon-blue-2: #00E5FF;
  --panel-gradient: radial-gradient(circle at center, #2b65f8 0%, #2b65f8 80%, #0a1c3a 100%);
  --text-light: #F5F5F5;
  --text-dark: #111; /* of #000 voor echt zwart */

  --widget-border-radius: 20px;
  --widget-default-width: 250px;
  --widget-default-height: 180px;
  --widget-min-width: 160px;
  --widget-min-height: 100px;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: #f4f7fb;
}

/* ------------------------- */
/* HEADER / MENU STYLING    */
/* ------------------------- */
header {
  width: 95vw;
  margin: 20px auto;
  padding: 10px 30px;
  border-radius: 50px;
  border: 2px solid transparent;
  background-image:
    var(--panel-gradient),
    linear-gradient(90deg, var(--neon-blue-1), var(--neon-blue-2));
  background-origin: padding-box, border-box;
  background-clip: padding-box, border-box;
  box-shadow: 0 0 15px rgba(39, 91, 255, 0.5), 0 0 30px rgba(0, 229, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-light);
}

.logo {
  font-size: 0.9rem;
  font-weight: 500;
}

.controls {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* ------------------------- */
/* KNOPPEN EN SELECT STIJL  */
/* ------------------------- */
.controls a,
.controls .lang-select {
  padding: 6px 16px;
  border-radius: 999px;
  border: 2px solid transparent;
  font: inherit;
  color: var(--text-light);
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
    linear-gradient(90deg, var(--neon-blue-1), var(--neon-blue-2));
  background-origin: padding-box, border-box;
  background-clip: padding-box, border-box;
  box-shadow: 0 0 8px rgba(39, 91, 255, 0.5), 0 0 16px rgba(0, 229, 255, 0.3);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.controls a:hover,
.controls .lang-select:hover {
  background: rgba(255, 255, 255, 0.76); /* lichtgrijs/transparant */
  color: var(--text-dark);
  box-shadow: 0 0 10px var(--neon-blue-1), 0 0 20px var(--neon-blue-2);
}

.lang-select {
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
    linear-gradient(90deg, var(--neon-blue-1), var(--neon-blue-2)),
    url("data:image/svg+xml;charset=US-ASCII,%3Csvg width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23F5F5F5'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-position: padding-box, border-box, calc(100% - 12px) center;
  background-size: 100% 100%, 100% 100%, auto;
  padding: 6px 40px 6px 16px;
}


/* ─── UNIVERSELE BUTTON LAYOUT ─── */
.btn {
  display: inline-block;
  padding: 0.6em 1.2em;
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: 4px;
  background-color: var(--neon-blue-1);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}

/* ------------------------- */
/* UNIFORME MENU-ICON GROOTTE (emoji & svg) */
/* ------------------------- */
.menu-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;          /* maak groter naar wens: 28–36px */
  height: 32px;
  line-height: 1;
  font-size: 22px;      /* emoji-grootte */
  color: var(--text-light);
  text-decoration: none;
  flex-shrink: 0;
}

/* Als je ooit SVG-icoontjes gebruikt in dezelfde links */
.menu-icon svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* ------------------------- */
/* DASHBOARD EN WIDGETS     */
/* ------------------------- */
#dashboard {
  position: relative;
  min-height: 100%;
  padding: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: flex-start;
}

.widget {
  background-color: #ffffff;
  border-radius: var(--widget-border-radius);
  padding: 1.2rem;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.08),
    0 6px 20px rgba(0, 0, 0, 0.08);
  width: var(--widget-default-width);
  height: var(--widget-default-height);
  min-width: var(--widget-min-width);
  min-height: var(--widget-min-height);
  display: flex;
  flex-direction: column;
  position: absolute;
  overflow: hidden;
  resize: both;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.widget:hover {
  box-shadow:
    0 4px 8px rgba(47, 95, 255, 0.12),
    0 12px 24px rgba(0, 229, 255, 0.12);
  transform: translateY(-2px);
}

.widget .widget-header {
  position: relative;
  text-align: center;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
  padding: 0.5rem 2rem;
  color: currentColor;
}

.widget .widget-header::after {
    content: '';
    display: block;
    height: 4px;
    width: 80%;
    margin: 8px auto 0;
    border-radius: 2px;
    box-shadow: none;
    /* fade van wit → lichtblauw → wit */
    background: linear-gradient(
      to right,
      rgba(255,255,255,0.8) 0%,
      rgba(47,95,255,0.15) 50%,
      rgba(255,255,255,0.8) 100%
    );
  }

.widget .widget-header .close-btn {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #888;
  font-size: 1rem;
  cursor: pointer;
  transition: color 0.2s;
}

.widget .widget-header .close-btn:hover {
  color: #000;
}

.widget .widget-content {
  color: #333;
  font-size: 0.95rem;
  line-height: 1.5;
  flex: 1;
  overflow: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.5rem;
}

.resize-indicator {
  font-size: 0.75rem;
  color: #888;
  text-align: right;
  margin-top: auto;
}

@media (max-width: 768px) {
  .widget {
    width: 100% !important;
    height: auto !important;
    position: static !important;
  }
}

.widget.accent-blue   { border-top: 4px solid #2b65f8; color: #2b65f8; }
.widget.accent-purple { border-top: 4px solid #9c27b0; color: #9c27b0; }
.widget.accent-orange { border-top: 4px solid #ff9800; color: #ff9800; }
.widget.accent-green  { border-top: 4px solid #4caf50; color: #4caf50; }
.widget.accent-pink   { border-top: 4px solid #e91e63; color: #e91e63; }

/* ------------------------- */
/* CONTEXTMENU & MODALS     */
/* ------------------------- */
#customMenu {
  position: absolute;
  display: none;
  background: #fff;
  border: 1px solid #ccc;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.1);
  z-index: 1000;
  list-style: none;
  padding: 0;
  margin: 0;
}

#customMenu li {
  padding: 8px 12px;
  cursor: pointer;
}

#customMenu li:hover {
  background: #eee;
}

#widgetModal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

#widgetModal .modal-content {
  background: #fff;
  padding: 1rem;
  border-radius: 5px;
  width: 300px;
  max-height: 80vh;
  overflow-y: auto;
}

#widgetModal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

#widgetModal .close-btn {
  cursor: pointer;
  font-size: 1.2rem;
}

#moduleList button {
  display: block;
  width: 100%;
  padding: 0.5rem;
  margin-bottom: 0.3rem;
  text-align: left;
  background: #f1f1f1;
  border: none;
  border-radius: 3px;
  cursor: pointer;
}

#moduleList button:hover {
  background: #e1e1f1;
}

.widget.dragging {
  opacity: 0.5;
}