/* Algemene Stijlen */
body {
  font-family: "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  margin: 0;
  padding: 0;
  transition: background-color 0.3s ease;
}

/* Verberg focus outlines voor een nettere uitstraling */
*:focus {
  outline: none;
}

/* No-scroll klasse */
body.no-scroll {
  overflow: hidden;
}

/* Zijbalk */
.excepta-sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 50px;
  height: 100vh;
  background-color: #292929;
  border-right: 1px solid #6da46b;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 20px;
  z-index: 1000;
  transition: width 0.3s ease;
}

body.menu-open .excepta-sidebar {
  width: 200px;
}

.excepta-sidebar .excepta-logo {
  width: 40px;
  height: 40px;
  margin-bottom: 20px;
}

.excepta-sidebar .excepta-options {
  margin-top: auto;
  margin-bottom: 20px;
  width: 100%;
}

.excepta-sidebar .option-wrapper {
  position: relative;
  text-align: center;
  padding: 10px 0;
  cursor: pointer;
}

.excepta-sidebar .option-wrapper:hover {
  background-color: #333;
}

.excepta-sidebar .option-wrapper > span {
  position: absolute;
  display: none;
  left: 60px;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  padding: 5px 10px;
  font-size: 12px;
  background-color: #333;
  border-radius: 0 3px 3px 0;
  white-space: nowrap;
  z-index: 1000;
}

.excepta-sidebar .option-wrapper:hover > span {
  display: block;
}

.excepta-sidebar img.menu-trigger,
.excepta-sidebar img.excepta-settings,
.excepta-sidebar img.logout-icon {
  width: 20px;
  height: 20px;
  display: inline-block;
}

/* Overlay achtergrond */
.excepta-fade-bg {
  position: fixed;
  display: none;
  z-index: 999;
  background-color: rgba(0,0,0,0.85);
  left: 0;
  width: 100vw;
  height: 100vh;
  top: 0;
  text-align: center;
}

.excepta-fade-bg img.excepta-fade-logo {
  position: absolute;
  display: inline-block;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
}

/* Tabs Menu */
.excepta-tabs {
  position: fixed;
  left: 50px;
  top: 0;
  width: 270px;
  height: 100vh;
  background-color: #292929;
  border-right: 1px solid #6da46b;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  box-sizing: border-box;
  cursor: default;
  transition: left 0.3s ease;
}

body.menu-open .excepta-tabs {
  left: 200px;
}

.excepta-tabs h3.excepta-title {
  font-size: 16px;
  color: white;
  text-align: center;
  line-height: 40px;
  margin: 20px;
}

.excepta-tabs-content {
  padding: 10px;
}

.excepta-category {
  margin-bottom: 20px;
}

.excepta-category .category-name {
  display: block;
  font-weight: bold;
  margin-bottom: 10px;
  font-size: 14px;
  color: #6da46b; /* Accentkleur voor categorieën */
}

.excepta-category .tabs-list .tab {
  padding: 10px;
  margin-bottom: 5px;
  background-color: transparent;
  border-radius: 5px;
  color: #a5a5a5;
  font-size: 12px;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.excepta-category .tabs-list .tab:hover {
  background-color: #404040;
  color: white;
}

.excepta-category .tabs-list .tab.active {
  background-color: #505050;
  color: white;
}

/* Loader */
.excepta-loader {
  position: fixed;
  width: 200px;
  line-height: 50px;
  top: 40vh;
  left: calc(50vw - 100px);
  background-color: rgba(0,0,0,0.8);
  z-index: 2000;
  color: white;
  text-align: center;
  font-size: 14px;
  border-radius: 4px;
  box-shadow: 0 0 10px #000;
  display: none;
}

.excepta-loader .loader-spinner {
  border: 6px solid #f3f3f3; /* Light grey */
  border-top: 6px solid #6da46b; /* Accentkleur */
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 10px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Hoofdinhoudsgebied */
main#main-content {
  margin-left: 50px; /* Breedte van de zijbalk */
  padding: 20px;
  box-sizing: border-box;
  transition: margin-left 0.3s ease;
  height: 100vh;
  overflow: auto;
  background-color: #2E2E2E; /* Achtergrondkleur voor de hoofdinhoud */
  color: white;
}

body.menu-open #main-content {
  margin-left: 200px;
}

/* Iframe Paneel */
.iframe-panel {
  position: fixed;
  top: 0;
  right: 0;
  left: 50px; /* Breedte van de gesloten zijbalk */
  height: 100vh;
  background-color: #1D1D1D;
  border-left: 1px solid #6da46b;
  display: flex;
  flex-direction: column;
  z-index: 900;
  box-sizing: border-box;
  overflow: hidden; /* Zorg dat de inhoud niet buiten de container komt */
  transition: left 0.3s ease;
}

body.menu-open .iframe-panel {
  left: 200px; /* Breedte van de geopende zijbalk */
}

/* Tabs in het iframe-paneel */
.iframe-tabs {
  display: flex;
  align-items: center;
  background-color: #292929;
  padding: 0 10px;
  border-bottom: 1px solid #6da46b;
  justify-content: space-between;
}

