/******************************* CUSTOM PROPERTIES *****************************/
:root {
	--header-color: #fff;
	--header-bg-color: darkred;
	--slider-color: LightGray;
	--button-bg-color: #CFE2FF;
	--focus-color: dodgerblue;
	--button-option-off: #f5f5f5;
	--button-selected: lightskyblue;
	--hover-color: powderblue;
	--active-hover-color: paleturquoise;
	--french-blue: #000091;
	--french-red: #E1000F;
	--button-disabled: whitesmoke;
	--ending-color: #E1000F;
	--stem-color: #000091;
	--literary: lightcyan;
	--formal: #F0FFE8;
	--neutral: seashell;
	/* --neutral: #FFFAFA;  */
	--informal: papayawhip;
	--colloquial: bisque;
	--slang: #FFE0EB;
	--offensive: pink;
	--vulgar: mistyrose;
}

/********************************** HEADER ***********************************/

header {
	background-image: linear-gradient(90deg, var(--french-blue) 33.33%, white 33.33%, white 66.66%, var(--french-red)  66.66%);
  	background-size: 100% 100%;
  	background-repeat: no-repeat;
	color: var(--header-color);
	padding-top: 0px;
	padding-bottom: 0px;
	border: solid black 1px;
	display: flex;
    justify-content: space-between;
    align-items: center;
}

#help {
	vertical-align: middle;
}

/* Sticky footer styles -------------------------------------------------- */

html {
    position: relative;
    min-height: 100%;
}
body {
    margin-bottom: 120px; /* Margin bottom by footer height */
}
.footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 121px; /* Set the fixed height of the footer here */
    line-height: 40px; /* Vertically center the text here */
    color: var(--header-color);
    background-color: var(--french-blue);
}

@media screen and (min-width: 440px) {
	.footer {
		height: 81px;
	}
	body {
		margin-bottom: 80px;
	}
}

@media screen and (min-width: 768px) {
	.footer {
		height: 41px;
	}
	body {
		margin-bottom: 40px;
	}
}

/********************************** LAYOUT ***********************************/

#section2 {
	display: flex;
	flex-direction: column;
}

#section3 {
	display: flex;
	flex-direction: column;
}

#verbwrapper, #expressionwrapper {
	margin-bottom: 10px;
}

dialog {
  border: none;
  border-radius: 8px;
  /* padding: 24px; */
  /* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); */
  /* max-width: 500px; */
  background: transparent;
}

dialog:focus {
	outline: none;
}

/* Style the dark background overlay */
dialog::backdrop {
  background-color: rgba(0, 0, 0, 0.5);
 /*  backdrop-filter: blur(4px); */ /* Adds a modern blur effect */
}

/********************************** HEADINGS **********************************/

h1 a {
	margin-top: 10px;
	margin-left: 10px;
	font-size: 2rem;
	color: #fff;
	mix-blend-mode: difference;
	text-decoration: none;
}

h2 {
	margin-top: 20px;
	font-size: 1.5rem;
}

h3 {
	margin-top: 10px;
	font-size: 1.25rem;
}

p {
	font-size: 1rem;
}

/******************************** SPAN STYLES ********************************/

.participle {
	font-weight: 500;
	font-size: 1.1rem;
}

.letter {
	font-style: italic;
}

.french {
	font-style: italic;
	font-weight: 500;
}

.grid2d {
	display: grid;
  	grid-template-columns: 120px auto;
	margin-bottom: 16px;
	max-width: max-content;
}

.grid2d div {
	padding: 10px;
	border-bottom: lightgrey 1px solid;
}

.spanbutton {
	background-color: var(--button-bg-color);
	border: solid 1px black;
	border-radius: 4px;
	padding: 2px 4px;
}

kbd {
	color: black;
	background-color: gainsboro;
}

dd {
    margin-left: 30px;
}

/******************************* VERB HEADER ********************************/

#verbcontainer {
	display: flex;
	flex-direction: row;
	width: 100%;
	margin-bottom: 10px;
	column-gap: 10px;
	align-items: baseline;
}

