/*
 * Portal Pendidikan v159 — identitas logo full horizontal per portal.
 * Semua area merek memakai gambar wordmark lengkap tanpa teks HTML ganda.
 */

html[data-portal-brand] img.portal-role-logo {
  display: block;
  border: 0 !important;
  background: transparent !important;
}

html[data-portal-brand] img.portal-role-logo--wordmark,
html[data-portal-brand] img.portal-role-logo--icon {
  width: min(245px, 100%) !important;
  height: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  max-height: 64px !important;
  aspect-ratio: auto !important;
  border-radius: 0 !important;
  object-fit: contain !important;
  object-position: left center !important;
  box-shadow: none !important;
  flex: 0 1 auto !important;
}

html[data-portal-brand] .portal-role-brand-copy--hidden {
  display: none !important;
}

html[data-portal-brand="siswa"] img.portal-role-login-logo--full,
html[data-portal-brand="guru"] img.portal-role-login-logo--full {
  display: block !important;
  width: min(340px, 82vw) !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: 100% !important;
  max-height: 78px !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  object-position: center !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
}

html[data-portal-brand="guru"] .portal-role-login-logo-frame--full {
  display: flex !important;
  width: min(340px, 82vw) !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: 100% !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  padding: 0 !important;
  margin-inline: auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
  align-items: center !important;
  justify-content: center !important;
}

html[data-portal-brand="guru"]
  .portal-role-login-logo-frame--full
  > img.portal-role-login-logo--full {
  width: 100% !important;
  margin: 0 !important;
}

html[data-portal-brand] .auth-brand > div,
html[data-portal-brand] .login-head > div,
html[data-portal-brand] :is(.brand, .unified-brand) > b,
html[data-portal-brand] :is(.brand, .unified-brand) > div > b {
  display: none !important;
}

html[data-portal-brand]
  :is(
    .portal-role-brand-lockup--explicit,
    .portal-role-brand-lockup--brand,
    .portal-role-brand-lockup--auth,
    .portal-role-brand-lockup--react,
    .portal-role-brand-lockup--generic,
    .portal-role-brand-lockup--standalone
  ) {
  min-width: 0;
}

html[data-portal-brand] .portal-role-brand-lockup--auth {
  width: 100%;
  justify-content: center;
}

html[data-portal-brand]
  .portal-role-brand-lockup--auth
  > img.portal-role-logo--wordmark {
  width: min(350px, 86vw) !important;
  max-height: 78px !important;
  margin-inline: auto !important;
  object-position: center !important;
}

html[data-portal-brand] .portal-role-brand-lockup--auth > div {
  display: none !important;
}

html[data-portal-brand]
  [data-portal-brand-lockup="auth"]
  > img.portal-role-logo--wordmark {
  width: min(350px, 86vw) !important;
  max-height: 78px !important;
  margin-inline: auto !important;
  object-position: center !important;
}

html[data-portal-brand]
  :is(.brand, .unified-brand).portal-role-brand-lockup--brand,
html[data-portal-brand]
  :is(.brand, .unified-brand)[data-portal-brand-lockup="brand"] {
  width: 100%;
  min-width: 0;
  justify-content: flex-start;
}

html[data-portal-brand]
  .unified-brand:is(
    .portal-role-brand-lockup--brand,
    [data-portal-brand-lockup="brand"]
  ) {
  display: flex !important;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px !important;
}

html[data-portal-brand]
  .unified-brand:is(
    .portal-role-brand-lockup--brand,
    [data-portal-brand-lockup="brand"]
  )
  > small {
  padding-inline-start: 2px;
}

html[data-portal-brand] .portal-role-brand-lockup--brand > b,
html[data-portal-brand] .portal-role-brand-lockup--brand > div > b,
html[data-portal-brand] [data-portal-brand-lockup="brand"] > b,
html[data-portal-brand] [data-portal-brand-lockup="brand"] > div > b {
  display: none !important;
}

html[data-portal-brand]
  .portal-role-brand-lockup--brand
  > img.portal-role-logo--wordmark {
  width: min(210px, 100%) !important;
  max-height: 54px !important;
  flex: 0 1 210px !important;
}

html[data-portal-brand]
  [data-portal-brand-lockup="brand"]
  > img.portal-role-logo--wordmark {
  width: min(210px, 100%) !important;
  max-height: 54px !important;
  flex: 0 1 210px !important;
}

html[data-portal-brand] .portal-role-brand-lockup--react > h1,
html[data-portal-brand] .portal-role-brand-lockup--react > h2,
html[data-portal-brand] .portal-role-brand-lockup--generic > h1,
html[data-portal-brand] .portal-role-brand-lockup--generic > h2,
html[data-portal-brand] .portal-role-brand-lockup--generic > b,
html[data-portal-brand] .portal-role-brand-lockup--generic > strong {
  display: none !important;
}

html[data-portal-brand]
  :is(
    .portal-role-brand-lockup--react,
    .portal-role-brand-lockup--generic,
    .portal-role-brand-lockup--standalone
  )
  > img.portal-role-logo--wordmark {
  width: min(230px, 66vw) !important;
  max-height: 58px !important;
  margin-block: 0 !important;
}

html[data-portal-brand]
  header.portal-role-brand-lockup--react
  > img.portal-role-logo--wordmark {
  width: min(250px, 72vw) !important;
  max-height: 62px !important;
  margin-inline: auto !important;
}

html[data-portal-brand="guru"]
  .portal-role-brand-lockup--guru-login
  img.portal-role-logo--wordmark {
  width: min(350px, 84vw) !important;
  height: auto !important;
  max-height: 78px !important;
  margin-inline: auto !important;
  object-fit: contain !important;
  object-position: center !important;
}

@media (max-width: 767px) {
  html[data-portal-brand="siswa"] img.portal-role-login-logo--full,
  html[data-portal-brand="guru"] .portal-role-login-logo-frame--full {
    width: min(320px, 84vw) !important;
  }

  html[data-portal-brand]
    :is(
      .portal-role-brand-lockup--react,
      .portal-role-brand-lockup--generic,
      .portal-role-brand-lockup--standalone
    )
    > img.portal-role-logo--wordmark {
    width: min(205px, 58vw) !important;
    max-height: 52px !important;
  }

  html[data-portal-brand]
    header.portal-role-brand-lockup--react
    > img.portal-role-logo--wordmark {
    width: min(205px, 58vw) !important;
    max-height: 52px !important;
  }

  html[data-portal-brand="guru"]
    .portal-role-brand-lockup--guru-login
    img.portal-role-logo--wordmark {
    width: min(325px, 84vw) !important;
    max-height: 72px !important;
  }
}
