/*
 * MV Taal switcher - Styling
 * Auteur: Wessel Paans - Monkey Vision
 * https://www.monkeyvision.nl
 */

.mv-taal-switcher {
  position: relative;
  width: 120px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  user-select: none;
  padding-left: 0;
  z-index: 1000;
}

.mv-taal-switcher .lang-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #fff;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 1001;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.mv-taal-switcher .lang-toggle:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-color: #017761;
}

.mv-taal-switcher .lang-toggle .flag-svg {
  width: 20px;
  height: 15px;
  margin-right: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mv-taal-switcher .lang-toggle .flag-svg svg {
  width: 100%;
  height: 100%;
  border-radius: 2px;
  display: block;
}

.mv-taal-switcher .lang-toggle span {
  flex: 1;
  font-weight: 600;
  font-size: 14px;
  color: #333;
  line-height: 15px;
  display: flex;
  align-items: center;
}

.mv-taal-switcher .lang-toggle .icon-angle-down {
  color: #017761;
  transition: transform 0.2s ease;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 6px solid currentColor;
  margin-left: 8px;
  flex-shrink: 0;
}

.mv-taal-switcher.show-menu .icon-angle-down {
  transform: rotate(180deg);
}

.mv-taal-switcher .lang-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  margin: 0;
  padding: 8px 0 0 0;
  width: 100%;
  list-style: none;
  z-index: 1000;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e1e1e1;
}

.mv-taal-switcher .lang-menu li {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: all 0.2s ease;
  background-color: #fff;
  position: relative;
}

.mv-taal-switcher .lang-menu li:last-child {
  border-bottom: none;
}

.mv-taal-switcher .lang-menu li:hover {
  background: #f8f8f8;
  color: #017761;
}

.mv-taal-switcher .lang-menu li .flag-svg {
  width: 20px;
  height: 15px;
  margin-right: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mv-taal-switcher .lang-menu li .flag-svg svg {
  width: 100%;
  height: 100%;
  border-radius: 2px;
  display: block;
  vertical-align: middle;
}

.mv-taal-switcher .lang-menu li span {
  flex: 1;
  font-weight: 500;
  font-size: 14px;
  line-height: 15px;
  display: flex;
  align-items: center;
}

.mv-taal-switcher .lang-menu li .checkmark {
  font-size: 14px;
  color: #017761;
  display: none;
  margin-left: auto;
  flex-shrink: 0;
}

.mv-taal-switcher .lang-menu li.active .checkmark {
  display: inline-block;
}

.mv-taal-switcher .lang-menu li.active {
  background-color: #f0f8f6;
  color: #017761;
  font-weight: 600;
}

.mv-taal-switcher.show-menu .lang-menu {
  display: block !important;
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Desktop hover functionaliteit */
@media (min-width: 1025px) {
  .mv-taal-switcher.desktop-only::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 8px;
    background: transparent;
    z-index: 999;
  }
  
  .mv-taal-switcher.desktop-only:hover .lang-menu,
  .mv-taal-switcher.desktop-only:hover::after {
    display: block;
  }
  
  .mv-taal-switcher.desktop-only:hover .icon-angle-down {
    transform: rotate(180deg);
  }
  
  .mv-taal-switcher.mobile-only {
    display: none;
  }
}

/* Mobiele styling */
@media (max-width: 1024px) {
  .mv-taal-switcher.desktop-only {
    display: none;
  }
  
  .mv-taal-switcher.mobile-only {
    display: block;
    position: relative;
  }
  
  /* Mobile select wrapper */
  .mv-taal-switcher.mobile-only .mobile-select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    padding: 10px 14px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
  }
  
  .mv-taal-switcher.mobile-only .mobile-select-wrapper:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: #017761;
  }
  
  /* Mobile flag display */
  .mv-taal-switcher.mobile-only .mobile-flag-display {
    display: flex;
    align-items: center;
    pointer-events: none;
    position: relative;
    z-index: 2;
  }
  
  .mv-taal-switcher.mobile-only .mobile-flag-display .flag-svg {
    width: 20px;
    height: 15px;
    margin-right: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .mv-taal-switcher.mobile-only .mobile-flag-display .flag-svg svg {
    width: 100%;
    height: 100%;
    border-radius: 2px;
    display: block;
  }
  
  .mv-taal-switcher.mobile-only .mobile-flag-display span {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    line-height: 15px;
  }
  
  /* Native select - invisible overlay */
  .mv-taal-switcher.mobile-only .mobile-lang-select {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    border: none;
    background: transparent;
    font-size: 16px; /* Prevent zoom on iOS */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    z-index: 3;
  }
  
  /* Chevron indicator */
  .mv-taal-switcher.mobile-only .mobile-select-wrapper::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 6px solid #017761;
    pointer-events: none;
    z-index: 1;
  }
}

/* Toegankelijkheid verbeteringen */
.mv-taal-switcher .lang-toggle:focus {
  outline: 2px solid #017761;
  outline-offset: 2px;
}

.mv-taal-switcher .lang-menu li:focus {
  outline: 2px solid #017761;
  outline-offset: -2px;
}

/* Animaties */
.mv-taal-switcher .lang-menu {
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.mv-taal-switcher.show-menu .lang-menu {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 1025px) {
  .mv-taal-switcher.desktop-only:hover .lang-menu {
    opacity: 1;
    transform: translateY(0);
  }
} 