/* Yourcloudweb Portal 1.1.4 RC5: isolated header correction. RC3 remains loaded above. */
body.ycw-portal section#header.ycw-modern-header {
  min-height: 64px !important;
  height: auto !important;
  background: #fff !important;
  border-bottom: 1px solid #e9edf3 !important;
  box-shadow: none !important;
  position: relative;
  z-index: 20;
}
body.ycw-portal section#header.ycw-modern-header > .ycw-topbar-shell {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 18px !important;
  min-width: 0 !important;
  width: 100% !important;
  max-width: none !important;
  min-height: 64px !important;
  height: 64px !important;
  margin: 0 !important;
  padding: 0 24px !important;
}
body.ycw-portal .ycw-modern-header .ycw-topbar-left {
  display: flex !important;
  flex: 1 1 auto;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  min-width: 0;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
}
body.ycw-portal .ycw-modern-header .ycw-topbar-title {
  display: block !important;
  flex: 0 1 auto;
  overflow: hidden;
  max-width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  color: #152443 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.4;
  white-space: nowrap;
  text-align: left !important;
  text-overflow: ellipsis;
}
body.ycw-portal .ycw-modern-header .ycw-topbar-right {
  display: flex !important;
  flex: 0 1 auto;
  align-items: center;
  justify-content: flex-end !important;
  gap: 9px;
  min-width: 0;
  margin: 0 0 0 auto !important;
  padding: 0 !important;
  float: none !important;
}
body.ycw-portal .ycw-modern-header .ycw-header-search {
  flex: 0 1 270px;
  width: clamp(165px, 21vw, 270px) !important;
  min-width: 0;
  margin: 0 7px 0 0 !important;
}
body.ycw-portal .ycw-modern-header .ycw-header-search .home-kb-search {
  position: relative;
  width: 100% !important;
  min-width: 0 !important;
  height: 38px;
}
body.ycw-portal .ycw-modern-header .ycw-header-search .form-control {
  width: 100% !important;
  height: 38px !important;
  min-height: 38px !important;
  margin: 0 !important;
  padding: 9px 53px 9px 35px !important;
  color: #152443 !important;
  background: #f8fafc !important;
  border: 1px solid #e7ecf3 !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  font-size: 12px !important;
}
body.ycw-portal .ycw-modern-header .ycw-header-search .home-kb-search i {
  position: absolute !important;
  top: 50% !important;
  right: auto !important;
  left: 12px !important;
  z-index: 1;
  margin: 0 !important;
  font-size: 12px;
  color: #8695aa !important;
  transform: translateY(-50%) !important;
  pointer-events: none;
}
body.ycw-portal .ycw-modern-header .ycw-header-kbd {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  padding: 3px 5px;
  font-size: 9px;
  line-height: 1;
  color: #8695aa;
  background: #eef2f7;
  border-radius: 4px;
  pointer-events: none;
}
body.ycw-portal .ycw-modern-header .ycw-header-icon-button,
body.ycw-portal .ycw-modern-header .ycw-header-lang-button {
  position: relative;
  display: inline-flex !important;
  flex: 0 0 38px;
  align-items: center;
  justify-content: center;
  width: 38px !important;
  min-width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #233554 !important;
  background: #f8fafc !important;
  border: 1px solid #ecf0f5 !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  font-size: 14px !important;
  line-height: 1;
  text-decoration: none !important;
  cursor: pointer;
}
body.ycw-portal .ycw-modern-header .ycw-header-lang-button {
  font-family: inherit;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
}
body.ycw-portal .ycw-modern-header .ycw-header-icon-button:hover,
body.ycw-portal .ycw-modern-header .ycw-header-lang-button:hover {
  background: #fff4eb !important;
  border-color: #ffd6bd !important;
  color: #ff5900 !important;
}
body.ycw-portal .ycw-modern-header .ycw-header-notifications,
body.ycw-portal .ycw-modern-header .ycw-header-language {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  min-width: 0;
}
body.ycw-portal .ycw-modern-header .ycw-header-alert-dot {
  position: absolute !important;
  top: 6px !important;
  right: 7px !important;
  display: block !important;
  width: 9px !important;
  height: 9px !important;
  min-width: 9px !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #e84252 !important;
  border: 2px solid #f8fafc !important;
  border-radius: 50% !important;
  box-sizing: border-box !important;
  pointer-events: none;
}
body.ycw-portal .ycw-modern-header .ycw-header-account {
  display: inline-flex !important;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  margin: 0 !important;
  padding: 0 !important;
  text-decoration: none !important;
  color: #152443 !important;
}
body.ycw-portal .ycw-modern-header .ycw-header-avatar {
  position: relative;
  display: inline-flex;
  flex: 0 0 38px;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  overflow: hidden;
  background: #ff5900;
  color: #fff;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .02em;
}
body.ycw-portal .ycw-modern-header .ycw-header-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #fff;
}
body.ycw-portal .ycw-modern-header .ycw-header-avatar.ycw-header-guest {
  background: #f8fafc;
  color: #152443;
  border: 1px solid #ecf0f5;
}
body.ycw-portal .ycw-modern-header .ycw-avatar-remote {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none;
  object-fit: cover;
}
body.ycw-portal .ycw-modern-header .ycw-avatar-remote.ycw-avatar-loaded {
  display: block;
}
body.ycw-portal .ycw-modern-header .ycw-header-account-label {
  max-width: 110px;
  overflow: hidden;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}