#verbheader {
	flex-grow: 10;
	text-align: center;
	vertical-align: middle;
	float: center;
	display: inline;
}

p.smallmargin {
	margin-bottom: 8px;
}

/******************************* SEARCH VERBS ********************************/

.rowcontainer {
	display: flex;
	flex-direction: row;
	width: 100%;
	column-gap: 0px;
	justify-content: space-between;
	padding: 0px;
}

.participle-container {
	float: left;
	display: inline;
}

.search-container {
	float: right;
	display: inline;
}

ul.filter {
	list-style-type: none; /* Remove bullets */
	padding: 0; 
	margin: 0; 
	position: absolute;
	display: none;
	background-color: white;
	min-width: 130px;
	max-width: 310px;
	/* overflow: auto; */
	border: 1px solid gray;
	border-top: 0px;
	z-index: 2;
}

.search-verb {
	background-color: var(--button-bg-color);
}

ul.filter:has(li.verb-search) {
	display: block;
}

li.verb-search {
	padding: 5px 10px;
	cursor: pointer;
}

li.verb-search:focus {
	background-color: var(--button-bg-color);
}

li.verb-search:hover {
	background-color: var(--hover-color);
}

.translation {
	font-style: italic;
}

/******************************* RELATED VERBS ********************************/

#relatedverbs {
	overflow-x: auto;
	overflow-y: hidden;
	white-space: nowrap;
	/* padding: 2px 0px; */
/* 	box-sizing: border-box;
	padding-bottom: 24px; */
	padding-top: 2px;
	min-height: 44px;
	margin-bottom: 8px;
}

/********************************** BUTTONS ***********************************/

a:focus {
	font-weight: bold;
}

div.btn-group {
	width: 100%;
}

#mood, #tense, #testgroup, #cefr {
	margin-bottom: 20px;
}

#tense {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	/* margin-bottom: 20px; */
}

/* #testgroup {
	margin-top: 10px;
} */

#gender {
	width: 30%;
	margin-right: 2%;
}

#mode {
	width: 68%;
}

#type {
	margin-bottom: 1px;
}

.btn {
	background-color: var(--button-bg-color);
	color: black;
}

.btn:focus  {
	outline: var(--focus-color) solid 2px;
	box-shadow: none !important;
	color: black;
	background-color: var(--button-bg-color);
}

.btn.active {
	background-color: var(--button-selected);
	color: black;
	font-weight: bold;
}

.btn:hover {
	background-color: var(--hover-color);
	color: black;
	font-weight: bold;
}

#translations:hover {
	font-weight: 500;
}

.btn.active:focus, .btn.filter:focus  {
	outline: var(--focus-color) solid 2px;
}

.btn.active:hover  {
	background-color: var(--active-hover-color);
}

.btn:disabled {
	color: black;
	font-weight: 400;
	background-color: var(--button-disabled);
	text-decoration: line-through;
}

#translations {
	font-size: 1.25rem;
}

button.filter {
	padding: 6px;
}

button.navigate {
	background-color: var(--button-bg-color);
}

svg.navigate {
  vertical-align: middle; /* Options: top, middle, bottom, baseline */
}

/*********************************** TABLES ***********************************/

#infinitive, #gerund, #pastparticiple {
	padding: 8px;
}

#pastparticipleinput, #gerundinput {
	margin-left: 8px;
}

.phrase, .verb {
	cursor: pointer;
}

.phrase:hover, .verb:hover {
	background-color: var(--button-bg-color);
}

tr.phrase:focus {
	background-color: var(--button-bg-color);
}

:focus {
	outline: var(--focus-color) solid 2px;
}

/***************************** VERBS TABLE ******************************/

#sort {
	margin: 2px;
}

#sort:focus {
	border: var(--focus-color) solid 1px;
	/* outline-offset: 4px; */
}

#verbtablebody tr.active:focus {
	border: var(--focus-color) solid 1px;
	/* margin: 1px; */
	/* padding: 1px; */
}

#verbtablebody tr.active td {
	background-color: var(--button-selected);
}

.sticky th {
	position: sticky;
	top: 0;
	z-index: 1;
	border-bottom: black solid 1px;
}

