:root {
  --font-color: black;
  --sub-color: navy;
  --principal-color: darkred;
  --rubric-color: red;
  --bg-color: ivory;
  --bg-softcolor: palegoldenrod;
  --bg-softcolor-50: rgb(238,232,170,0.5);
  --subhead-color: #302AE6;
  --secondary-color: #536390;
  --heading-color: #292922;
  --toolbar-bg-color: black;
  --toolbar-color: white;
  --border-color: silver;
  --tab-border-color: silver;
  --tab-text-color: black;
  --tab-bg-color: lightgray;
  --tab-active-bg-color: silver;
  --tab-hover-bg-color: gray;
  --greyedtext-color: gray;
}

[data-theme="dark"] {
  --font-color: white;
  --sub-color: cyan;
  --principal-color: goldenrod;
  --rubric-color: peru;
  --bg-color: black;
  --toolbar-bg-color: gray;
  --toolbar-color: black;
  --subhead-color: cornflowerblue;
  --bg-softcolor: palegoldenrod;
  --bg-softcolor-50: rgb(238,232,170,0.5);
  --secondary-color: #536390;
  --heading-color: #292922;
  --border-color: silver;
  --tab-border-color: gray;
  --tab-text-color: white;
  --tab-bg-color: black;
  --tab-active-bg-color: gray;
  --tab-hover-bg-color: gray;
  --greyedtext-color: gray;
}

body {
  font-size: 15px;
  line-height: 1.3;
  /*font-family: Arial, Helvetica, sans-serif;*/
  font-family: Georgia, 'Times New Roman', Times, serif;
  margin: 5px;
  margin-top:0px;
  padding-bottom: 30px;
  background-color: var(--bg-color);
}

@media only screen and (min-width: 600px) {
  body {
    background-color: var(--bg-color);
  }

  div#container {
    /*limit to 600px wide and centre in viewport on screens > 600px effective*/
    width: 600px;
    margin: auto;
    background-color: var(--bg-color);
    color: var(--font-color);
    padding-bottom: 20px;
  }
}

div{
  background-color: var(--bg-color);
  color: var(--font-color);
}

nav.main-nav {
  background-color: var(--toolbar-bg-color);
  display: flex;
  justify-content: space-between;
  color: var(--toolbar-color);
  height: 40px;
  margin-left: -5px;
  margin-right: -5px;
}

nav.main-nav>div{
  background-color: var(--toolbar-bg-color);
  color: var(--toolbar-color);
}

nav.main-nav.stickynav{
  position:sticky;
  top:0;
}

div#menu-buttons {
  float: right;
  padding: 4px;
  margin: 1px 10px;
}

img.navhead {
  float: left;
  margin: 2px;
}

p.navheader {
  float: left;
  font-size: 25px;
  margin-top: 3px;
  margin-bottom: 3px;
}

div#today {
  clear: both;
}

p {
  margin-block-end: 0.5em;
  margin-block-start: 0.5em;
  margin-right: 4px;
}

p.liturgicalDay {
  font-variant: small-caps;
  margin-top: 0px;
  color: var(--sub-color);
}

p.feasttype {
  color: var(--principal-color);
  font-variant: small-caps;
  line-height: 1;
  font-weight: bold;
}

span.eve {
  font-size: 0.6em;
  color: var(--sub-color);
}

span.smallcaps {
  font-variant: small-caps;
}

span.ref {
  color: var(--sub-color);
  font-size: 0.8em;
}

h1.mainTitle {
  margin-bottom: 0px;
}

/*Captions for psalms and canticles*/
caption,
.caption {
  font-size: 1.2em;
  font-weight: bold;
  text-align: left;
  color: var(--principal-color);
  border-top: 1px var(--border-color) solid;
  padding-top: 5px;
}

h3.caption {
  font-size: 1.2em;
}

h4.caption {
  font-size: 0.9em;
  border-top: none;
}

span.subtitle {
  font-size: 0.9em;
  font-weight: normal;
  font-style: italic;

}

td.inset {
  padding-left: 25px;
}

p.antiphon1::before, p.antiphon2::before{
  content: "Antiphon:";
  color: var(--rubric-color);
}

p.rubric, td.rubric {
  border-top: 1px var(--border-color) solid;
  padding-top: 14px;
  color: var(--rubric-color);
  font-style: italic;
}

p.rubric-noborder {
  color: var(--rubric-color);
  font-style: italic;
}

/*Layout for psalms, gloria and canticles*/
p.psalm {
  margin-left: 2em;
}

td.chapter::first-letter, 
p.collect.firstline::first-letter,
p.psalm.chapter::first-letter{
  color: var(--principal-color);
  float: left;
  font-size: 2em;
  line-height: 1;
  font-weight: bold;
  margin-right: 5px;
  margin-left: 0em;
}

