:root {

  --bg-color: #f9da3e;
  --primary-color: #941F67;
  --secondary-color: #EAC303;
  --text-color: #941F67;

}

/*var(--bg-color)*/

@font-face {
    font-family: 'CircularProBook';
    font-style: normal;
    font-weight: 400;
    src: url("./ext/fonts/CircularProBook.woff");
/*    src: url("./ext/fonts/CircularProBook.woff") format("woff"),url("/fonts/CircularPro-Book.otf") format("opentype"),url("/fonts/CircularProBook.svg") format("svg"),url("/fonts/CircularProBook.ttf") format("ttf")*/
}

@font-face {
    font-family: 'CircularProBook';
    font-style: normal;
    font-weight: 700;
    src: url("./ext/fonts/CircularProBold.woff");
/*    src: url("./ext/fonts/CircularProBold.woff") format("woff"),url("/fonts/CircularPro-Bold.otf") format("opentype"),url("/fonts/CircularProBold.svg") format("svg"),url("/fonts/CircularProBold.ttf") format("ttf")*/
}

html, body {
  touch-action: manipulation;
}

html {
  height: -webkit-fill-available;
}

body {
  background-color: var(--bg-color);
/*  background-image: url('achtergrond.jpg');*/
/*  background-blend-mode: multiply;*/
/*  background-size: cover;*/
/*  background-position: center; */
/*  background-repeat: no-repeat;*/
  min-height: 100vh;
  min-height: -webkit-fill-available;
  margin:0;
  padding:0;
}

.container {
  position: absolute;
  top: 50%; left: 50%;
  transform: translateX(-50%) translateY(-50%);
}
/* #profielfoto {
  display: none;
} */
#dummyCanvas {
  display: none;
}
.thumb {
  height: 50px;
  background-color: #00000029;
  cursor: pointer;
  border: 1px solid #ffffff;
  background-size: cover;
/*  box-shadow: 1px 1px 3px 0px #00000033;*/
  background: url(./grid_small.png);
  background-size: cover;
}
.thumb.mode-profiel {
  border-radius: 50%;
}
.thumb:hover {
/*  box-shadow: 1px 1px 5px 1px #00000055;*/
}
#thumbs {
  text-align: center;
  padding-bottom: 7px;
  height: 56px;
}


#switch {
  font-family: 'CircularProBook', 'Segoe UI', system-ui, sans-serif;
  font-weight: bold;
  color: #fff;
  padding: 15px;
  -webkit-user-select: none; /* Safari */
  -ms-user-select: none; /* IE 10 and IE 11 */
  user-select: none; /* Standard syntax */
}


#cropper {
  display: block;
  text-align: center;
}

#uploadfile {
  width: 300px;
  padding: 10px 14px;
  border: none;
  border-radius: 10px;
  background: var(--secondary-color);
  cursor: pointer;
  color: var(--text-color);
  display: flex; justify-content: space-between; align-items: center;
  font-family: 'CircularProBook', 'Segoe UI', system-ui, sans-serif !important;
  font-size: .9em;
  margin: 0 auto 15px auto;
  box-sizing: border-box;
  transition: all .3s;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  user-select: none;
  -webkit-user-select: none;
}

#uploadfile:hover {
  cursor: pointer;
  background: var(--primary-color);
  color: #fff;
}

#uploadfile img.caret {
  filter: brightness(0) saturate(100%) invert(18%) sepia(65%) saturate(1658%) hue-rotate(306deg) brightness(83%) contrast(95%);
  transition: filter 0.3s;
}

#uploadfile:hover img.caret {
  filter: brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(100%) contrast(100%);
}

/* Removed old nested selectors as they are no longer used with the new structure */

.hilight {
  background-color: #ffffff66 !important;
  outline: 2px solid #ffffffaa;
}

#foto_input{
  display: none;
}

#buttons {
  padding: 10px;
}

.button {
  font-family: 'CircularProBook', 'Segoe UI', system-ui, sans-serif !important;
  font-weight: 400;
  color: #fff;
  padding: 10px 15px;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  font-size: .9em;
  margin: 0 1px;
  opacity: 1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: all .3s;
}

.button:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
  transform: translateY(-1px);
  opacity: 1;
}

.button i {
  margin-right: 2px;

}

#use {
  background-color: var(--primary-color);
  color: #fff;
}
#use:hover {
  background-color: #7a1954;
}

#spin {
  display: none;
}

#back {
  background-color: var(--secondary-color);
  color: var(--text-color);
}
#help {
  background-color: var(--secondary-color);
  color: var(--text-color);
}


/*#kk {
    width: 377px;
    height: 377px;
    position: absolute;
    border: 2px solid var(--bg-color);
    z-index: 1000;
    pointer-events: none;
}*/

