/* =====================
   ALGEMEEN
   ===================== */

*{
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body{
  font-family: 'Open Sans', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #222;

  background: #fff;
}

/* =====================
   NAVIGATIE
   ===================== */

header{
  border-bottom: 2px solid #222;
  padding: 16px 0;
}

.nav-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 800px;

  margin: 0 auto;
  padding: 0 20px;
}

.logo{
  font-family: 'Merriweather', serif;
  font-size: 1.6em;
  font-weight: 700;
}

nav a{
  font-size: 0.9em;
  color: #222;
  text-decoration: none;

  margin-left: 24px;
}

nav a:hover{
  text-decoration: underline;
}

/* =====================
   ARTIKEL
   ===================== */

main{
  padding: 40px 0 80px;
}

.container{
  max-width: 50vw;

  margin: 0 auto;
  padding: 0 20px;
}

.article-meta{
  display: flex;
  flex-wrap: wrap;
  gap: 16px;

  font-size: 0.82em;
  color: #666;

  margin-bottom: 16px;
}

.category{
  font-size: 0.75em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;

  background: #222;
  padding: 2px 10px;
}

h1{
  font-family: 'Merriweather', serif;
  font-size: 2em;
  font-weight: 700;
  line-height: 1.25;

  margin-bottom: 20px;
}

.intro{
  font-size: 1.1em;
  font-style: italic;
  color: #444;

  border-left: 3px solid #222;
  padding-left: 16px;
  margin-bottom: 24px;
}

.article-img{
  display: block;
  width: 100%;
  height: auto;

  margin-bottom: 8px;
}

.article-img + p{
  font-size: 0.78em;
  color: #888;

  margin-bottom: 24px;
}

p{
  margin-bottom: 20px;
}

h2{
  font-family: 'Merriweather', serif;
  font-size: 1.3em;

  margin: 32px 0 12px;
}

blockquote{
  font-style: italic;
  font-size: 1.05em;
  color: #444;

  border-left: 4px solid #ccc;
  padding: 8px 0 8px 20px;
  margin: 24px 0;
}

blockquote cite{
  display: block;

  font-size: 0.82em;
  font-style: normal;
  color: #888;

  margin-top: 8px;
}

/* =====================
   EXTENSIE KNOP
   ===================== */

#ext-btn{
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  z-index: 100;

  background: #222;
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

#ext-btn:hover{
  background: #444;
  transform: scale(1.06);
}

/* =====================
   POPUP (dialog)
   ===================== */

#popup{
  display: block;
  position: fixed;
  bottom: 86px;
  right: 24px;
  width: min(380px, calc(100vw - 32px));
  overflow: hidden;
  z-index: 300;

  font-family: 'Open Sans', sans-serif;
  color: #f0f0f0;

  background: #1a1a1a;
  border: none;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  padding: 0;
  animation: popupIn 0.2s ease;
}

#popup:not([open]){
  display: none;
}

#popup::backdrop{
  background: rgba(0, 0, 0, 0.25);
}

@keyframes popupIn{
  from{
    opacity: 0;
    transform: translateY(10px);
  }
  to{
    opacity: 1;
    transform: translateY(0);
  }
}

/* popup header */
.popup-header{
  display: flex;
  align-items: center;
  justify-content: space-between;

  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px 14px;
}

.popup-title{
  display: flex;
  align-items: center;
  gap: 8px;

  font-size: 0.9em;
  font-weight: 600;
}

.popup-close{
  font-size: 1em;
  color: rgba(255, 255, 255, 0.4);

  background: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  padding: 2px 6px;
}

.popup-close:hover{
  color: #fff;

  background: rgba(255, 255, 255, 0.08);
}

/* tabs */
.popup-tabs{
  display: flex;

  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tab{
  flex: 1;

  font-family: 'Open Sans', sans-serif;
  font-size: 0.7em;
  color: rgba(255, 255, 255, 0.35);

  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  padding: 10px 4px;
  transition: color 0.15s, border-color 0.15s;
}

.tab:hover{
  color: rgba(255, 255, 255, 0.7);
}

.tab.active[data-tab="quick"]{
  color: #a5c8f5;

  border-bottom-color: #a5c8f5;
}

.tab.active[data-tab="sfeer"]{
  color: #d4a5f5;

  border-bottom-color: #d4a5f5;
}

/* panels */
.popup-body{
  overflow-y: auto;
  min-height: 150px;
  max-height: 40vh;

  padding: 16px;
}

.panel{
  display: none;
}

.panel.active{
  display: block;
}

/* loading */
.loading{
  display: flex;
  align-items: center;
  gap: 10px;

  font-size: 0.8em;
  color: rgba(255, 255, 255, 0.4);
}

.spinner{
  width: 14px;
  height: 14px;
  flex-shrink: 0;

  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: #7de87d;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin{
  to{
    transform: rotate(360deg);
  }
}

/* resultaat */
.result{
  display: none;

  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn{
  from{
    opacity: 0;
  }
  to{
    opacity: 1;
  }
}

.result-section{
  margin-bottom: 14px;
}

.result-label{
  font-size: 0.65em;
  text-transform: uppercase;
  letter-spacing: 0.1em;

  margin-bottom: 5px;
}

.result-label.quick{
  color: #a5c8f5;
}

.result-label.sfeer{
  color: #d4a5f5;
}

.result-text{
  font-size: 0.82em;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
}

/* chips */
.chips{
  display: flex;
  flex-wrap: wrap;
  gap: 5px;

  margin-top: 5px;
}

.chip{
  font-size: 0.68em;

  border: 1px solid;
  border-radius: 20px;
  padding: 2px 9px;
}

.chip.quick{
  color: #a5c8f5;

  border-color: #a5c8f5;
}

.chip.sfeer{
  color: #d4a5f5;

  border-color: #d4a5f5;
}

/* demo melding */
.demo-notice{
  font-size: 0.72em;
  line-height: 1.5;
  color: rgba(255, 200, 100, 0.85);

  background: rgba(255, 200, 100, 0.1);
  border: 1px solid rgba(255, 200, 100, 0.25);
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 12px;
}

.demo-notice strong{
  display: block;

  margin-bottom: 2px;
}

/* =====================
   STEMSELECTOR
   ===================== */

.popup-stem{
  display: flex;
  align-items: center;
  gap: 6px;

  font-size: 0.65em;
  color: rgba(255, 255, 255, 0.4);

  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding: 6px 14px;
}

.popup-stem label{
  white-space: nowrap;
}

.popup-stem select{
  flex: 1;

  font-family: 'Open Sans', sans-serif;
  font-size: 0.6em;
  color: rgba(255, 255, 255, 0.6);

  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  cursor: pointer;
  outline: none;
  padding: 2px 4px;
}

.popup-stem select:focus{
  border-color: rgba(125, 232, 125, 0.5);
}

/* popup footer */
.popup-footer{
  display: flex;
  justify-content: space-between;
  align-items: center;

  font-size: 0.65em;
  color: rgba(255, 255, 255, 0.3);

  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding: 8px 14px;
}

.rescan-btn{
  font-family: 'Open Sans', sans-serif;
  font-size: 0.65em;
  color: rgba(255, 255, 255, 0.3);

  background: none;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  padding: 2px 6px;
}

.rescan-btn:hover{
  color: rgba(255, 255, 255, 0.6);

  background: rgba(255, 255, 255, 0.06);
}

/* =====================
   RESPONSIVE
   ===================== */

@media (max-width: 480px){
  #popup{
    bottom: 86px;
    right: 16px;
    left: 16px;
    width: auto;
  }

  .container{
    max-width: 100%;
  }
}
