body {
	margin: 0px;
	padding: 0px;
	font-family: "Open Sans", sans-serif;
	font-size: 0.9em;
	background-color: rgb(248,248,248);
}

/* nav bar styles */
#navbar {
    min-height: 48px;
    background-color: rgb(150,200,255);
    padding: 0 40px; /* same as page content */
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}
#navbar a {
    color: white;
}
#navTitle {
	margin-right: 1em;
    max-width: 65%;   /* o el valor que prefieras */
    white-space: normal; /* permite saltos de línea */
    word-wrap: break-word; /* fuerza el quiebre si es necesario */
}
#navTitle a {
    font-weight: 700;
    font-size: 1.6em;
    text-decoration: none;
}
#navSubtitle {
    font-weight: 600;
    font-size: 0.7em !important;
    margin-left: 0.5em;
    color: white;
    white-space: normal;
    word-wrap: break-word;
    font-family: "Open Sans", sans-serif;
    display: inline-block;
}
#navLinks {
    margin-top: 0.3em;
    margin-right: 0px;
    margin-bottom: 0.3em;
    margin-left: -.4em; /* offset padding */
    text-align: center;
}
#navLinks a {
    margin-right: 1.2em;
    font-size: 1.2em;
    font-weight: 600;
	text-decoration: none;
	padding: .1em .4em;
}
#navLinks a:last-child {
	margin-right: 0;
}
#navLinks a:hover {
	background-color: rgb(119,156,200);
}
#navLinks a.active {
	text-decoration: underline;
}

/* margin for all pages */
.content {
	margin-top: 20px;
	margin-left: 40px;
	margin-right: 40px;
	margin-bottom: 50px; /* space for footer plus extra whitespace */
}

#leftPanel {
	width: 350px;
	position: fixed;
	overflow-x: hidden;
	overflow-y: auto;
	height: calc(100% - 88px); /* Minus the navBar and the footer. */
	background-color: rgb(248,248,248);
}

footer {
    width: 100%;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background-color: rgb(150,200,255);
    color: white;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.localeSelector {
    margin: 0 1em;
    padding: .2em;
    border-style: none;
    border-radius: 4px;
    background-color: #e0efff;
    color: black;
}

audio {
	width: 100%;
	position: fixed;
	left: 0; /* Spans the entire page. */
	bottom: 40px; /* Directly above the footer bar. */
	display: block;
}

#hidden {
	display: none;
}
/*	MAIN.CSS
	->	Text Display
		General */
table.gloss {
	display: inline;
	padding-right: 9px;
}

.topRow {
	font-family: 'EB Garamond', serif;
	font-size: 14pt;
	font-style: italic;
	line-height: 28px;

}
td {
	padding-left: 4px;
	padding-right: 4px;
	max-width: 800px;   /* o el ancho que tú quieras */
    white-space: normal;
	overflow-wrap: break-word;
}
tr[data-tier="Transcripción"] td {
	max-width: 800px;   /* o el ancho que tú quieras */
    white-space: normal;
	overflow-wrap: break-word;
}
tr[data-tier="Traducción"] td {
	font-family: 'EB Garamond', serif;
	font-size: 13pt;
	padding-top: 11px;
	max-width: 800px;   /* o el ancho que tú quieras */
    white-space: normal;
	overflow-wrap: break-word;
	line-height: 25px;
}
tr[data-tier="Notas"] td {
	padding-top: 30px ;
	font-size: 10pt;
	max-width: 700px;   /* o el ancho que tú quieras */
    white-space: normal;
    overflow-wrap: break-word;
}

tr[data-tier="Notas"] td[colspan="1"]:empty {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
    line-height: 0.8; /* reduce altura visual */
    height: 50%;      /* la mitad */
}
/*	MAIN.CSS
	->	Text Display
		Timed */

#video {
	width: 40vw; /* an attempt to avoid flickering scrollbar glitch */
    outline: none;
}

#centerPanel {
	position: fixed;
	margin-left: 500px;
	width: calc(100% - 500px);
	height: calc(100% - 88px); /* Minus the navBar and the footer. */
	overflow-y: auto;
	overflow-x: hidden;
}