div.psalm p:first-of-type {
  margin-left: 0.5em;
}

div.psalm p:first-of-type::first-letter {
  color: var(--principal-color);
  float: left;
  font-size: 2em;
  line-height: 1;
  font-weight: bold;
  margin-right: 5px;
  margin-left: 0em;
}

p.lessonintro {
  font-size: 1.1em;
  margin-left: 0.5em;
}

p.lessonintro a{
  color: var(--sub-color);
}

p.psalm span.pNumber {
  margin-left: -2em;
  padding-right: 1em;
  font-size: 0.7em;
}

p.collect {
  margin-left: 1em;
  line-height: 20px;
}

p.gloria {
  margin-left: 2em;
  font-style: italic;
  color: var(--sub-color);
}

.speaker {
  vertical-align: top;
  font-weight: normal;
  font-style: italic;
  color: var(--principal-color);
  width: 5em;
  padding-right: 1em;
}

/* Table for responsorial sections */

td.text {
  vertical-align: top;
  font-weight: normal;
}

/* Tab content and buttons */
button.tablinks {
  border: 1px solid var(--tab-border-color);
  border-radius: 1px;
  padding: 5px;
  font-style: italic;
}

button.tablinks.active {
  background-color: var(--border-color);
}

.tabcontent {
  display: none;
}

.tabcontent.open {
  display: block;
}

/* Tabs */

.container--tabs .nav-tabs {
  float: left;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style-type: none;
  border-bottom: 1px solid var(--tab-border-color);
}

.container--tabs .nav-tabs>li {
  float: left;
  margin-bottom: -1px;
}

.container--tabs .nav-tabs>li>a {
  float: left;
  margin-right: 2px;
  line-height: 1.42857143;
  padding: 10px;
  border: 1px solid var(--tab-border-color);
  border-radius: 4px 4px 0 0;
  text-decoration: none;
  font-style: italic;
  color: var(--tab-text-color);
}

.container--tabs .nav-tabs>li>a:hover {
  border-color: var(--tab-border-color);
  background-color: var(--tab-bg-color);
}

.container--tabs .nav-tabs>li.active>a,
.container--tabs .nav-tabs>li.active>a:hover,
.container--tabs .nav-tabs>li.active>a:focus {
  cursor: default;
  background-color: var(--tab-active-bg-color);
  border: 1px solid var(--tab-border-color);
  border-bottom-color: transparent;
  font-style: normal;
}

.container--tabs .tab-content {
  /*float: left;*/
  width: 100%;
}

.container--tabs .tab-content>.tab-pane {
  display: none;
}

.container--tabs .tab-content>.tab-pane.active {
  display: block;
  padding: 0.5%;
  padding-top: 30px;

}

.container--tabs .tab-content>.active {
  display: block;
}

div.sample{
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  font-family: Georgia, 'Times New Roman', Times, serif;
}

div#settings {
  margin: 20px;
  padding: 2px;
  font-family: Arial, Helvetica, sans-serif;
 /* display: none;*/
}

div#settings h3{
  margin-top: 4px;
  margin-bottom: 4px;
  color: var(--principal-color);
}

div#settings section {
  margin-top: 5px;
  padding: 15px 4px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  background-color: var(--bg-color);
}

div.hidden{
  display: none;
}

.switchdiv {
  position: relative;
  padding-top: 8px;
  height: 35px;
}

.switchdiv .switch {
  position: relative;
  float: right;
  top: -5px;
  width: 60px;
  height: 34px;
  padding-top: -5px;
}

.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  -webkit-transition: .4s;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: var(--toolbar-color);
  -webkit-transition: .4s;
  transition: .4s;
}

input:checked + .slider {
  background-color: var(--principal-color);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--principal-color);
}

input:checked + .slider:before {
  -webkit-transform: translateX(26px);
  -ms-transform: translateX(26px);
  transform: translateX(26px);
}

/* Rounded sliders */
.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

.custom-select {
min-width: 250px;
position: relative;
margin-bottom: 15px;
}

.custom-select select {
appearance: none;
width: 100%;
font-size: 1.15rem;
padding: 0.675em 6em 0.675em 1em;
background-color: var(--bg-color);
border: 1px solid #caced1;
border-radius: 0.25rem;
color: var(--font-color);
cursor: pointer;
}

.custom-select::before,
.custom-select::after {
--size: 0.3rem;
content: "";
position: absolute;
right: 1rem;
pointer-events: none;
}

.custom-select::before {
border-left: var(--size) solid transparent;
border-right: var(--size) solid transparent;
border-bottom: var(--size) solid black;
top: 40%;
}

.custom-select::after {
border-left: var(--size) solid transparent;
border-right: var(--size) solid transparent;
border-top: var(--size) solid black;
top: 55%;
}

