@charset "UTF-8";

/* ==========================================================================
   1. Base & Body
   ========================================================================== */
body {
    font-family: arial;
    font-size: 1.20em;
    overflow-x: hidden;
    overflow-y: auto;
    background: hsl(205, 65%, 97%);
    min-height: 100svh;
    position: relative;
}

/* ==========================================================================
   2. Layout Structure (Flex & Grid)
   ========================================================================== */
#main {
    display: flex;
    flex-flow: column;
    align-items: center;
}

#section-dicts {
    margin: 10px;
    flex: 1 1 auto;
    max-width: 100%;
    order: 1;
}

#section-defn {
    margin: 10px;
    flex: 1 1 auto;
}

@media all and (min-width: 750px) {
    #main {
        flex-flow: row wrap;
        align-items: flex-start;
    }
    #section-dicts {
        flex: 1 1 0%;
        order: 0;
    }
    #section-defn {
        flex: 1 1 0%;
    }
}

@media all and (min-width: 992px) {
    #section-dicts {
        flex: 3 1 0%;
    }
    #section-defn {
        flex: 2 1 0%;
    }
}

/* ==========================================================================
   3. Search Forms & Inputs
   ========================================================================== */
#olform {
    vertical-align: middle;
}

#formset {
    /* Empty in original */
}

#fb1 {
    display: inline-block;
    vertical-align: middle;
}

#fb2 {
    display: inline-block;
    vertical-align: top;
}

#olinput {
    height: 30px;
    font-size: 30px;
    transition: box-shadow 0.2s ease-in-out;
    border: 2px solid black;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(255, 253, 237, 0.1);
    padding: 10px;
    margin-bottom: 20px;
    vertical-align: middle;
}

#olinput:focus {
    outline: none;
    box-shadow: 0 3px 20px rgba(0, 0, 0, 0.2);
}

#olsubmit {
    -webkit-appearance: none;
    height: 50px;
    vertical-align: top;
    font-size: 20px;
}

input.asearch {
    font-size: 18px;
    font-weight: bold;
}

.field-set {
    border: 1px solid lightgray;
}

/* Buttons */
.btn {
    font-size: 14px;
    width: 8em;
    margin-bottom: 4px;
    margin-left: 5px;
    height: 26px;
    border-radius: 6px;
}

.btn:hover {
    cursor: pointer;
    font-weight: bold; /* Fixed: text-decoration: bold is invalid */
    background: #FFD580;
}

.largeSaveBtn {
    font-size: 1.2em;
}

/* Top Gloss Button */
.topgloss-button {
    --btn-bg: #ffffff;
    --btn-fg: #086c42;
    --btn-border: lightgrey;
    --btn-focus-ring: blue;

    display: inline-block;
    padding: 0.1rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--btn-fg);
    background: var(--btn-bg);
    border: 2px solid var(--btn-border);
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0,0,0,.06);
    cursor: pointer;
    transition: background 120ms ease, color 120ms ease, box-shadow 120ms ease, transform 60ms ease;
}

.topgloss-button:hover,
.topgloss-button:focus-visible {
    background: #fdeed9;
    color: black;
    box-shadow: 0 2px 4px rgba(0,0,0,.12);
    text-decoration: none;
}

.topgloss-button:focus-visible {
    outline: 3px solid var(--btn-focus-ring);
    outline-offset: 2px;
}

.topgloss-button:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0,0,0,.12) inset;
}