.labeledTimeBlock {
	clear: both;
	float: left;
	display: grid;
	grid-template-columns: 0.7fr 7fr;
	padding-top: 18px;
	padding-bottom: 18px;
	width: 100%;
	border-top: black 0.2px solid;	
}

.timeBlock {
	float: left;
	padding-left: 9px;
	overflow-x: auto;
}

/*	MAIN.CSS
	->	Text Display
		Untimed */
#untimedTextDisplay {
	position: fixed;
	width: calc(100% - 500px);
	height: calc(100% - 88px); /* Minus the navBar and the footer. */
	overflow-y: scroll;
	overflow-x: hidden;
}

.untimedBlock {
	clear: both;
	float: left;
	display: grid;
	grid-template-columns: 0.7fr 7fr;
	padding-top: 18px;
	padding-bottom: 18px;
	width: 100%;
	border-top: black 0.2px solid;	
}

.latexButton {
	visibility: hidden;
	margin-left: 3%
}

.timeBlock:hover .latexButton {
	display: block;
	visibility: visible;
}

.untimedBlock:hover .latexButton {
	display: block;
	visibility: visible;
} 

.latexButtonContainer {
	grid-column-start: 1;
	grid-column-end: 3;
}

.tierSelectionSection {
	background : rgb(212, 234, 247);
	padding-bottom: 5%;
	padding-left: 5%;
	padding-right: 5%;
	padding-top: 5%; 
}

.tiersHeaderSection, .tierSelectionRow {
	display: grid;
	grid-template-columns: 1fr 8fr;
	justify-self: center;
	padding: 5px;
}

.tiersHeader, .tierSelectionRowButtonSection {
	display: flex;
	flex-direction: row;
	margin: 5px;
	justify-content: space-evenly;
}

.tierHeaderName {
	margin: 5px;
	width: 100%;
}

.latexResultContainer {
	overflow-x: scroll;
}

#latexFormatterConfirmButton,   
#latexFormatterCloseButton {
	background-color: white;
	border-radius: 4px;
	transition-duration: 0.2s;
}

#latexFormatterConfirmButton:hover {
	background-color: #4CAF50;
	color: white;
}
  
#latexFormatterCloseButton {
	margin-bottom: 3%;
	margin-top: 3%;
}

#latexFormatterCloseButton:hover {
	background-color: #f44336;
	color: white;
}

.timeStamp {
    display: inline-flex;      /* o flex */
    justify-content: center;   /* centro horizontal */
    align-items: center;       /* centro vertical */

    margin-left: 9px;
    padding: 8px 9px 5px;
    min-width: 46px;
    font-weight: 800;
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.searchSentence {
	background-color: white;
	margin: 10px;
	padding: 5px;
	border-width: 3px;
	border-style: solid;
	border-color: rgb(100, 100, 100);
	border-radius: 5px;
	overflow-x: auto;
}

.labeledSentence {
    display: flex;
    align-items: center;       /* centra vertical */

    white-space: nowrap;
    padding: 5px 0 5px 10px;
}

.speakerLabel {
	float: left;
	margin-top: 3px;
	font-weight: 600;
    display: none;
}

.searchPageButton {
	margin-right: 1%;
}


table.gloss {
	padding-left: 5px;
}

/*	MAIN.CSS
	->	Settings */

ul {
	list-style: none;
	-webkit-padding-start: 0px;
	-webkit-margin-before: 0.2em;
	padding-inline-start: 0px;
	margin-block-start: 0.2em;
}

#settings ul {
	margin-left: 10px;
	list-style: none;
}

#title {
	font-size: 1.5em;
	padding-left: 20px;
	padding-right: 20px;
	font-style: italic;
	font-weight: 700;
	font-size: 1.7em;
    margin-bottom: 0;

}
.subtitle {
	margin-top: 0;
    margin-bottom: 0;
	padding-left: 20px;
	padding-right: 20px;
	font-weight: 600;
	font-size: 1.2em;
}

