/* Header logo — transistor-logo-clear.png (pre-rendered PNG, cross-browser safe).
   2.4 rem matches the Material header height; 0 vertical padding lets the
   icon fill the full available height of the nav bar.                        */
.md-header__button.md-logo {
    padding: 0 0.3rem 0 0.2rem;
}
.md-header__button.md-logo img,
.md-header__button.md-logo svg {
    height: 2.4rem;
    width:  2.4rem;
}

/* Home page hero panel */
.md-content article > svg {
    margin: 1.5rem 0 2rem;
    border-radius: 20px;
}

/* ── Landing page — platform selector cards ─────────────────────────────── */
.bgeo-landing-hero img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
    margin: 1.5rem 0 2rem;
}
.bgeo-platform-cards {
    display: flex;
    gap: 1.25rem;
    margin: 2rem 0 2.5rem;
    flex-wrap: wrap;
}
.bgeo-platform-card {
    flex: 1;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none !important;
    border: 1px solid var(--md-default-fg-color--lightest);
    border-radius: 14px;
    padding: 1rem 0.75rem 1.1rem;
    transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
    background: var(--md-default-bg-color);
}
.bgeo-platform-card:hover {
    border-color: var(--md-accent-fg-color);
    box-shadow: 0 6px 24px rgba(0,0,0,0.28);
    transform: translateY(-2px);
}
.bgeo-platform-card img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 0.85rem;
}
.bgeo-platform-card__label {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--md-default-fg-color);
}
.bgeo-platform-card__sub {
    font-size: 0.78rem;
    color: var(--md-default-fg-color--light);
    text-align: center;
    margin-top: 0.3rem;
    line-height: 1.4;
}

/* ── Landing page — feature grid ────────────────────────────────────────── */
.bgeo-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}
.bgeo-feature {
    border: 1px solid var(--md-default-fg-color--lightest);
    border-radius: 10px;
    padding: 1rem 1.1rem;
}
.bgeo-feature strong {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--md-default-fg-color);
}

/* ── Platform page — repo icon cards ───────────────────────────────────── */
.bgeo-repo-cards {
    display: flex;
    gap: 1.5rem;
    margin: 1.5rem 0 2rem;
    flex-wrap: wrap;
}
.bgeo-repo-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
    text-decoration: none !important;
    transition: transform 0.18s, opacity 0.18s;
}
.bgeo-repo-card:hover {
    transform: translateY(-2px);
    opacity: 0.85;
}
.bgeo-repo-card__icon {
    position: relative;
    width: 77px;
    height: 77px;
}
.bgeo-repo-card__icon > img:first-child {
    width: 77px;
    height: 77px;
    border-radius: 17px;
    display: block;
}
.bgeo-repo-card__gh {
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
}
.bgeo-repo-card span {
    font-size: 0.72rem;
    color: var(--md-default-fg-color--light);
    text-align: center;
    max-width: 96px;
    line-height: 1.3;
    word-break: break-all;
}


