/* the "added in" info on all APIs */
.api-level {
  float: right;
  font-size: smaller;
  margin-top: -40px;
}

/* the "added in" block at the top of the page */
#api-info-block .api-level {
  margin-top: 0;
}

/* The metadata block at the top of the page */
#metadata-info-block {
  float: right;
  font-size: smaller;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

@media screen and (max-width: 1000px) {
  .api-level {
    float: none;
    margin-top: 0;
  }
  #api-info-block .api-level {
    margin-bottom: 20px;
  }
}

.api-level a,
.api-level a:active,
.api-level a:visited {
  color: #222;
}

.api-level a:hover {
  color: #888;
}

/* This element is obsolete now that devsite provides TOC */
#api-info-block .sum-details-links {
  display: none;
}


/* The table that shows this class's inheritance tree */

.jd-inheritance-table tr,
.jd-inheritance-table tr td {
  background-color: transparent;
  border: none;
  margin: 0;
  padding: 0;
}

.jd-inheritance-table .jd-inheritance-space {
  width: 2em;
}

/* The devsite expandable widget */

.expand-control:not(button):not(.button) {
  color: inherit;
  cursor: pointer;
  padding-left: 24px;
  position: relative;
}

.expand-control::before {
  background: url(/images/styles/disclosure_down.png) no-repeat center center;
  background-size: 34px 34px;
  color: transparent;
  content: '';
  display: block;
  height: 20px;
  left: 0;
  position: absolute;
  width: 20px;
}

.expand-control.exw-expanded::before {
  background: url(/images/styles/disclosure_up.png) no-repeat center center;
}

/* Known subclasses list */

.jd-sumtable-subclasses #subclasses-direct,
.jd-sumtable-subclasses #subclasses-indirect {
  /* left margin matches width of the toggle image,
     so this section aligns with the text above */
  margin: 0 0 0 24px;
}

.jd-sumtable-subclasses .expand-control.exw-expanded + .showalways {
  /* Hide the comma list when expanded to show the table */
  display: none;
}

.jd-sumtable-subclasses tr,
.jd-sumtable-subclasses td {
  background-color: transparent;
  border: none;
  margin: 0;
  padding: 0;
}

#subclasses-direct-summary,
#subclasses-indirect-summary {
  padding-left: 24px;
}

.jd-sumtable-expando td {
  border: solid 1px #ddd;
  padding: 4px;
}

.jd-inherited-apis .exw-expanded-content {
  /* Force override for some lengthy devsite style selectors */
  padding-left: 24px !important;
  margin-top: 12px !important;
}


/* Styles for legacy doclava HTML that uses custom expando.
 * The list of direct/indirect subclasses does not expand at all,
 * and the list of inherited members/methods is expanded by default. */

.jd-sumtable-subclasses #subclasses-direct-list,
.jd-sumtable-subclasses #subclasses-indirect-list {
  /* Force line-wraps for CSVs with no spaces */
  word-break: break-word;
}

:not(devsite-expandable) > #subclasses-direct-summary,
:not(devsite-expandable) > #subclasses-indirect-summary {
  display: none !important;
}

.jd-sumtable #subclasses-direct.jd-expando-trigger,
.jd-sumtable #subclasses-indirect.jd-expando-trigger{
  margin: 0;
}


/* Force the broken legacy expandos into something that looks WAI */

.jd-expando-trigger {
  display: inline-block;
  height: 0;
  margin: 0;
  padding-top: 10px;
  width: 24px;
}

.jd-expando-trigger img {
  /* display: none; */
  height: inherit;
}

.jd-expando-trigger ~ div > div {
  display: block !important; /* Force all inline-hidden divs to appear */
}

table.responsive td td:first-child,
table.responsive td tr:last-child td,
table.responsive td tr:first-child td{
  padding: 7px 8px 8px;
}

.data-reference-resources-wrapper {
  display: none;
}

#lattrs td:first-child,
.inhtable td:first-child {
  white-space: nowrap;
}

#lattrs td+td,
.inhtable td+td {
  white-space: normal;
}


/* Styles to highlight the preview APIs.

   These must be updated with each letter-appropriate preview. */

/* Style headings to gold preview color */
#jd-content:not(.devsite-future-version) .apilevel-UpsideDownCake:not(.devsite-future-version) h3,
#jd-content:not(.devsite-future-version) [data-version-added="UpsideDownCake"]:not(.devsite-future-version) h3,
[data-version-added="UpsideDownCake"] .api-title,
.apilevel-UpsideDownCake h3 {
  color: #f5ba15;
}

/* Style "Added in ___" links to gold preview color */
#jd-content:not(.devsite-future-version) .apilevel-UpsideDownCake:not(.devsite-future-version) .api-level a,
body.apilevel-UpsideDownCake #api-info-block .api-level a,
#jd-content[data-version-added="UpsideDownCake"]:not(.devsite-future-version) .api-level a,
#api-info-block .api-level a[data-version-added="UpsideDownCake"],
.api-level a[data-version-added="UpsideDownCake"],
.apilevel-UpsideDownCake .api-level a {
  color: #f5ba15 !important;
  font-size: 14px;
  font-weight:900;
}

