/* Shared site header: logo, title, the "Menu" dropdown (Home, Site Settings, Attributions,
   Browser Extension, Features, Word of the Day History, and -- conditionally -- Privacy
   Statement / Edit This Entry), and the Settings dialog itself (all its toggles). This is the
   ONLY copy of this CSS -- every page that shows the header (via header.php) links to this
   file from its own <head>; none of them duplicate these rules inline. Relies on
   css/base.css's --bg/--fg/--muted/--panel/--panel2/--kjv-color/--bsb-color (light and dark)
   -- link base.css BEFORE this file. */

.site-header {
    margin-bottom: 20px;
}
.site-header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.site-header-left {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
}
.site-logo {
    flex: none;
    line-height: 0;
}
.site-logo img {
    display: block;
}
.title {
    font-size: 1.3em;
    font-weight: bold;
    overflow-wrap: break-word;
}
.home-link {
    color: inherit;
    text-decoration: none;
}
@media (max-width: 640px) {
    /* The full 104x105 logo leaves too little room beside the title on the narrowest phones
       (measured: at 320px wide it forces "Dictionary" to wrap mid-word). Shrinking it here only
       affects this breakpoint -- the logo is still full size everywhere else. */
    .site-logo img {
        width: 64px;
        height: 64px;
    }
    .title {
        font-size: 1.05em;
    }
}

/* bible_full.php / encyclopedia_full.php: a smaller logo keeps the header more compact, and
   the border stands in for the divider a search box would otherwise have given the page. */
.site-header-compact {
    border-bottom: 1px solid var(--fg);
    padding-bottom: 16px;
}
.site-header-compact .site-logo img {
    width: 72px;
    height: 72px;
}
@media (max-width: 640px) {
    .site-header-compact .site-logo img {
        width: 64px;
        height: 64px;
    }
}

/* "Menu" button, top right -- opens a plain stacked list of links: Site Settings (which opens the
   dialog below, same as the rest), then Attributions, Browser Extension, Features, Word of the Day
   History, and -- conditionally -- Privacy Statement / Edit This Entry. Deliberately no box (no
   border, no background panel) around the list itself -- just the links, spaced out, floating over
   whatever's beneath them. */
.site-menu {
    position: relative;
    flex: none;
}
.menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-family: inherit;
    font-size: 1em;
    padding: 8px 16px;
    border: 1px solid var(--fg);
    background: var(--bg);
    color: var(--fg);
    cursor: pointer;
}
.hamburger-icon {
    display: inline-flex;
    flex-direction: column;
    justify-content: space-between;
    width: 16px;
    height: 11px;
}
.hamburger-icon span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--fg);
}
.dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    z-index: 30;
    display: flex;
    flex-direction: column;
    min-width: 200px;
    padding: 4px 0;
    /* a border on the left and bottom only, so the dropdown reads as its own distinct panel
       against whatever's underneath it, without the fully-boxed look "remove the box" (see the
       comment on .dropdown-menu a below) deliberately avoided */
    border-left: 1px solid var(--fg);
    border-bottom: 1px solid var(--fg);
}
.dropdown-menu[hidden] {
    display: none;
}
.dropdown-menu a {
    display: block;
    padding: 8px 10px;
    background: var(--bg);
    color: var(--fg);
    text-decoration: none;
    white-space: nowrap;
}
.dropdown-menu a:hover,
.dropdown-menu a:focus {
    text-decoration: underline;
}
.settings-link {
    cursor: pointer;
}

.settings-dialog {
    width: 100%;
    max-width: min(520px, calc(100vw - 24px));
    padding: 0;
    border: 1px solid var(--fg);
    border-radius: 6px;
    background: var(--bg);
    color: var(--fg);
}
.settings-dialog::backdrop {
    background: rgba(0, 0, 0, 0.45);
}
.settings-dialog-inner {
    padding: 14px 18px 16px;
}
.settings-dialog-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.settings-dialog-title {
    font-size: 1.15em;
    font-weight: bold;
}
.settings-close {
    background: none;
    border: none;
    font-size: 1.5em;
    line-height: 1;
    padding: 0 4px;
    cursor: pointer;
    color: var(--fg);
}
.settings-dialog .searchtype-toggle,
.settings-dialog .edition-toggle,
.settings-dialog .enc-edition-toggle,
.settings-dialog .onoff-toggle {
    font-size: 0.95em;
    margin-bottom: 12px;
}
.settings-dialog-foot {
    margin-top: 8px;
    text-align: right;
}
.settings-dialog-foot button {
    font-family: inherit;
    font-size: 1em;
    padding: 8px 16px;
    border: 1px solid var(--fg);
    background: var(--bg);
    color: var(--fg);
    cursor: pointer;
}