table.sortable th {
	background-color: var(--button-bg-color);
	padding: 4px;
}

table.sortable th button {
	padding: 4px 18px 4px 4px;
	margin: 1px;
	font-size: 100%;
	font-weight: bold;
  	background: transparent;
	border: none;
	display: inline;
	right: 0;
	left: 0;
	top: 0;
	bottom: 0;
	width: 100%;
	text-align: left;
}

table.sortable th button:focus {
	background-color: var(--button-selected);
	outline: var(--focus-color) solid 2px;
	border: none;
	color: black;
	padding: 4px 18px 4px 4px;
}

table.sortable th button.active {
	background-color: var(--button-selected);
	border: black solid 1px;
	padding: 3px 17px 3px 3px;
}

table.sortable th button:hover {
	background-color: var(--hover-color);
	border: black solid 1px;
	padding: 3px 17px 3px 3px;
}

table.sortable th button.active:hover {
	background-color: var(--active-hover-color);
	border: black solid 1px;
	padding: 3px 17px 3px 3px;
}

table.sortable th button span {
	position: absolute;
	right: 6px;
}

table.sortable th[aria-sort="descending"] span::after {
	content: "▼";
	color: currentcolor;
	font-size: 100%;
	top: 0;
}

table.sortable th[aria-sort="ascending"] span::after {
	content: "▲";
	color: currentcolor;
	font-size: 100%;
	top: 0;
}

/***************************** CONJUGATION TABLE ******************************/

#conjugations {
	margin-top: 12px;
}

#conjugationhead {
	visibility: collapse;
}

/***************************** EXPRESSION TABLE ******************************/

#expressionhead th {
	background-color: var(--header-color);
}

/* #expressiontable:focus {
	outline: var(--focus-color) solid 2px;
} */

tr.underline td {
	border-bottom: darkgrey solid 2px;
}

#expressions, #expressionstable {
	margin-bottom: 0px;
}

#expressionbody > tr > td {
	padding: 7px 8px;
}

/********************************* REGISTERS *********************************/

.idiom, .proverb, .figurative {
	background-color: var(--neutral);
} 

.literary {
	background-color: var(--literary);
}

.literaryformal {
	background-image: linear-gradient(to right, var(--literary), var(--formal));
}

.formal {
	background-color: var(--formal);
}

.formalliterary {
	background-image: linear-gradient(to right, var(--formal), var(--literary));
}

.formalneutral {
	background-image: linear-gradient(to right, var(--formal), var(--neutral));
}

/* .neutral, .idiom, .proverb, tr.figurative, tr.neutral {
	background-color: var(--neutral);
} */

.neutral {
	background-color: var(--neutral);
}

.proverb {
	font-style: italic;
}

.neutralliterary {
	background-image: linear-gradient(to right, var(--neutral), var(--formal), var(--literary));
}

.neutralformal {
	background-image: linear-gradient(to right, var(--neutral), var(--formal));
}

.neutralinformal {
	background-image: linear-gradient(to right, var(--neutral), var(--informal));
}

.neutralslang {
	background-image: linear-gradient(to right, var(--neutral), var(--slang));
}

.informal {
	background-color: var(--informal);
}

.informalformal {
	background-image: linear-gradient(to right, var(--informal), var(--neutral), var(--formal));
}

.informalneutral {
	background-image: linear-gradient(to right, var(--informal), var(--neutral));
}

.informalslang {
	background-image: linear-gradient(to right, var(--informal), var(--slang));
}

.informalvulgar {
	background-image: linear-gradient(to right, var(--informal), var(--vulgar));
}

.colloquial {
	background-color: var(--colloquial);
}

.slang {
	background-color: var(--slang);
}

.vulgar {
	background-color: var(--vulgar);
}

.offensive {
	background-color: var(--offensive);
}

tr.synonym:hover {
	cursor: pointer;
	background-color: var(--button-bg-color);
	background-image: linear-gradient(to right, var(--button-bg-color), var(--button-bg-color));
}

table.endings th {
	font-weight: normal;
	padding: 4px 8px;
}