a:visited, a {
	color: black;
}

.content a:hover {
	font-weight: 600;
}

@font-face {
    font-family: 'Open Sans';
    font-weight: 400;
}
@font-face {
    font-family: 'Open Sans';
    font-weight: 600;
}
@font-face {
    font-family: 'Open Sans';
    font-weight: 700;
}

.hidden {
	display: none;
}

.minibarTabs {
	list-style: none;
	float: left;
	width: 100%;
	border-top: 2px solid rgb(151,151,151);
	border-bottom: 2px solid rgb(151,151,151);
	background: white;
/*	padding-left: 2%;
	padding-right: 2%;*/
}

.minibarTabs > li {
	float: left;
	width: 33.3333%;
	text-align: center;
}

.minibarTabs > li > a {
	height: 30px;
	display: block;
	padding: 5px 0px;
}

.minibarTabs > li:hover {
	background-color: lightsteelblue;
}

.minibarTabs > li.active {
	background-color: steelblue;
}

.minibarTabs > li > a > img {
	height: 30px;
}

.miniPage.hide {
    display: none;
}

.miniPage.active {
    display: block;
}

#miniPage {
	margin: 20px 20px;
}

#metadata p {
    text-align: justify;
}

#speakerList ul {
	margin-left: 17px;
	list-style: square;
}

video {
	display: none;
}

#indexTable {
	text-align: center;
}
.loader {
	display: flex;
	justify-content: center;
	align-items: center;
	height: 10em;
}
.dt-center {
  text-align: center !important;
}
/* Layout overrides for wider left panel */
#leftPanel {
	width: 350px !important;
}
#centerPanel {
	margin-left: 350px !important;
	width: calc(100% - 350px) !important;
}
#indexTable_filter {
    display: none !important;
}

/* Responsive adjustments for mobile devices (max-width: 767px)
   Organized: layout, media, blocks, typography, misc */
@media (max-width: 767px) {
	/* Layout & navbar */
	#navbar { padding: 6px 12px; justify-content: center; text-align: center; }
	#navTitle { max-width: 100%; margin-right: 0; text-align: center; }
	#navTitle a { font-size: 1.2em; }
	#navSubtitle { display: none !important; }
	#navLinks { width: 100%; margin-top: 0.2em; margin-left: 0; text-align: center; }
	#navLinks a { margin-right: .6em; font-size: 1em; padding: .15em .35em; }

	/* Page spacing */
	.content { margin: 12px; }

	/* Panels: left stacks, center becomes full-width */
	#leftPanel { position: relative; width: 100% !important; height: auto !important; overflow: visible; border-bottom: 1px solid #e0e0e0; }
	#centerPanel, #untimedTextDisplay {
		position: relative;
		margin-left: 0 !important;
		width: 100% !important;
		height: calc(100% - 140px);
		padding-bottom: calc(48px + env(safe-area-inset-bottom, 0px) + 80px);
		scroll-padding-bottom: calc(48px + env(safe-area-inset-bottom, 0px) + 80px);
	}

	/* Media (video/audio) */
	#video { width: 100vw; max-width: 100%; }
	video { display: block; width: 100%; }
	audio { position: fixed; left: 0; bottom: 48px; width: 100%; box-sizing: border-box; padding: 0 8px; }

	/* Blocks stacking */
	.labeledTimeBlock, .untimedBlock { display: block; grid-template-columns: 1fr; padding: 12px 0; border-top-width: .5px; }
	.timeBlock { float: none; padding-left: 6px; overflow-x: auto; }

	/* Typography */
	.topRow { font-size: 1.05em; line-height: 1.4; }
	td { font-size: 1.00em; }
	.subtitle, .searchSentence { font-size: 0.95em; }

	/* Small UI tweaks */
	.speakerLabel { display: none; }
	footer { height: 48px; justify-content: center; }
	.minibarTabs > li { width: 50%; }

	/* Timestamps: hide on mobile (covers common classes and timed spans) */
	.timeStamp, .timeStampContainer, #timedTextDisplay span[class*="time"] { display: none !important; }
}