/* On/off and multi-choice toggle rows (used both inside the Settings dialog and,
   on index.php only, inline before it existed as a dialog -- kept generic). */
.onoff-toggle,
.edition-toggle,
.enc-edition-toggle,
.searchtype-toggle,
.autolink-toggle,
.images-toggle {
    font-size: 0.85em;
    margin-bottom: 6px;
}
.onoff-toggle .toggle-form,
.autolink-toggle .toggle-form,
.images-toggle .toggle-form,
.edition-toggle .toggle-form,
.enc-edition-toggle .toggle-form,
.searchtype-toggle .toggle-form {
    display: inline;
    margin: 0;
    padding: 0;
}
.onoff-toggle .link-button,
.autolink-toggle .link-button,
.images-toggle .link-button,
.edition-toggle .link-button,
.enc-edition-toggle .link-button,
.searchtype-toggle .link-button {
    display: inline;
    background: none;
    border: none;
    margin: 0;
    padding: 0;
    font: inherit;
    color: var(--fg);
    text-decoration: underline;
    cursor: pointer;
}
.onoff-toggle .state-on,
.autolink-toggle .state-on,
.images-toggle .state-on {
    background: #dcedc8;
    padding: 1px 5px;
    border-radius: 3px;
    color: #000000;
}
.onoff-toggle .state-off,
.autolink-toggle .state-off,
.images-toggle .state-off {
    background: #f4cccc;
    padding: 1px 5px;
    border-radius: 3px;
    color: #000000;
}
.autolink-toggle a,
.images-toggle a,
.edition-toggle a,
.enc-edition-toggle a,
.searchtype-toggle a {
    color: var(--fg);
}

/* Edition/version badges, shared by the Settings toggles above and by result badges
   elsewhere on the page (.edition-label.edition-*). */
.edition-label {
    font-size: 0.75em;
    font-weight: normal;
    font-style: normal;
    border-radius: 3px;
    padding: 0px 4px;
    margin-left: 4px;
    color: #000000;
}
.edition-toggle .edition-1913,
.searchtype-toggle .edition-1913,
.edition-label.edition-1913 {
    background: #cfe2f3;
    padding: 1px 5px;
    border-radius: 3px;
    color: #000000;
}
.edition-toggle .edition-1828,
.edition-label.edition-1828 {
    background: #fdf3c0;
    padding: 1px 5px;
    border-radius: 3px;
    color: #000000;
}
.edition-label.edition-eb1875,
.enc-edition-toggle .edition-eb1875,
.searchtype-toggle .edition-eb1875 {
    background: #e6d9f2;
    padding: 1px 5px;
    border-radius: 3px;
    color: #000000;
}
.edition-label.edition-watson1833,
.enc-edition-toggle .edition-watson1833,
.searchtype-toggle .edition-watson1833 {
    background: #f8d8c0;
    padding: 1px 5px;
    border-radius: 3px;
    color: #000000;
}
.edition-label.edition-thesaurus {
    background: #c9e4de;
    padding: 1px 5px;
    border-radius: 3px;
    color: #000000;
}
.edition-toggle .edition-kjv,
.edition-toggle .edition-bsb {
    padding: 1px 5px;
    border-radius: 3px;
    color: #000000;
}
.edition-toggle .edition-kjv {
    background: var(--kjv-color);
}
.edition-toggle .edition-bsb {
    background: var(--bsb-color);
}
.edition-toggle .edition-both,
.enc-edition-toggle .edition-both,
.searchtype-toggle .edition-both {
    background: #dcedc8;
    padding: 1px 5px;
    border-radius: 3px;
    color: #000000;
}
