/* Header language dropdown (flag only when closed) */
/* Keep the authenticated header controls on the same vertical center line. */
@media (min-width: 993px) {
  body.isp-dashboard-page #navbar .menu,
  body.isp-work-page #navbar .menu {
    display: flex !important;
    align-items: center !important;
    height: 40px !important;
    margin: 0 !important;
  }

  body.isp-dashboard-page #nav_email,
  body.isp-work-page #nav_email {
    display: inline-flex !important;
    align-items: center !important;
    height: 40px !important;
    box-sizing: border-box;
    line-height: 1 !important;
    position: relative;
    top: -1px !important;
  }

  body.isp-dashboard-page #navbar .isp-nav-email-item,
  body.isp-work-page #navbar .isp-nav-email-item {
    display: inline-flex !important;
    align-items: center !important;
    height: 40px !important;
  }

  body.isp-dashboard-page #navbar .menu > .menu-item:has(> #nav_email),
  body.isp-work-page #navbar .menu > .menu-item:has(> #nav_email) {
    display: inline-flex !important;
    align-items: center !important;
    height: 40px !important;
  }

  body.isp-dashboard-page #navbar .isp-chat-menu-item,
  body.isp-work-page #navbar .isp-chat-menu-item {
    display: inline-flex !important;
    align-items: center !important;
    height: 40px !important;
  }

  body.isp-dashboard-page #navbar .isp-chat-open .material-symbols-outlined,
  body.isp-work-page #navbar .isp-chat-open .material-symbols-outlined {
    display: block;
    line-height: 1 !important;
    transform: translateY(1px);
  }
}

.isp-header-lang {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 40px;
}
.isp-header-lang-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: background 0.15s ease;
}
.isp-header-lang-toggle:hover {
  background: rgba(255, 255, 255, 0.16);
}
.isp-header-lang-flag {
  width: 18px;
  height: 13px;
  object-fit: cover;
  border-radius: 2px;
  display: block;
}
.isp-header-lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 168px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
  z-index: 3000;
}
.isp-header-lang-menu li {
  margin: 0;
  padding: 0;
}
.isp-header-lang-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #0f172a;
  font: 500 13px/1.2 Inter, system-ui, sans-serif;
  text-align: left;
  cursor: pointer;
}
.isp-header-lang-menu button:hover,
.isp-header-lang-menu button.is-active {
  background: #f1f5f9;
}
.isp-header-lang-menu button img {
  width: 18px;
  height: 13px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
}

/* Login page language + password eye */
.auth-login-lang-wrap {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--auth-shell-border, #e2e8f0);
}

.auth-login-lang-label {
  text-align: center;
  margin-bottom: 0.65rem;
}

.auth-login-lang {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.auth-login-lang button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--auth-shell-border, #e2e8f0);
  border-radius: 0.65rem;
  background: var(--auth-shell-input-bg, #f8fafc);
  color: #334155;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-login-lang button.is-active {
  border-color: var(--auth-shell-accent, #6366f1);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.auth-login-lang button img {
  width: 20px;
  height: 14px;
  border-radius: 2px;
  object-fit: cover;
}

.auth-pass-inputgroup {
  position: relative;
  display: block;
  width: 100%;
}

.auth-pass-inputgroup .form-control {
  display: block;
  width: 100%;
  padding-right: 2.75rem !important;
  border-radius: 0.65rem !important;
}

.auth-pass-inputgroup:focus-within .form-control {
  border-color: var(--auth-shell-accent, #6366f1);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.auth-pass-inputgroup .input-group-text {
  display: none !important;
}

.auth-pass-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  z-index: 2;
  border: 0;
  background: transparent;
  padding: 0;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.auth-pass-toggle.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.auth-pass-toggle:hover {
  color: #334155;
}

.auth-pass-toggle .mdi {
  font-size: 1.15rem;
  line-height: 1;
}

/* Hide native browser password reveal (avoid duplicate eye icons) */
.auth-pass-inputgroup input[type='password']::-ms-reveal,
.auth-pass-inputgroup input[type='password']::-ms-clear,
.auth-pass-inputgroup input[type='text']::-ms-reveal,
.auth-pass-inputgroup input[type='text']::-ms-clear {
  display: none;
}

.auth-pass-inputgroup input[type='password']::-webkit-credentials-auto-fill-button,
.auth-pass-inputgroup input[type='text']::-webkit-credentials-auto-fill-button {
  visibility: hidden;
  pointer-events: none;
  position: absolute;
  right: 0;
  display: none !important;
}

.auth-pass-inputgroup input[type='password'] {
  -webkit-appearance: none;
  appearance: none;
}
