/* base.css — gedeeld sjabloon: reset, typografie, layout-grid, utilities.
   Bevat geen kleuren/maten rechtstreeks — alles via var(--token) uit
   tokens.css, dat vóór dit bestand geladen moet zijn. */

/* Reset & body */
html, body {
  margin: 0;
  height: 100%;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background: var(--background);
  color: var(--text-color);
  font-size: 1rem;
  display: flex;
  flex-direction: column;
  max-height: 100rem;
}

/* Typografie */
h1 {
  font-size: 2.8rem;
  font-weight: bold;
  margin-bottom: 1rem;
}
h2 {
  font-size: 1.4rem;
  text-transform: uppercase;
  margin-bottom: 0.625rem;
  color: var(--primary);
}
h4 {
  font-size: 0.9rem;
}
p {
  margin-top: 0;
}

/* Utilities */
.hidden {
  display: none !important;
}

.text-align_l {
  text-align: left;
}
.text-align_r {
  text-align: right;
}
.text-align_c {
  text-align: center;
}

.text-primary-dark {
  color: var(--primary-hover);
}

/* Layout-grid */
.wrapper {
  flex: 1;
  width: 100%;
  padding: 0 0.625rem;
  box-sizing: border-box;
  max-width: 100rem;
  margin: 1rem auto 0;
}

.columns {
  display: flex;
  gap: 1rem;
  align-items: stretch;
}
.column {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.column_picks > .box_color {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Login/reset-password layout */
.wrapper-login .columns {
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.wrapper-login .column {
  flex: 0 0 30rem;
  max-width: 100%;
}
.wrapper-login .column > .box,
.wrapper-login .column > .box_color {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.login-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
}

/* Logos & icons */
.logo,
.grey-logo {
  height: 1.2rem;
  width: auto;
  object-fit: contain;
  vertical-align: middle;
}

.grey-logo {
  filter: grayscale(100%);
  opacity: 0.6;
}
.updateBtn {
  all: unset;
  display: inline-block;
}

.logo_large {
  width: 180px;
  height: auto;
  margin-top: 5px;
}
img.crestio {
  width: 100px;
  height: auto;
  margin-top: 5px;
}

/* Responsive utility classes — generieke show/hide-klassen, gebruikt op
   elke pagina. Mobile-override staat in het @media-blok hieronder.
   Afmetingen van .rotate-icon zelf staan in components.css. */
.mobile {
  display: none;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.desktop {
  display: flex;
}
.show-mobile {
  display: none;
}
.rotate-icon {
  display: none;
}
.mobile-only {
  display: none;
}
.desktop-only {
  display: inline;
}
.desktop-only-text {
  display: inline;
}
.mobile-only-text {
  display: none;
}

/* Responsive (small — max-width: 499px). Generieke layout-brede regels;
   component-specifieke responsive-regels staan bij hun component in
   components.css / match-cards.css / tables.css. */
@media (max-width: 499px) {
  h2 {
    font-size: 1.3rem;
    text-transform: uppercase;
    margin-bottom: 0.625rem;
    color: var(--primary);
  }

  .wrapper-login .column,
  .wrapper-reset .column {
    flex: 1 1 100%;
  }

  .columns {
    flex-direction: column;
  }

  .hide-mobile {
    display: none;
  }
  .show-mobile {
    display: block;
  }
  .rotate-icon {
    display: inline-block;
  }
  .mobile {
    display: flex;
  }
  .desktop {
    display: none;
  }
  .mobile-only {
    display: inline;
  }
  .desktop-only {
    display: none;
  }
  .desktop-only-text {
    display: none !important;
  }
  .mobile-only-text {
    display: inline !important;
  }
}

/* Chat widget */

/* Floating button */
#chat-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 56px;
  height: 56px;
  background: #000;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  z-index: 9999;
  opacity: 0.85;
  transition: opacity 0.2s, transform 0.2s;
}

#chat-button:hover {
  opacity: 1;
  transform: scale(1.05);
}

/* Chat window */
#chat-window {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 90%;
  max-width: 380px;
  height: 85%;
  background: #121212;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  display: none;
  overflow: hidden;
  z-index: 10000;
  transition: all 0.2s ease-in-out;
}

#chat-window iframe {
  width: 100%;
  height: 100%;
  border: none;
}

#chat-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.0);
  display: none;
  z-index: 9998;
}

/* Desktop layout */
@media (min-width: 769px) {
  #chat-window {
    bottom: 80px;
    right: 20px;
    width: 380px;
    height: 85vh;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
  }
}

/* Mobiel layout (fullscreen chat) */
@media (max-width: 768px) {

  /* Chat open: verberg de losse knop op de achtergrond */
  body.chat-open #chat-button {
    display: none !important;
  }

  #chat-window {
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100% !important;
    max-width: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
  }

  /* Verberg de overlay op mobiel: de chat vult al 100% */
  #chat-overlay {
    display: none !important;
  }
}

.status-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.status-paid {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-unpaid {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}