/* ── Platform badge: [Android only] ─────────────────────────────────────── */
.platform-badge {
    display: inline-block;
    padding: 0.2em 0.65em;
    border-radius: 100px;
    font-size: 0.7em;
    font-weight: 700;
    letter-spacing: 0.03em;
    line-height: 1.5;
    vertical-align: middle;
    white-space: nowrap;
    text-decoration: none !important;
    user-select: none;
    background-repeat: no-repeat;
    background-position: 0.45em center;
    background-size: 15px 15px;
    padding-left: calc(0.45em + 15px + 0.35em);
}
.platform-badge--android {
    background-color: #29a865;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='-12 -12 24 24'%3E %3Cg transform='scale(0.03566) translate(-2183.82,-196.50)'%3E%3Cpath fill='%230a2e1a' d='m 2520.38,377.22997 c -0.22,-1.378 -0.43,-2.74 -0.66,-4.102 -1.39,-8.451 -3.12,-16.803 -5.13,-25.041 -3.53,-14.391 -7.97,-28.437 -13.27,-42.04 -4.48,-11.52 -9.58,-22.727 -15.24,-33.59 -7.28,-13.948 -15.49,-27.338 -24.56,-40.072 -11.12,-15.605 -23.54,-30.225 -37.1,-43.697 -5.69,-5.662 -11.58,-11.126 -17.66,-16.361 -13.17,-11.371 -27.24,-21.725 -42.06,-30.98 0.13,-0.214 0.24,-0.443 0.37,-0.657 6.79,-11.732 13.6,-23.449 20.39,-35.181 6.64,-11.453998 13.28,-22.907998 19.92,-34.360998 4.78,-8.221 9.55,-16.459 14.3,-24.68 1.13,-1.953 2.02,-3.971 2.69,-6.038 1.86,-5.76 1.94,-11.815 0.45,-17.444 -0.38,-1.394 -0.84,-2.756 -1.4,-4.085 -0.56,-1.33 -1.21,-2.626 -1.95,-3.873 -2.54,-4.266 -6.17,-7.9749997 -10.73,-10.6829997 -4.03,-2.395 -8.54,-3.823 -13.16,-4.233 -1.94,-0.164 -3.89,-0.148 -5.83,0.049 -1.6,0.164 -3.19,0.46 -4.77,0.87 -5.62,1.493 -10.84,4.578 -14.9,9.0409997 -1.46,1.608 -2.78,3.381 -3.91,5.333 -4.77,8.221 -9.54,16.459 -14.3,24.68 l -19.92,34.361 c -6.79,11.733 -13.6,23.449 -20.39,35.181998 -0.74,1.279 -1.49,2.559 -2.23,3.856 -1.03,-0.411 -2.05,-0.821 -3.08,-1.215 -37.44,-14.275998 -78.06,-22.085998 -120.52,-22.085998 -1.16,0 -2.31,0 -3.48,0.016 -37.75,0.377 -74.02,6.941 -107.86,18.722998 -3.91,1.362 -7.78,2.806 -11.62,4.316 -0.69,-1.198 -1.4,-2.396 -2.08,-3.594 -6.79,-11.732998 -13.6,-23.448998 -20.39,-35.181998 -6.64,-11.453 -13.28,-22.907 -19.92,-34.361 -4.78,-8.221 -9.55,-16.458 -14.3,-24.679 -1.14,-1.953 -2.45,-3.725 -3.91,-5.333 -4.06,-4.4639997 -9.28,-7.5489997 -14.9,-9.0419997 -1.58,-0.41 -3.17,-0.705 -4.78,-0.869 -1.93,-0.197 -3.88,-0.214 -5.82,-0.05 -4.62,0.394 -9.13,1.822 -13.17,4.234 -4.56,2.707 -8.16,6.4159997 -10.72,10.6819997 -0.74,1.247 -1.4,2.544 -1.95,3.873 -0.56,1.329 -1.04,2.691 -1.4,4.086 -1.49,5.628 -1.41,11.683 0.44,17.443 0.68,2.068 1.56,4.086 2.69,6.039 4.78,8.221 9.55,16.458 14.3,24.679 6.65,11.454 13.29,22.908 19.93,34.360998 6.79,11.733 13.59,23.449 20.38,35.182 0.05,0.098 0.12,0.197 0.17,0.295 -13.7,8.517 -26.73,17.952 -39.03,28.273 -7.37,6.187 -14.47,12.668 -21.27,19.445 -13.55,13.472 -25.96,28.093 -37.1,43.698 -9.08,12.734 -17.3,26.107 -24.56,40.072 -5.66,10.863 -10.76,22.07 -15.24,33.59 -5.3,13.603 -9.74,27.649 -13.27,42.04 -2.01,8.238 -3.72,16.574 -5.13,25.041 -0.23,1.362 -0.44,2.74 -0.65,4.102 -0.76,4.907 -1.4,9.846 -1.94,14.818 h 673.11 c -0.54,-4.972 -1.18,-9.911 -1.93,-14.818 z'/%3E%3Cpath fill='%2366bb88' d='m 2360.79,298.98697 c 13.47,-8.966 15.43,-29.71 4.37,-46.331 -11.05,-16.622 -30.93,-22.827 -44.39,-13.861 -13.47,8.967 -15.43,29.71 -4.37,46.331 11.05,16.622 30.93,22.828 44.39,13.861 z'/%3E%3Cpath fill='%2366bb88' d='m 2055.6,285.18397 c 11.06,-16.622 9.1,-37.365 -4.37,-46.331 -13.47,-8.967 -33.34,-2.761 -44.4,13.86 -11.05,16.622 -9.09,37.365 4.37,46.331 13.47,8.967 33.35,2.761 44.4,-13.86 z'/%3E%3C/g%3E %3C/svg%3E");
    color: #0a2e1a;
    box-shadow: 0 1px 3px rgba(41, 168, 101, 0.4), inset 0 1px 0 rgba(255,255,255,0.25);
}