.topgloss-button[disabled],
.topgloss-button[aria-disabled="true"] {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

/* ==========================================================================
   4. Dictionary Entries
   ========================================================================== */
div.entry {
    display: block;
    border: 0px solid black;
    padding: 10px;
}

div.form {
    display: inline;
}

div.entry > div.form {
    display: block;
    text-align: center;
    font-size: 12px;
}

div.xr {
    display: inline;
}

div.entry > div.xr[type="pron"] {
    display: block;
    cursor: pointer;
    text-align: center;
}

div.hom {
    display: block;
}

div.hom + div.hom {
    margin-top: 6px;
}

div.gramGrp {
    display: inline;
}

div.hom > div.gramGrp > div.gram[type="pos"] {
    font-variant: small-caps;
    font-weight: bold;
}

div.sense {
    display: block;
    margin-left: 15px;
}

div.sense-before {
    font-family: "lucida sans unicode", sans-serif;
    font-size: 14px;
    margin-left: -15px;
    display: block;
    float: left;
}

div.orth {
    display: inline;
    font-weight: bold;
}

div.def, div.gram, re {
    display: inline;
}

re {
    display: block;
}

.medo-hw {
    display: block;
    font-size: 0.7em;
    margin: 3px 0px 3px 0px;
}

.informal {
    color: grey;
}

/* Tables within entries */
.ec td, b.ec {
    font-family: times, serif;
}

.example_table {
    border-collapse: separate;
    border-spacing: 1.0em 0.5em;
}

td {
    line-height: 1.0;
    vertical-align: top;
}

/* ==========================================================================
   5. Links & Logos
   ========================================================================== */
a > img {
    border: 0;
    border-style: none;
}

a:hover {
    text-decoration: underline;
}

.dmapi_link {
    text-decoration: underline;
    color: blue;
    cursor: pointer;
}

a.mbreslink {
    font-size: 24px;
}

.ol_logo {
    margin-bottom: 20px;
    vertical-align: middle;
    font-family: "Gabarito", sans-serif;
    font-size: 2.5em;
    font-weight: 600;
    color: #444444;
    text-decoration: none;
}

.ol_logo a:visited,
.ol_logo a:link {
    color: #444444;
    text-decoration: none;
}

.ol_logo_sunburst {
    display: inline-block;
    transform: translateY(12px);
    position: relative;
}

.ol_logo_sunburst::before {
    content: "";
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(255, 255, 200, 0.5) 0%,
        rgba(255, 255, 200, 0.2) 55%,
        rgba(255, 255, 200, 0.1) 85%,
        rgba(255, 255, 200, 0) 100%
    );
    filter: blur(6px);
    z-index: -1;
    transition: transform .4s ease;
}

.ol_logo_sunburst:hover::before {
    transform: scale(1.05);
}

.ol_logo_sunburst:hover {
    opacity: 0.8;
}

.ol_logo_text {
    display: inline-block;
    letter-spacing: -0.05rem;
    transform: translateX(-12px);
    color: hsl(205, 65%, 10%);
}

/* ==========================================================================
   6. Tabs & Navigation
   ========================================================================== */
.ol_tabs {
    display: block;
    padding: 10px;
    margin-bottom: 15px;
    font-size: 0.9em;
}

.ol_tabs a {
    text-decoration: none;
    color: black;
}

.ol_selected_tab {
    display: inline-block;
    background: #fdeed9;
    margin: 5px;
    padding: 10px 14px;
    border: 1px solid black;
    border-radius: 10px;
    color: black;
    font-weight: bold;
    box-shadow: 0 2px 2px black;
}

.ol_nonselected_tab {
    display: inline-block;
    background: #f8f8fd;
    border-radius: 10px;
    margin: 3px;
    padding: 8px 12px;
    border: 1px solid #f8f8fd;
    box-shadow: 0 1px 3px black;
    color: black;
}

.ol_nonselected_tab:hover {
    border: 1px solid black;
    background: #fdeed9;
}

/* ==========================================================================
   7. Thesaurus & Word Associations
   ========================================================================== */
.thes-subjectindex {
    font-family: 'Atkinson Hyperlegible', sans-serif;
    margin: 40px auto;
    line-height: 1.6;
    box-sizing: border-box;
    border-radius: 8px;
    border: 2px solid #999;
    padding: 20px;
    font-size: 0.9em;
    color: hsl(205, 65%, 2%);
    max-width: 600px;
}