.iframe-tabs .tabs-list {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
  flex-grow: 1;
  overflow-x: auto;
  align-items: center;
}

.iframe-tabs .iframe-tab {
  padding: 10px 15px;
  margin-right: 5px;
  background-color: #404040;
  border-radius: 3px 3px 0 0;
  cursor: pointer;
  position: relative;
  color: #a5a5a5;
  font-size: 14px;
  transition: background-color 0.3s ease, color 0.3s ease;
  white-space: nowrap;
}

.iframe-tabs .iframe-tab.active {
  background-color: #6da46b;
  color: white;
}

.iframe-tabs .iframe-tab:hover {
  background-color: #606060;
}

.iframe-tabs .iframe-tab .close-tab {
  position: absolute;
  top: 2px;
  right: 5px;
  font-weight: bold;
  cursor: pointer;
  color: #ff5c5c;
}

.iframe-tabs .iframe-tab .close-tab:hover {
  color: #ff1c1c;
}

/* Grid-knoppen */
.grid-buttons {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-right: 10px;
}

.grid-button {
  background-color: #6da46b;
  color: #fff;
  border: none;
  padding: 5px 10px;
  cursor: pointer;
  border-radius: 3px;
  font-size: 14px;
  line-height: 1;
}

.grid-button:hover {
  background-color: #5c945a;
}

/* Plus knop in de iframe-tabs */
.add-interface-button {
  background-color: #6da46b;
  color: #fff;
  border: none;
  padding: 5px 10px;
  cursor: pointer;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  margin-left: 5px;
}

.add-interface-button:hover {
  background-color: #5c945a;
}

/* Iframe container */
.iframe-container {
  display: flex;
  flex-grow: 1;
  position: relative;
  width: 100%; /* Zorg ervoor dat de container de breedte van de ouder vult */
  height: 100%; /* Vul de hoogte van de ouder, als die een hoogte heeft */
  overflow: visible; /* Sta toe dat inhoud buiten de container zichtbaar is */
  box-sizing: border-box;
}

/* Iframe Group */
.iframe-group {
  display: none;
  width: 100%;
  height: 100%;
  position: relative; /* Laat het relatief zijn binnen de container */
}

/* Iframe Item */
.iframe-item {
  position: absolute; /* Zodat ze vrij binnen de container kunnen bewegen */
  width: 400px; /* Startbreedte */
  height: 300px; /* Starthoogte */
  border: 1px solid #6da46b;
  border-radius: 8px;
  overflow: hidden;
  background-color: #2E2E2E; /* Achtergrondkleur voor duidelijkheid tijdens resizen */
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  z-index: 1;
  transition: transform 0.3s ease; /* Voor soepelere animaties */
}

/* Iframe Header */
.iframe-header {
  background-color: #333;
  color: #fff;
  padding: 5px 10px;
  cursor: move; /* Gebruik cursor: move om aan te geven dat dit het handvat is */
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.iframe-header .iframe-title {
  font-size: 14px;
  font-weight: bold;
}

.iframe-header .iframe-controls {
  display: flex;
  gap: 5px;
}

.iframe-controls button {
  background-color: rgba(0,0,0,0.5);
  border: none;
  color: #fff;
  padding: 5px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s ease;
}

.iframe-controls button:hover {
  background-color: rgba(0,0,0,0.7);
}

.iframe-controls .close-iframe {
  font-size: 16px;
  line-height: 1;
}

/* Iframe */
.iframe-item iframe {
  width: 100%;
  height: calc(100% - 30px); /* Verminder de hoogte met de hoogte van de header */
  border: none;
  transition: transform 0.3s ease;
}

.iframe-item .ui-resizable-handle {
  z-index: 1000;
}

/* Maximized iframe binnen de container */
.iframe-item.maximized {
  width: calc(100% - 20px);
  height: calc(100% - 20px);
  top: 10px;
  left: 10px;
  z-index: 999; /* Breng het naar voren */
}

.iframe-item.maximized iframe {
  height: calc(100% - 30px); /* Pas hoogte aan om rekening te houden met de header */
}

/* Resize handles */
.ui-resizable-handle {
  width: 15px; /* Vergroot de breedte */
  height: 15px; /* Vergroot de hoogte */
  background-color: rgba(109, 164, 107, 0.5); /* Semi-transparante accentkleur */
  z-index: 1000; /* Zorg dat de handles boven andere elementen liggen */
}

.ui-resizable-handle:hover {
  background-color: rgba(109, 164, 107, 0.8); /* Iets donkerder bij hover */
}

/* Interface selectie overlay */
.interface-selection-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0,0,0,0.8);
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
}

.interface-selection {
  background-color: #2E2E2E;
  padding: 20px;
  border-radius: 8px;
  position: relative;
  width: 80%;
  max-width: 600px;
  max-height: 80%;
  overflow-y: auto;
}

.interface-selection h3 {
  margin-top: 0;
  color: #fff;
}

.interface-selection .close-selection {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  color: #fff;
  border: none;
  font-size: 18px;
  cursor: pointer;
}