.platform-badge--ios {
    background-color: #0071e3;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='-12 -12 24 24'%3E %3Cg transform='scale(0.16000) translate(-99.0,-97.0)' fill-rule='evenodd'%3E%3Cpath d='m32.882 137.54h-4.5633v-60.979h4.5633v60.979zm-2.3466-75.927c-1.9244 0-3.5158-1.5265-3.5158-3.4509 0-1.9812 1.5833-3.5158 3.5158-3.5158 1.9812 0 3.5564 1.5265 3.5564 3.5158 0 1.9244-1.5752 3.4509-3.5564 3.4509z' fill='%2366bb88'/%3E%3Cpath d='m77.205 138.73c-22.313 0-36.409-16.248-36.409-42.076 0-25.699 14.161-42.011 36.409-42.011s36.401 16.313 36.401 42.011 c0 25.829-14.096 42.076-36.401 42.076zm0-79.89c-19.422 0-31.821 14.664-31.821 37.813 0 23.166 12.456 37.887 31.821 37.887 19.422 0 31.821-14.721 31.821-37.887 0-23.157-12.399-37.813-31.821-37.813z' fill='%2366bb88'/%3E%3Cpath d='m146.1 138.73c-16.751 0-28.76-9.4595-29.442-22.987h4.474 c0.68206 11.092 11.1 18.854 25.309 18.854 13.868 0 23.547-7.8761 23.547-18.513 0-8.5582-5.7731-13.479-19.471-16.93l-9.6787-2.3791 c-15.111-3.8569-21.972-9.971-21.972-20.21 0-12.74 11.895-21.915 26.787-21.915 15.395 0 26.892 9.0616 27.404 21.063h-4.474 c-0.62522-9.7924-10.19-16.93-23.044-16.93 -12.293 0-22.086 7.3646-22.086 17.668 0 8.1603 6.0005 12.854 19.13 16.134l9.1184 2.3222 c15.793 3.9056 22.873 9.971 22.873 20.835 0 13.527-11.376 22.987-28.476 22.987z' fill='%2366bb88'/%3E%3C/g%3E %3C/svg%3E");
    color: white;
    box-shadow: 0 1px 3px rgba(0, 113, 227, 0.4), inset 0 1px 0 rgba(255,255,255,0.2);
}
h1 .platform-badge { font-size: 0.5rem; }

/* ── Tab labels — platform icons ────────────────────────────────────────── */
.tabbed-labels label[data-platform] {
    display: inline-flex;
    align-items: center;
}
.tabbed-labels label[data-platform] > a {
    padding-left: 0;
    margin-left: 0;
}
.tabbed-labels label[data-platform]::before {
    content: '';
    display: block;
    width: 1em;
    height: 1em;
    flex-shrink: 0;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-right: 0.3em;
}
.tabbed-labels label[data-platform="react-native"]::before {
    background-image: url('../images/platforms/react-native.svg');
}
.tabbed-labels label[data-platform="expo"]::before {
    background-image: url('../images/platforms/expo.svg');
}
.tabbed-labels label[data-platform="capacitor"]::before {
    background-image: url('../images/platforms/capacitor.svg');
}
.tabbed-labels label[data-platform="flutter"]::before {
    background-image: url('../images/platforms/flutter.svg');
}
.tabbed-labels label[data-platform="swift"]::before {
    background-image: url('../images/platforms/swift.svg');
}
.tabbed-labels label[data-platform="kotlin"]::before {
    background-image: url('../images/platforms/kotlin.svg');
}
.tabbed-labels label[data-platform="cordova"]::before {
    background-image: url('../images/platforms/cordova.svg');
}

/* ── Setup page h2 — subtle section divider ─────────────────────────────── */
.md-content article h2 {
    border-bottom: 1px solid var(--md-default-fg-color--lightest);
    padding-bottom: 0.3em;
}

/* ── Setup page headings — platform SVG icons ───────────────────────────── */
.bgeo-platform-heading-icon {
    display: inline-block;
    width: 0.8em;
    height: 0.8em;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-right: 0.35em;
    vertical-align: middle;
    position: relative;
    top: -0.06em;
}
.bgeo-platform-heading-icon[data-platform="ios"]          { background-image: url('../images/platforms/ios.svg'); }
.bgeo-platform-heading-icon[data-platform="android"]      { background-image: url('../images/platforms/android.svg'); }
.bgeo-platform-heading-icon[data-platform="react-native"] { background-image: url('../images/platforms/react-native.svg'); }
.bgeo-platform-heading-icon[data-platform="expo"]         { background-image: url('../images/platforms/expo.svg'); }
.bgeo-platform-heading-icon[data-platform="capacitor"]    { background-image: url('../images/platforms/capacitor.svg'); }
.bgeo-platform-heading-icon[data-platform="flutter"]      { background-image: url('../images/platforms/flutter.svg'); }
.bgeo-platform-heading-icon[data-platform="swift"]        { background-image: url('../images/platforms/swift.svg'); }
.bgeo-platform-heading-icon[data-platform="kotlin"]       { background-image: url('../images/platforms/kotlin.svg'); }