#helpoverlay {
  width: 380px;
  height: 554.5px;
  z-index: 9999;
  position: absolute;
  left: 0;
  top: 0;
  cursor: pointer;
}

#helpbg {
  background-color: rgba(249, 218, 62, 0.95);
  background-image: url(overlays/help-overlay.png);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 369px 584px;
  opacity: .95;
  height: 100%;
  width: 100%;
  z-index: 9998;
  position: absolute;
  left: 0;
  top: 0;
  cursor: pointer;
}

/********** Range Input Styles **********/
/*Range Reset*/
input[type="range"] {
   -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
    width: 15rem;
}

/* Removes default focus */
input[type="range"]:focus {
  outline: none;
}

/***** Chrome, Safari, Opera and Edge Chromium styles *****/
/* slider track */
input[type="range"]::-webkit-slider-runnable-track {
   background-color: var(--secondary-color);
   border-radius: 0.5rem;
   height: 0.5rem;  
}

/* slider thumb */
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; /* Override default look */
   appearance: none;
   margin-top: -8px; /* Centers thumb on the track */

   /*custom styles*/
   background-color: var(--primary-color);
   height: 1.5rem;
   width: 1.5rem;
}

input[type="range"]:focus::-webkit-slider-thumb {   
  border: 1px solid var(--secondary-color);
  outline: 3px solid var(--secondary-color);
  outline-offset: 0.125rem; 
}

/******** Firefox styles ********/
/* slider track */
input[type="range"]::-moz-range-track {
   background-color: #053a5f;
   border-radius: 0.5rem;
   height: 0.5rem;
}

/* slider thumb */
input[type="range"]::-moz-range-thumb {
   border: none; /*Removes extra border that FF applies*/
   border-radius: 0; /*Removes default border-radius that FF applies*/

   /*custom styles*/
   background-color: var(--primary-color);
   height: 1.5rem;
   width: 1.5rem;
}

input[type="range"]:focus::-moz-range-thumb {
  border: 1px solid #053a5f;
  outline: 3px solid #053a5f;
  outline-offset: 0.125rem; 
}

/* ===== bestaande styles van je app (ongewijzigd laten) ===== */

/* Zorg dat Croppie-layer voorspelbaar stapelt */
.cr-boundary { position: relative; background: url(./grid_large.png); background-size: cover; background-position: center;}

/* Remove default Croppie viewport border (causes white line) */
.cr-viewport { border: none !important; box-shadow: none !important; }

/* Outline for profile picture (circle) mode */
.cr-boundary[style*="border-radius: 50%"] {
  box-shadow: 0 0 0 3px var(--text-color);
}

/* Outline for feed and story (square) modes */
.cr-boundary[style*="border-radius: 0"] {
  box-shadow: 0 0 0 3px var(--text-color);
}

/* Overlay altijd bovenop, klik-doorlatend */
#overlayBack,
#overlayFixed,
#overlayVariable,
#overlayFront {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: block;
  opacity: 1;
  transition: opacity 200ms ease;
}

#overlayBack { z-index: 15; }
#overlayFixed { z-index: 20; }
#overlayVariable { z-index: 21; }
#overlayFront { z-index: 25; }

/* Rond in profiel, vierkant in feed/story */
#overlayBack.round,
#overlayFixed.round,
#overlayVariable.round,
#overlayFront.round  { border-radius: 50%; }
#overlayBack.square,
#overlayFixed.square,
#overlayVariable.square,
#overlayFront.square { border-radius: 0; }

/* Crossfade bij moduswissel */
#cropper.switching .cr-boundary,
#cropper.switching .cr-viewport,
#cropper.switching #overlayBack,
#cropper.switching #overlayFixed,
#cropper.switching #overlayVariable,
#cropper.switching #overlayFront {
  transition: opacity 180ms ease;
  opacity: .0;
}
#cropper.switching.sw-in .cr-boundary,
#cropper.switching.sw-in .cr-viewport,
#cropper.switching.sw-in #overlayBack,
#cropper.switching.sw-in #overlayFixed,
#cropper.switching.sw-in #overlayVariable,
#cropper.switching.sw-in #overlayFront {
  opacity: 1;
}

/* Thumbs tonen/verborgen per modus – default verbergen, JS zet juiste set zichtbaar */
#thumbs .thumb {
   display: none;
  transition: opacity 200ms ease;
  opacity: 1;
}
#thumbs.switching .thumb {
  opacity: 0;
}

/* ===== Dropdown (vervangt switch) ===== */
#modeBar { display: flex; justify-content: center; margin: 8px 0 12px; }