.interface-selection .close-selection:hover {
  color: #ff5c5c;
}

.interfaces-list {
  margin-top: 20px;
}

.interface-category-name {
  font-weight: bold;
  font-size: 16px;
  color: #6da46b; /* Accentkleur voor categorieën */
  margin-top: 20px;
  margin-bottom: 10px;
}

.interface-item {
  padding: 10px;
  background-color: #3A3A3A;
  margin-bottom: 10px;
  cursor: pointer;
  color: #fff;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.interface-item:hover {
  background-color: #505050;
}

/* Content Wrapper */
.content-wrapper {
  width: 90%;
  max-width: 800px;
  margin: 50px auto 0 auto;
  padding: 20px;
  text-align: center;
  background-color: transparent;
}

.logo-wrapper {
  text-align: center;
  margin-top: 50px;
  background-color: transparent;
}

.logo-wrapper img.logo {
  width: 150px;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  background-color: transparent;
}

/* Explain Sectie */
.explain {
  margin-top: 30px;
  line-height: 1.6;
  font-size: 16px;
  background-color: #292929;
  padding: 20px;
  border-radius: 10px;
}

.explain img {
  margin: 0 10px;
  width: 16px;
  height: 16px;
}

/* Aankondigingssectie */
.announcement {
  margin-top: 30px;
  line-height: 1.6;
  font-size: 16px;
  background-color: #3A3A3A;
  padding: 20px;
  border-radius: 10px;
  color: #ffffff;
}

.announcement h2 {
  font-size: 24px;
  margin-bottom: 15px;
  color: #6da46b; /* Optioneel: Een accentkleur voor de titel */
}

.announcement ul {
  list-style: disc inside;
  padding-left: 0;
  text-align: left;
}

.announcement li {
  margin-bottom: 10px;
}

.announcement li strong {
  color: #6da46b; /* Optioneel: Accentueer de titels van de updates */
}

/* Products Titel */
.products-title {
  margin: 40px 0 20px;
  color: #929292;
  font-weight: 300;
  font-size: 28px;
}

/* Products Sectie */
.products {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  max-width: 1000px;
  margin: 0 auto;
  background-color: transparent;
}

.product {
  position: relative;
  flex: 1 1 200px;
  text-align: center;
  color: white;
  opacity: 0.9;
  padding: 20px;
  transition: opacity 0.3s ease;
  background-color: #3A3A3A;
  border-radius: 10px;
}

.product:hover {
  opacity: 1;
}

.product img {
  width: 70px;
  filter: grayscale(100%);
  transition: filter 0.3s ease;
  background-color: transparent;
  position: relative;
  top: 50px;
}

.product:hover img {
  filter: grayscale(0%);
}

.product span {
  display: block;
  margin-top: 15px;
  font-weight: 300;
  font-size: 14px;
  top: 40px;
  position: relative;
}

.product a {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

/* Responsiviteit */
@media (max-width: 1200px) {
  body.menu-open .iframe-panel {
    left: 200px;
  }
}

@media (max-width: 800px) {
  body.menu-open .iframe-panel {
    left: 200px;
  }
}

@media (max-width: 768px) {
  .iframe-item {
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  main#main-content {
    margin-left: 50px;
    padding: 10px;
  }

  body.menu-open main#main-content {
    margin-left: 200px;
  }

  .content-wrapper {
    margin: 30px auto 0 auto;
  }

  .logo-wrapper img.logo {
    width: 120px;
  }

  .explain {
    font-size: 14px;
  }

  .announcement {
    font-size: 14px;
    padding: 15px;
  }

  .announcement h2 {
    font-size: 20px;
  }

  .products-title {
    font-size: 24px;
  }

  .products {
    flex-direction: column;
    gap: 20px;
  }

  .product {
    flex: none;
    width: 100%;
  }

  .product img {
    width: 50px;
    height: 50px;
    position: relative;
    top: 50px;
  }

  .product span {
    font-size: 12px;
  }
}

.iframe-controls .open-in-window {
  font-size: 16px;
  line-height: 1;
  background-color: rgba(0,0,0,0.5);
  border: none;
  color: #fff;
  padding: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.iframe-controls .open-in-window:hover {
  background-color: rgba(0,0,0,0.7);
}

/* Iframe Controls Styling */
.iframe-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.iframe-controls button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 4px;
    background-color: rgba(109, 164, 107, 0.2);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.iframe-controls button:hover {
    background-color: rgba(109, 164, 107, 0.4);
    transform: scale(1.05);
}

/* Specifieke icoonstijlen */
.iframe-controls .close-iframe {
    background-color: rgba(255, 92, 92, 0.2);
}

.iframe-controls .close-iframe:hover {
    background-color: rgba(255, 92, 92, 0.4);
}

.iframe-controls .fullscreen {
    font-size: 14px;
}

.iframe-controls .zoom-in,
.iframe-controls .zoom-out {
    font-weight: bold;
}

.iframe-controls .open-in-window {
    position: relative;
}

/* Tooltip voor knoppen */
.iframe-controls button::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.iframe-controls button:hover::before {
    opacity: 1;
    visibility: visible;
}