input.time-input{
  float: right;
  margin-right: 8px;;
  font-size: 1.15em;
}

button.sbtn {
  background-color: var(--toolbar-bg-color);
  color: var(--toolbar-color);
  font-size: 24px;
  font-weight: 400;
  margin-right: 15px;
  padding: 0;
  border: none;
}

button.textbuttons {
  background-color: var(--principal-color);
  color: var(--toolbar-color);
  font-size: 1.5em;
  height: 1.5em;
  width: 1.5em;
  float: right;
  margin-right: 5px;
  padding: 0;
  border: none;
}

button.hidden {
  display: none;
}

/* Place the page buttons bar at the bottom of the page, and make it stick */
div#pagebuttons {
  display: none;
  background-color: var(--bg-softcolor-50);
  overflow: hidden;
  position: fixed;
  margin: -5px;
  bottom: 0;
  width: 100%;
}

/* Style the links inside the navigation bar */
div#pagebuttons button {
  color: var(--toolbar-color);
  background-color: var(--toolbar-bg-color);
  text-align: center;
  padding: 8px 12px;
  text-decoration: none;
  font-size: 17px;
}

div#pagebuttons button.left_cpb {
  float: left;
}

div#pagebuttons button.right_cpb {
  float: right;
}

div#ordoheader{
  height: 45px;
  position: sticky;
  top: 40px;
  background: var(--bg-color);
  z-index: 1;
  padding:0px;
}

div#ordoheader h1{
  margin-top: 0;
  padding: 0;
  display: inline-block;
}

div#yearchanger {
  float: right;
  padding-top: 8px;
}

div#yearchanger button.sbtn {
  margin-left: 15px;
  background-color: var(--principal-color)
}

div#yearchanger span {
  font-size: 18px;
  font-weight: bold;
}

tr.lineabove{
  border-top: 1px solid var(--border-color);
}

tr.lineabove > td{
  padding-top: 8px;
}

table{
  border-collapse: collapse; 
}

table.ordo {
  border: 1px solid;
}

table.ordo th,
table.ordo td {
  border: 1px solid var(--principal-color);
  padding: 8px 3px;;
}

table.ordo th.stickyheader {
  background: var(--toolbar-bg-color);
  color:var(--toolbar-color);
  position: sticky;
  top: 84px;
}

span.line_main {
  font-weight: normal;
}

span.line_outranked {
  color: var(--greyedtext-color);
}

span.line_optional, .ltype_O {
  font-style: italic;
}

span.ltype_S {
  text-transform: uppercase;
  font-weight: bold;
}

span.ltype_s:not(.line_outranked) {
  font-weight: bold;
}

span.ltype_x {
  text-transform: uppercase;
  font-weight: bold;
  font-style: italic;
}

span.ltype_F, span.ltype_L{
  font-variant: small-caps;
}

div#psalmslist{
  text-align: center;
}

button.psalmbutton{
  width: 50px;
  padding: 5px;
  margin: 2px;
  background-color: var(--bg-color);
  color: var(--principal-color);
  border-color: var(--border-color);
}

button.psalmClose{
  float: right;
  width: 40px;
}

/*Accordion & panels*/
.accordion {
  background-color: var(--bg-color);
  
  font-family: Georgia, 'Times New Roman', Times, serif;
  color: var(--principal-color);
  font-size: 1.2em;
  font-weight: bold;
  cursor: pointer;
  padding: 18px;
  width: 100%;
  text-align: left;
  border: 1px solid var(--border-color);
  outline: none;
  transition: 0.4s;
}

.panel {
  display: none;
  overflow: hidden;
}

.accordion:after {
  content: '\02795'; /* Unicode character for "plus" sign (+) */
  font-size: 13px;
  color: #777;
  float: right;
  margin-left: 5px;
}

button.accordion.active:after {
  content: "\2796"; /* Unicode character for "minus" sign (-) */
}

/* Fontello icons */
@font-face {
  font-family: 'fontello';
  src: url('fontello.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}
[class^="icon-"]:before, [class*=" icon-"]:before {
  font-family: "fontello";
  font-style: normal;
  font-weight: normal;
  speak: never;
  display: inline-block;
  text-decoration: inherit;
  width: 0.9em;
  margin-right: .2em;
  text-align: center;
  font-variant: normal;
  text-transform: none;
  line-height: 1em;
  margin-left: .2em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--toolbar-color);
}
.icon-cog-outline:before { content: '\e800'; } /* '' */
.icon-ccw:before { content: '\e801'; } /* '' */
.icon-doc-text:before { content: '\f0f6'; } /* '' */
.icon-reply:before { content: '\f112'; } /* '' */
.icon-calendar-empty:before { content: '\f133'; } /* '' */