/* ── Table first-column code — prevent wrapping of long identifier names ──── */
.md-content table td:first-child code {
    white-space: nowrap;
}

/* ── TOC top-level section headers (H2 entries: Events, Methods, etc.) ─────── */
/* Only items that received an icon are category headers — not individual members */
.md-nav--secondary > .md-nav__list > .md-nav__item > .md-nav__link:has(.bgeo-toc-icon) {
    border-bottom: 2px solid var(--md-default-fg-color--lightest) !important;
    padding-bottom: 0.2em;
    margin-bottom: 0.15em;
}

/* ── Primary nav icons (Home / Setup / Examples) ────────────────────────── */
.md-sidebar--primary .bgeo-nav-icon {
    display: inline-block;
    width: 0.85em;
    height: 0.85em;
    margin-right: 0.4em;
    vertical-align: middle;
    flex-shrink: 0;
    opacity: 0.6;
    stroke: var(--md-default-fg-color);
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ── TOC Lucide icons ────────────────────────────────────────────────────── */
.md-nav--secondary .bgeo-toc-icon {
    display: inline-block;
    width: 0.85em;
    height: 0.85em;
    margin-right: 0.4em;
    vertical-align: middle;
    flex-shrink: 0;
    opacity: 0.85;
    stroke: var(--md-accent-fg-color);
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ── Page heading Lucide icons (h3.bgeo-method-group) ───────────────────── */
.bgeo-heading-icon {
    display: inline-block;
    width: 0.8em;
    height: 0.8em;
    margin-right: 0.35em;
    vertical-align: middle;
    position: relative;
    top: -0.06em;
    opacity: 0.75;
    stroke: var(--md-accent-fg-color);
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ── Method sub-group TOC expand / collapse ─────────────────────────────── */

/* Hide nested method list when collapsed */
.md-nav--secondary .bgeo-group--collapsed > .md-nav {
    display: none;
}

/* Arrow indicator injected by method-groups.js */
.bgeo-group-indicator {
    display: inline-block;
    font-size: 0.7em;
    opacity: 0.55;
    margin-left: 0.3em;
    vertical-align: middle;
    transition: transform 0.15s ease;
}

/* Rotate arrow when expanded */
.md-nav--secondary li:not(.bgeo-group--collapsed) .bgeo-group-indicator {
    transform: rotate(90deg);
    opacity: 0.8;
}

/* Cursor hint that the sub-group header is clickable */
.md-nav--secondary li.bgeo-group--collapsed > a.md-nav__link,
.md-nav--secondary li:not(.bgeo-group--collapsed) > a.md-nav__link:has(.bgeo-group-indicator) {
    cursor: pointer;
}

/* Search scope toggle banner */
.bgeo-search-scope-toggle {
    padding: 0.4em 0.75em;
    font-size: 0.75em;
    background: var(--md-code-bg-color);
    border-bottom: 1px solid var(--md-default-fg-color--lightest);
    color: var(--md-default-fg-color--light);
}

.bgeo-search-scope-toggle strong {
    color: var(--md-accent-fg-color);
}

.bgeo-search-scope-toggle .bgeo-scope-link {
    color: var(--md-accent-fg-color);
    text-decoration: underline;
    cursor: pointer;
}

/* Active underline on main nav tabs — matches pymdownx.tabbed style */
.md-tabs__link {
    position: relative;
    padding-bottom: 6px;
}
.md-tabs__item--active .md-tabs__link::after {
    content: "";
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--md-accent-fg-color);
}

/* Platform icons in top nav tabs */
.bgeo-tab-icon {
    height: 16px;
    width: 16px;
    vertical-align: middle;
    margin-right: 3px;
    margin-bottom: 2px;
    opacity: 0.5;
}

/* Right-align the About + Context tabs in the top navigation bar */
.md-tabs__list > .md-tabs__item:nth-last-child(2) {
    margin-left: auto;
}
