@import "login-fonts.css";

:root {
  --brand-50:  #eef4ff;
  --brand-300: #90b2ff;
  --brand-400: #5d87fb;
  --brand-500: #3a62f0;
  --brand-ink: #16224d;
  --warm-500: #fb8333;
  --ink-700: #3a3f52;
  --line: #e8eaf0;
  --r-pill: 999px;
  --sh-md: 0 4px 12px rgba(22,34,77,.08), 0 2px 4px rgba(22,34,77,.04);
  --font: "Inter", "Noto Sans TC", -apple-system, system-ui, "PingFang TC", "Microsoft JhengHei", sans-serif;
}

/* Reset legacy teleteach header wrapper */
.teleteach header.header,
.teleteach .header {
  background: none !important;
  padding: 0 !important;
  box-shadow: none !important;
  border: none !important;
}

.fp-header {
  background: linear-gradient(180deg, var(--brand-ink) 0%, #1c2a5e 100%);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 0 rgba(255,255,255,.04), var(--sh-md);
  font-family: var(--font);
}

.fp-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 64px;
}

.fp-header__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.fp-header__logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.fp-header__logo img {
  height: 32px;
  width: auto;
  display: block;
}

.fp-header__logo-text {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.03em;
  color: #fff;
}

.fp-header__logo-text span {
  color: #ff9a52;
}

.fp-header__search-wrap {
  position: relative;
  flex: 1;
  max-width: 360px;
  margin-left: 6px;
}

.fp-header__search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,.6);
  pointer-events: none;
}

.fp-search {
  width: 100%;
  padding: 9px 16px 9px 40px;
  font-size: 14px;
  font-family: var(--font);
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--r-pill);
  color: #fff;
  transition: all .2s;
}

.fp-search::placeholder {
  color: rgba(255,255,255,.6);
}

.fp-search:focus {
  background: rgba(255,255,255,.2);
  border-color: rgba(255,255,255,.4);
  outline: none;
}

.fp-header__nav-links {
  display: flex;
  gap: 4px;
}

.fp-header__nav-links a {
  color: rgba(255,255,255,.82);
  font-weight: 600;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  transition: all .18s ease;
  text-decoration: none;
}

.fp-header__nav-links a:hover,
.fp-header__nav-links a.active {
  background: rgba(255,255,255,.16);
  color: #fff;
}

.fp-header__nav-links .nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fp-header__nav-links .nav li {
  list-style: none;
}

.fp-header__pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.16);
  color: #fff !important;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  transition: all .18s;
}

.fp-header__pill-btn:hover {
  background: rgba(255,255,255,.22);
  color: #fff !important;
}

.fp-header__lang .dropdown-toggle {
  color: rgba(255,255,255,.85);
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
}

.fp-header__guest-actions {
  display: flex;
  gap: 8px;
}

.user-manage-dropdown li.active > a {
  background: var(--brand-50) !important;
  color: var(--brand-500) !important;
  font-weight: 600 !important;
}

.fp-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.fp-header__actions .user-manage-li .btn,
.fp-header__actions .user-manage-li button {
  background: rgba(255,255,255,.14) !important;
  border: 1px solid rgba(255,255,255,.16) !important;
  color: #fff !important;
  border-radius: var(--r-pill) !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  padding: 8px 14px !important;
  min-width: auto !important;
  height: auto !important;
}

.fp-header__actions .user-manage-li .btn:hover,
.fp-header__actions .user-manage-li button:hover {
  background: rgba(255,255,255,.22) !important;
}

.fp-header__actions .user-manage-li .btn a,
.fp-header__actions .user-manage-li .user-manage-toggle {
  color: #fff !important;
}

.fp-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--r-pill);
  display: grid;
  place-items: center;
  color: rgba(255,255,255,.85);
  cursor: pointer;
  transition: .16s;
  position: relative;
  border: none;
  background: transparent;
  padding: 0;
}

.fp-icon-btn:hover {
  background: rgba(255,255,255,.14);
  color: #fff;
}

.fp-icon-btn .inform-dropdown-toggle {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.fp-icon-btn svg {
  display: block;
}

.fp-icon-btn .inform-dropdown-toggle__num {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--warm-500);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  display: grid;
  place-items: center;
  border: 2px solid var(--brand-ink);
  color: #fff;
  line-height: 1;
}

.fp-user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}

.fp-user-chip .user-avatar-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: #fff;
}

.fp-user-chip .avatar-ring,
.fp-user-chip .fp-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(144,178,255,.45);
}

.fp-user-chip .fp-username {
  font-weight: 600;
  font-size: 14px;
  color: #fff;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fp-header .dropdown-toggle.nav-hover {
  color: rgba(255,255,255,.85);
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
}

.fp-header .dropdown-toggle.nav-hover:hover {
  color: #fff;
}

.fp-header .navbar-more {
  color: rgba(255,255,255,.85) !important;
}

.fp-header__guest-actions .btn-guest {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  transition: all .18s;
}

.fp-header__guest-actions .btn-guest--primary {
  background: #3a62f0;
  color: #fff;
  box-shadow: 0 8px 24px rgba(58,98,240,.28);
}

.fp-header__guest-actions .btn-guest--ghost {
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.16);
  color: #fff;
}

.fp-header .inform-dropdown,
.fp-header .user-dropdown,
.fp-header .dropdown-menu {
  color: var(--ink-700);
}

@media (max-width: 991px) {
  .fp-header__search-wrap {
    display: none;
  }

  .fp-user-chip .fp-username {
    display: none;
  }

  .fp-header__nav-links {
    display: none;
  }
}

@media (max-width: 767px) {
  .fp-header__inner {
    padding: 0 16px;
    gap: 12px;
  }
}