table.endings td {
	padding: 4px 8px;
}

tr.main {
	font-weight: 600;
}

.synonymtable {
	width: 100%;
	margin-bottom: 10px;
}

.synonymdetail {
	font-size: 1.25rem;
	padding: 4px;
	margin-top: 6px;
	margin-bottom: 6px;
	background-color: var(--button-bg-color);
}

tr.synonym > td {
	padding: 4px;
}

#synonymtable > thead > tr > th {
	border-bottom: 1px solid darkgrey;
}

/**************************** CONJUGATION FORMATS ****************************/

span.morpheme {
	font-size: 1.1rem;
	pointer-events: none;
}

.stem, .ppstem {
	color: var(--stem-color);
	pointer-events: none;
}

.ending, .ppending, .agreement {
	color: var(--ending-color);
	pointer-events: none;
}

.changed {
	font-weight: 500 ;
}

#pastparticiple > span > span.changed {
	font-weight: 700;
}

span.irregular {
	text-decoration: underline solid skyblue 4px;
	text-underline-offset: 6px;
	pointer-events: none;
}

td.undefined {
	text-align: center;
}

/********************************** INPUTS ***********************************/

.correct {
	border: 2px solid green;
	background-color: #EFFFEF;
}

.correct + span::before {
	content: " \2713";
	color: green;
	font-weight: bold;
}

.incorrect {
	border: 2px solid black;
}

.incorrect + span::before {
	content: " \2715";
	color: crimson;
	font-weight: bold;
}

#characters {
	position: absolute;
	width: 231px;
	height: 108px;
	background-color: var(--header-color);
	border: 1px solid black;
	padding: 5px;
	margin: auto;
	z-index: 10;
	display: none;
	grid-template-columns: 44px 44px 44px 44px 44px;
}

button.character {
	border: 1px solid gray;
	background-color: var(--button-bg-color);
	font-size: 1.25rem;
}

button.character:hover {
	background-color: var(--hover-color);
}

#closecharacters {
 	position: absolute;
	top: -12px;
	right: 0px; 
	font-size: 28px;
	cursor: pointer;
  }

.answer:focus {
	border: 1px solid var(--focus-color);
}

input[type="text"], input[type="search"] {
	min-height: 34px;
}

input:hover {
	background-color: var(--hover-color);
}

/********************************** POPOVERS *********************************/

a.help {
	border-bottom: 1px dotted;
	color: black;
	text-decoration: none;
}

a {
	text-underline-offset: 2px;
}

a.help:hover {
	text-decoration: none;
}

.info-tooltip {
	text-decoration: underline dotted var(--french-blue);
	text-underline-offset: 4px;
	background: white;
	border: none;
	padding: 0;
}

.verbstem[popovertarget] {
	anchor-name: --verbstem-anchor;
}

.cefr[popovertarget] {
	anchor-name: --cefr-anchor;
}

.delf[popovertarget] {
	anchor-name: --delf-anchor;
}

.defective[popovertarget] {
	anchor-name: --defective-anchor;
}

.left {
  padding-left: .75rem;
  margin-left: .25rem;
  clip-path: polygon(
    100% 0%,
    100% 100%,
    5px 100%,
    5px calc(50% + 5px),
    0% 50%,
    5px calc(50% - 5px),
    5px 0%
  );
}

.cefr[popover] {
	position-anchor: --cefr-anchor;
}

.delf[popover] {
	position-anchor: --delf-anchor;
}

.verbstem[popover] {
	position-anchor: --verbstem-anchor;
}

.defective[popover] {
	position-anchor: --defective-anchor;
}

.tooltip-content[popover] {
  position-area: right center;
  
  background: cornflowerblue;
  color: white;
  padding: 8px;
  border-radius: 4px;
}

p.tooltip-text {
	margin-bottom: 0;
}

/******************************** MODAL DIALOGS *******************************/

.modal-header {
	background-color: var(--literary)
}

.modal-footer {
	background-color: var(--slang);
}

/************************************ ICONS ***********************************/

img.icon {
	margin: 0px 12px;
}

img.icon:hover {
	opacity: 50%;
}