/* Clear backgrounds for table rows */
#jd-content:not(.devsite-future-version) tr.apilevel-UpsideDownCake:not(.devsite-future-version),
#jd-content:not(.devsite-future-version) .apilevel-UpsideDownCake:not(.devsite-future-version) tr,
table:not(.jd-inheritance-table):not(.jd-sumtable-subclasses) tr.apilevel-UpsideDownCake:not(.devsite-future-version),
body.apilevel-UpsideDownCake #jd-content table:not(.jd-inheritance-table):not(.jd-sumtable-subclasses) tr,
#jd-content:not(.devsite-future-version) tr[data-version-added="UpsideDownCake"]:not(.devsite-future-version),
#jd-content:not(.devsite-future-version) [data-version-added="UpsideDownCake"]:not(.devsite-future-version) tr,
table:not(.jd-inheritance-table):not(.jd-sumtable-subclasses) tr[data-version-added="UpsideDownCake"]:not(.devsite-future-version),
#jd-content[data-version-added="UpsideDownCake"] table:not(.jd-inheritance-table):not(.jd-sumtable-subclasses) tr {
  background: none;
}

/* Add gold preview background color to table headings and cells */
#jd-content:not(.devsite-future-version) .apilevel-UpsideDownCake:not(.devsite-future-version) td,
#jd-content:not(.devsite-future-version) .apilevel-UpsideDownCake:not(.devsite-future-version) th,
body.apilevel-UpsideDownCake #jd-content:not(.devsite-future-version) table:not(.jd-inheritance-table):not(.jd-sumtable-subclasses) tr:not(.devsite-future-version) td,
body.apilevel-UpsideDownCake #jd-content:not(.devsite-future-version) th,
#jd-content:not(.devsite-future-version) [data-version-added="UpsideDownCake"]:not(.devsite-future-version) td,
#jd-content:not(.devsite-future-version) [data-version-added="UpsideDownCake"]:not(.devsite-future-version) th,
#jd-content[data-version-added="UpsideDownCake"]:not(.devsite-future-version) table:not(.jd-inheritance-table):not(.jd-sumtable-subclasses) tr:not(.devsite-future-version) td,
#jd-content[data-version-added="UpsideDownCake"]:not(.devsite-future-version) th {
  background: rgba(245, 185, 16, .2);
}

/* Add gold preview background color to additional table cells */
#jd-content:not(.devsite-future-version) tr.apilevel-UpsideDownCake:not(.devsite-future-version) td,
table:not(.jd-inheritance-table):not(.jd-sumtable-subclasses) .apilevel-UpsideDownCake:not(.devsite-future-version) td,
#jd-content:not(.devsite-future-version) tr[data-version-added="UpsideDownCake"]:not(.devsite-future-version) td,
table:not(.jd-inheritance-table):not(.jd-sumtable-subclasses) [data-version-added="UpsideDownCake"]:not(.devsite-future-version) td {
  background: rgba(245, 185, 16, .2);
}

/* End of styles to highlight the preview APIs */


/* Misc styles used in the reference */

h1.api-title {
  margin-bottom: 0;
}

h2.api-section:not(#summary) {
  margin-top: 60px;
  margin-bottom: -20px;
}

h3.api-name {
  margin-top: 60px;
}

.nolist, .nolist ul, .nolist ol {
  list-style: none;
  padding-left: 0;
}

table.inhtable>tbody>tr>td {
  padding-left: 0;
}

table.inhtable>tbody>tr>td div:first-of-type {
  padding-left: 12px;
}

.api-item {
  position: relative;
}

.api-item > .api-name {
  padding-right: 80px;
}

.api-item > .kotlin-platform {
  inset-inline-end: 0;
  position: absolute;
  top: 0;
}

.kotlin-platform {
  background: #ebf7fe;
  border-radius: 16px;
  color: #1769e0;
  display: inline-block;
  font: 500 12px/32px Android Euclid, Noto Sans, Noto Sans JP, Noto Sans KR,
    Noto Naskh Arabic, Noto Sans Thai, Noto Sans Hebrew, Noto Sans Bengali,
    sans-serif;
  height: 32px;
  text-align: center;
  width: 32px;
}

/* Styles specific to the Android reference docs */
head:has(meta[property="og:url"][content*="/android/reference"])
  + body[layout=docs] .devsite-article,
head:has(meta[property="og:url"][content*="/android/games_v1/reference"])
  + body[layout=docs] .devsite-article {
  border-radius: 24px;
  overflow: hidden;
}

head:has(meta[property="og:url"][content*="/android/reference"])
  + body[layout=docs] .devsite-article h1:first-of-type,
head:has(meta[property="og:url"][content*="/android/games_v1/reference"])
  + body[layout=docs] .devsite-article h1:first-of-type {
  font: 500 40px / 48px Google Sans, Noto Sans, Noto Sans JP, Noto Sans KR,
    Noto Naskh Arabic, Noto Sans Thai, Noto Sans Hebrew, Noto Sans Bengali,
    sans-serif;
  letter-spacing: -0.5px;
}