body.ycw-portal .ycw-modern-header .ycw-topbar-brand {
  display: none !important;
}
body.ycw-portal .ycw-modern-header .ycw-mobile-nav-toggle {
  display: none;
}
@media (max-width: 1270px) {
  body.ycw-portal .ycw-modern-header .ycw-header-account-label { display: none; }
  body.ycw-portal .ycw-modern-header .ycw-header-search { width: clamp(140px, 19vw, 240px) !important; }
}
@media (max-width: 1050px) {
  body.ycw-portal section#header.ycw-modern-header > .ycw-topbar-shell { padding: 0 18px !important; }
  body.ycw-portal .ycw-modern-header .ycw-topbar-left { flex: 1 1 0; }
  body.ycw-portal .ycw-modern-header .ycw-mobile-nav-toggle { display: inline-flex; flex: 0 0 38px; width: 38px; height: 38px; }
  body.ycw-portal .ycw-modern-header .ycw-topbar-brand { display: inline-flex !important; flex: 0 0 auto; }
  body.ycw-portal .ycw-modern-header .ycw-topbar-brand img { width: 29px; height: 29px; object-fit: contain; }
  body.ycw-portal .ycw-modern-header .ycw-topbar-brand-text { display: none; }
  body.ycw-portal .ycw-modern-header .ycw-header-search { width: min(210px, 25vw) !important; }
}
@media (max-width: 750px) {
  body.ycw-portal section#header.ycw-modern-header > .ycw-topbar-shell { gap: 10px !important; }
  body.ycw-portal .ycw-modern-header .ycw-topbar-title { display: none !important; }
  body.ycw-portal .ycw-modern-header .ycw-header-search { width: min(200px, 31vw) !important; margin-right: 0 !important; }
  body.ycw-portal .ycw-modern-header .ycw-header-settings,
  body.ycw-portal .ycw-modern-header .ycw-header-language { display: none !important; }
}
@media (max-width: 470px) {
  body.ycw-portal section#header.ycw-modern-header > .ycw-topbar-shell { gap: 8px !important; padding: 0 12px !important; }
  body.ycw-portal .ycw-modern-header .ycw-topbar-left { gap: 6px; }
  body.ycw-portal .ycw-modern-header .ycw-topbar-brand { display: none !important; }
  body.ycw-portal .ycw-modern-header .ycw-topbar-right { gap: 6px; }
  body.ycw-portal .ycw-modern-header .ycw-header-search { width: min(172px, 37vw) !important; }
  body.ycw-portal .ycw-modern-header .ycw-header-kbd { display: none; }
  body.ycw-portal .ycw-modern-header .ycw-header-search .form-control { padding-right: 8px !important; }
  body.ycw-portal .ycw-modern-header .ycw-header-icon-button { width: 36px !important; min-width: 36px !important; }
  body.ycw-portal .ycw-modern-header .ycw-header-avatar { width: 36px; height: 36px; flex-basis: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  body.ycw-portal .ycw-modern-header :is(a, button, input) { transition: none !important; }
}

/* Legacy portal styles hide header-search-frame below 620px.
   RC5 keeps search available for mobile users too. */
body.ycw-portal .ycw-modern-header form.header-search-frame.ycw-header-search {
  display: flex !important;
  align-items: center;
}