.dropdown { position: relative; width: 300px; }
.dropdown button {
  width: 100%;
  padding: 10px 14px;
  border: none;
  border-radius: 10px;
  background: var(--secondary-color);
  cursor: pointer;
  color: var(--text-color);
  display: flex; justify-content: space-between; align-items: center;
  font-family: 'CircularProBook', 'Segoe UI', system-ui, sans-serif !important;
  font-size: .9em;
  transition: all .3s;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.dropdown button:hover {
  background: var(--primary-color);
  color: #fff;
}
.dropdown .caret { margin-right: 4px; }
.dropdown ul {
  list-style: none;
  margin: 6px 0 0; padding: 6px 0;
  border-radius: 10px;
  background: #ffffff;
  backdrop-filter: blur(15px) brightness(1.0);
  font-family: 'CircularProBook', 'Segoe UI', system-ui, sans-serif !important;
  display: none; position: absolute; width: 100%; z-index: 30;
  color: var(--text-color);
  font-size: .9em;
  overflow-y: auto;
  max-height: 400px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.dropdown ul li.dd-option {
  padding: 8px 14px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.dropdown ul li.dd-option:hover { background: #f0f0f0; }
.dropdown ul li.dd-option.selected {
  background: #e8f5e9;
  /* font-weight: bold; */
}
.dropdown ul li.dd-option.selected::after {
  content: '✓';
  margin-left: auto;
  font-weight: bold;
}
.dropdown ul li.dd-option .dd-thumb {
  width: 45px;
  /* height: 45px; */
  object-fit: cover;
  border: 1px solid var(--text-color);
  background: url(./grid_small.png);
  background-size: cover;
  flex-shrink: 0;
}
.dropdown ul li.dd-option .dd-thumb.mode-profiel {
  border-radius: 50%;
  border: 2px solid var(--text-color);
  box-shadow: 0 0 0 2px var(--background-color), 0 0 0 4px var(--text-color);
}
.dropdown ul li.dd-option .dd-thumb.mode-feed {
  aspect-ratio: 4 / 5;
  border-radius: 0;
}
.dropdown ul li.dd-option .dd-thumb.mode-story {
  aspect-ratio: 9 / 16;
  border-radius: 0;
}
.dropdown ul li.dd-option .dd-text-container {
  flex: 1;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.dropdown ul li.dd-option .dd-type {
  font-size: 0.65em;
  opacity: 1;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 4px;
  padding: 2px 6px;
  border-radius: 4px;
  align-self: flex-start;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.dropdown ul li.dd-option .dd-type.mode-profiel {
  background: var(--secondary-color);
  color: var(--text-color);
}
.dropdown ul li.dd-option .dd-type.mode-feed {
  background: var(--primary-color);
  color: #fff;
}
.dropdown ul li.dd-option .dd-type.mode-story {
  background: var(--primary-color);
  color: #fff;
}

.dropdown ul li.dd-option .dd-title {
  font-size: 1em;
}
.dropdown ul li.dd-option .dd-edit-icon {
  width: 12px;
  height: 12px;
  opacity: 0.57;
}

/* Thumbnails are now hidden, only used for data */
#thumbs {
  display: none;
} 

/* ===== Variable overlay panel (popup) ===== */
#variablePanel {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: none;
  z-index: 2000;
}

#variableBackdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #00000066;
}

#variableDialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(420px, 90vw);
  background: #ffffff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 10px 30px #00000055;
  color: var(--text-color);
  font-family: 'CircularProBook', 'Segoe UI', system-ui, sans-serif !important;
}

.variable-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.variable-header h3 {
  margin: 0;
  font-size: 1.1em;
}

#varClose {
  border: none;
  background: transparent;
  font-size: 1.3em;
  cursor: pointer;
}

#variableForm .variable-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-bottom: 10px;
}

#variableForm label {
  font-size: 0.9em;
}

#variableForm input {
  width: calc(100% - 20px);
  /* box-sizing: border-box; */
  border: 1px solid rgba(148, 31, 103, 0.2);
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 1em;
  background: #ffffff;
  color: var(--text-color);
}

#variableForm input::placeholder {
  color: #7a8a83;
}

.variable-help {
  margin: 6px 0 10px;
  font-size: 0.85em;
  color: #03502bcc;
}

.variable-actions {
  text-align: right;
}

.variable-actions .button {
  background: var(--primary-color);
  color: #fff;
  border: none;
}

/* ===== Transparency warning dialog (uses variablePanel backdrop) ===== */
#transparencyDialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(420px, 90vw);
  background: #ffffff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 10px 30px #00000055;
  color: #ba0938;
  font-family: 'CircularProBook', 'Segoe UI', system-ui, sans-serif !important;
}

.transparency-message {
  margin: 10px 0 16px;
}

.transparency-message p {
  margin: 0;
  font-size: 1em;
  line-height: 1.5;
}

#transparencyDialog .variable-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

#transparencyDialog .variable-actions .button {
  color: #fff;
  border: none;
}

#transparencyCancel {
  background: var(--primary-color) !important;
  color: #fff !important;
}

#transparencyContinue {
  background: var(--primary-color) !important;
  color: #fff !important;
}