.thes-supercluster-span {
    margin: 5px;
    padding: 5px;
}
.thes-supercluster-span a { text-decoration: none; }
.thes-supercluster-span:hover { background: #ffffbb; }

.thes-cluster-span {
    margin: 20px;
    padding: 5px;
}
.thes-cluster-span:hover { background: #ffffbb; }

.thes-supercluster-title {
    margin: 20px;
    color: black;
}

.top-cluster {
    padding: 5px;
    margin: 5px;
    cursor: pointer;
}

.ol_related {
    max-width: 80%;
    margin-left: 30px;
    margin-bottom: 50px;
    line-height: 1.4;
}

.relheader {
    display: inline-block;
    width: 100px;
    max-width: 26%;
    margin-bottom: 10px;
    vertical-align: top;
    text-align: right;
    margin-right: 10px;
}

.rellist {
    display: inline-block;
    max-width: 70%;
    margin-bottom: 10px;
    vertical-align: top;
}

.rellist2 {
    display: inline-block;
    max-width: 70%;
    margin-bottom: 10px;
    vertical-align: top;
    line-height: 1.5;
}

.ol_rel_gloss {
    display: inline-block;
    color: grey;
    font-size: 0.8em;
    margin-left: 5px;
}

/* Thesaurus Leaf Pages */
.ol_thes_leafword_entry {
    display: block;
    width: 600px;
    text-align: left;
    vertical-align: top;
    margin-bottom: 10px;
    font-family: 'Atkinson Hyperlegible', sans-serif;
}

.ol_thes_leafword_headword {
    display: inline-block;
    vertical-align: top;
    text-wrap: wrap;
    hyphens: auto;
    margin-right: 10px;
}

.ol_thes_leafword_headword a {
    text-decoration: none;
    font-weight: bold;
}

.ol_thes_leafword_pos {
    display: none;
    vertical-align: top;
    font-style: italic;
    color: grey;
}

.ol_thes_leafword_gloss {
    display: inline-block;
    width: 600px; /* Fixed missing unit */
    color: grey;
    font-size: 0.8em;
}

.ol_thes_leafpage_header {
    display: block;
    margin: 20px 20px 10px 20px;
    vertical-align: top;
}

.ol_thes_leafpage_thesauruslink {
    color: grey;
    font-size: 0.8em;
    margin-bottom: 20px;
}

.ol_thes_cluster_note {
    display: block;
    width: 600px;
    font-size: 0.8em;
    color: grey;
    margin: 20px auto 50px auto;
    text-align: left;
}


/* ==========================================================================
   8. Autocomplete & Menus
   ========================================================================== */


.ui-autocomplete .ui-menu-item .definition {
    float: right;
    padding-left: 0px; 
    color: #3b3b3d;
    display: flex; align-items: flex-end;
    font-size: 0.7em;
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis;
    text-align: left;
    padding-top: 6px;
}
.ui-menu-item {
    vertical-align: baseline;
    line-height: 1.6;    
}
.ui-menu-item:hover .definition {
    color: white;
}

.autocomplete_bolded {
    color: #0000cd;
}


/* Each row */
.ui-autocomplete .ui-menu-item {
  display: flex;
  align-items: baseline;
  line-height: 1.6;
  gap: .25rem;
}

/* Word on the left */
.ui-autocomplete .ui-menu-item > :first-child {
  display: block;           /* <-- needed for Firefox ellipsis */
  flex: 1 1 auto;
  min-width: 0;             /* allow to shrink */
  white-space: nowrap;      /* <-- keep on one line */
}

/* Make any inner spans (e.g., .autocomplete_bolded) respect the no-wrap */
.ui-autocomplete .ui-menu-item > :first-child * {
  white-space: inherit;
}


/* Definition on the right */
.ui-autocomplete .ui-menu-item .definition {
  flex: 0 0 auto;
  width: 400px;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.7em;
  color: #3b3b3d;
  text-align: left;
  padding-top: 6px;
  padding-left: .25rem;
}

/* Mobile narrower column */
@media (max-width: 768px) {
    .ui-autocomplete .ui-menu-item .definition {
	    flex: 0 0 220px;        /* pick the width you like (e.g., 200–230px) */
	    padding-left: .2rem;
    }
     .ui-autocomplete {
    left: 0 !important;
    width: 96vw !important;
    margin: 0;
  }

}


.ui-menu-item:hover .definition { color: white; }

.autocomplete_bolded { color: #0000cd; }
.ui-autocomplete .ui-menu-item .definition_match {
  font-weight: bold;
  color: green;
}
.ui-menu-item:hover { background: #007fff !important;  color: white; }
.ui-menu-item:hover .definition_match { color: yellow; }
.ui-menu-item:hover .autocomplete_bolded { color: white; }

.ui-autocomplete {
  border-color: black !important;
  border-width: 2px !important;
  border-style: solid;
  border-radius: 6px;
  padding: 5px 5px 5px 0px !important;
}

/* Footer/legend row */
ul.ui-autocomplete.ui-menu li:last-child {
  font-size: 0.6em;
  color: blue;
  padding-top: 10px;
  padding-bottom: 5px;
  cursor: default;
}






.ui-checkboxradio-label.ui-corner-all.ui-button.ui-widget.ui-checkboxradio-checked.ui-state-active {
    background: #e7f3ff !important;
    color: #000000;
}

.ui-button {
    padding: .2em .5em !important;
}

/* ==========================================================================
   9. Visualization / Usage Graph
   ========================================================================== */
#ol_usage_graph {
    width: 300px;
    margin: auto;
    border: 2px solid black;
    padding: 20px;
    margin-bottom: 50px;
    display: block;
}

.thes-usage-helpstring { font-size: 0.8em; }

.thes-usage-span {
    box-sizing: border-box;
    position: relative;
    height: 7em;
    margin-top: 10px;
    display: inline-block;
}

.thes-usage-span > .graph {
    box-sizing: border-box;
    height: 100%;
    border: 1px solid black;
    padding: 0.5em;
}

.negative-space { opacity: 0; }
.bar { fill: #93bb93; }

.bar.select {
    fill: #ffffbb;
    stroke: gray;
    stroke-width: 0.1px;
    stroke-dasharray: 0.3 0.3;
}

.baseline {
    stroke-width: 0.1px;
    pointer-events: none;
}

.baseline.show { stroke: black; }

.tooltip {
    position: absolute;
    border: 1px solid gray;
    padding: 0.5em;
    background-color: white;
    font-size: 1em;
    display: none;
}

.tooltip.show { display: block; }

.olthes_usage_help_startyear {
    display: inline-block;
    width: 150px;
    text-align: left;
    font-weight: bold;
}

.olthes_usage_help_endyear {
    display: inline-block;
    width: 150px;
    text-align: right;
    font-weight: bold;
}

.olthes_usage_help_title {
    margin: 10px auto 0 auto;
    display: block;
    text-align: center;
}

.olthes_usage_help_firstyear {
    margin: auto;
    display: block;
    text-align: center;
}

.olthes_usage_help {
    margin: 20px 20px 50px 20px;
    color: grey;
}

/* ==========================================================================
   10. Color & Meter Components
   ========================================================================== */
.ol_color_header {
    display: inline-block;
    min-width: 100px;
    max-width: 100px;
    vertical-align: top;
    font-weight: bold;
    text-align: right;
    margin-right: 32px;
}

.ol_color_title {
    display: inline-block;
    padding: 12px;
    border: 2px solid black;
    border-radius: 10px;
}

.ol_color_rgb {
    display: inline-block;
    /* align-text is invalid, removing. Default is left. */
}

.ol_color_similar_list,
.ol_color_similar_word_list {
    display: flex;
    flex-flow: row wrap;
    align-items: flex-start;
}

.ol_color_similar_list { line-height: 3.0; }
.ol_color_similar_word_list { vertical-align: middle; }

.ol_color_row_container {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.ol_color_similar {
    border: 2px solid black;
    border-radius: 10px;
    margin: 3px;
    padding: 8px;
    box-shadow: 0 3px 20px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.ol_color_similar:hover { border: 2px solid red; }

.ol_color_similar_anchor,
.ol_color_similar_anchor:hover {
    text-decoration: none;
}

.meter_btn_unselected {
    margin: 5px;
    padding: 8px;
    border: 1px solid black;
    border-radius: 4px;
    font-weight: bold;
    color: blue;
    width: 50px;
}

.meter_btn_unselected:hover {
    background: #bbffbb;
    cursor: pointer;
}

.meter_teaser {
    border: 1px solid black;
    padding: 30px;
    max-width: 800px;
}

#viz-teaser-button {
    padding: 5px;
    margin: 5px;
    background-color: #EDFDFF;
    border: 1px solid grey;
    cursor: pointer;
    text-decoration: none;
}

#viz-teaser-button:hover {
    background-color: lightgrey;
}

/* ==========================================================================
   11. Miscellaneous
   ========================================================================== */
.wke_show_similar_title,
.wke_show_similar {
    color: grey;
    font-size: 10px; /* Fixed missing unit */
}

.wke_show_similar:hover {
    font-weight: bold;
    cursor: pointer;
}

#contract_work { margin: 30px; }

.ol-history-tab {
    font-family: 'Atkinson Hyperlegible', sans-serif;
    margin: auto;
    line-height: 1.6;
    box-sizing: border-box;
    color: hsl(205, 65%, 2%);
    max-width: 800px;
}

.ol-searchexamples { max-width: 400px; }

.srl {
    cursor: pointer;
    font-size: 24px; /* Fixed missing unit */
    color: green;
}

#selrhy, #selgen {
    width: 150px;
    margin: 0 30px;
}

#selrhy-button, #selgen-button { margin: 5px; }

#rhymefilter {
    cursor: pointer;
    margin: auto;
    margin-bottom: 10px;
}

.ol_phrase_gloss {
    color: grey;
    font-size: 0.8em;
}

.ol_introteaser {
    color: black;
    max-width: 700px;
    line-height: 1.5;
}

.cyj_title {
    margin: 30px;
    font-size: 36px;
    letter-spacing: 0.25em;
}

.cyj_subtitle {
    margin: 20px;
    font-size: 24px;
    font-family: "Gabarito", sans-serif;
}

.cyj_doc { font-family: "Gabarito", sans-serif; }

.ol_inbrief {
    margin: auto;
    margin-left: 15px;
    margin-bottom: 10px;
    color: green;
    font-weight: bold;
}

.ol_inbrief a:link, .ol_inbrief a:visited { color: green; }
.ol_inbrief_title { color: black; font-weight: normal; }

.info-box {
    border: 2px solid #dddddd;
    border-radius: 8px;
}

.ol_phrase_dict, .ol_phrase_wiki {
    display: inline-block;
    max-width: 40%;
    vertical-align: top;
    margin: 10px;
}

.ol_searchassist {
    font-size: 0.7em;
    margin-bottom: 10px;
    text-align: center;
}

.games_info {
    background: #fff;
    clear: left;
    font-size: 1.0em;
    font-family: sans-serif, arial, helvetica;
    margin: auto;
    margin-bottom: 10px;
    max-width: 550px;
    border: 2px solid #ccf;
    border-radius: 10px;
    padding: 10px;
}

.pandergram_levels {
    display: inline-block;
    line-height: 2.0;
}

.pandergram_level_selected {
    background-color: #ff88;
    padding: 5px;
    border-radius: 5px;
    border-color: lightgrey;
    transform: translateY(-3px);
}

.pandergram_level_unselected {
    background-color: white;
    padding: 5px;
    border-radius: 5px;
    cursor: pointer;
    border-color: lightgrey;
    transform: translateY(-3px);
}

.ol_wordnotes {
    max-width: 800px;
    margin: auto;
    padding: 20px;
    border: 2px solid black;
    margin-bottom: 40px;
}

.ol_lita_references { font-size: 0.8em; }
.ol_lita_references li { margin-top: 10px; }

.ol_hips_entry {
    margin-left: 50px;
    margin-bottom: 20px;
}

.ol_hips_entry mark {
    padding: 4px;
    line-height: 1.3;
    border: 1px solid black;
}

.ol_hips_header { word-spacing: 8px; }
.ol_hips_header_mark { background-color: #fdeed9; }

#samplesentences { min-height: 500px; }
.ol_history_gloss { color: green; font-weight: bold; }

/* ==========================================================================
   12. Dark Theme Overrides
   ========================================================================== */
body.dark-theme {
    background-color: #111111;
    color: white;
}

.dark-theme #snippets { color: black; }
body.dark-theme a { color: #00cc00; }
table.dark-theme { background: black; }
body.dark-theme .ol_inbrief_title { color: white; }
body.dark-theme .thes-subjectindex { color: white; }
body.dark-theme .ol_logo_sunburst { display: none; }
.dark-theme .ol_logo_text { color: white; }
.dark-theme .ol_introteaser { color: white; }

#ol-poll-line {
    border: 2px solid black;
    padding: 20px;
    max-width: 600px;
    margin: auto;
    display: block;
    text-align: left;
}
