/* Main Font */
@font-face {
  font-family: "MainFont";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./fonts/mainfont.woff2") format("woff2"),
    url("./fonts/mainfont.woff") format("woff");
}

/* courier-prime-regular - latin */
@font-face {
  font-family: "Courier Prime";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./fonts/courier-prime-v7-latin-regular.woff2") format("woff2"),
    url("./fonts/courier-prime-v7-latin-regular.woff") format("woff");
}




* {
  box-sizing: border-box;
}

html {
  overflow-y: scroll;
  scroll-behavior: smooth;
  font-size: 18px;
}

body {
  padding: 0;
  margin: 0;
  color: rgba(44, 44, 44, 0.8);
  background-color: rgba(255, 255, 0, 0.15);
  line-height: 1.6rem;
  font-family: 'Courier Prime', 'Courier New', monospace;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.6rem;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.container textarea {
  display: block;
  width: 100%;
}

.controlGroup {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  background-color: rgba(170, 239, 170, 1);
  border-left: 1px solid #999;
  border-right: 1px solid #999;
  padding: 4px 0;
}


#yearInput,
#century {
  width: 90px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid #cfd6e4;
  font-family: inherit;
  font-weight: 700;
  font-size: 16px;
  text-align: center;
  outline: none;
  appearance: number-input;
  -moz-appearance: number-input;
}

/* WebKit/Blink */
#yearInput::-webkit-inner-spin-button,
#yearInput::-webkit-outer-spin-button,
#century::-webkit-inner-spin-button,
#century::-webkit-outer-spin-button {
  opacity: 1;
  margin: 0;
}

#yearInput:focus,
#century:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, .18);
}


#nowBtn,
#expandBtn,
#copyBtn,
#btnPDF {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #999;
  border-radius: 4px;
  background-color: #fff;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 24px 24px;
  cursor: pointer;
  font-size: 0; /* Text unsichtbar */
}

#expandBtn {
  color: #2789CB;
  font-family: inherit;
  font-size: 24px;
  font-weight: 700;
  cursor: pointer;
  box-sizing: border-box;
}

#nowBtn {
  background-image: url("../imgs/btn_now.png");
}

#copyBtn {
  background-image: url("../imgs/btn_copy.png");
}

#copyBtn.copied {
  background-image: url("../imgs/btn_ok.png");
}

#btnPDF {
  background-image: url("../imgs/btn_print.png");
}

#nowBtn:active,
#expandBtn:active,
#copyBtn:active,
#btnPDF:active {
  transform: scale(0.92);
}



textarea {
  width: 100%;
  min-width: 900px;
  height: 44vh;
  box-sizing: border-box;
  resize: vertical;
  font-family: 'Courier Prime', 'Courier New', monospace;
  font-size: 16px;
  font-weight: 700;
  padding: 0.5rem;
  background-color: rgba(156, 193, 241, 0.15);
  border: 1px solid #999;
}


/* ----- Checkbox ----- */
label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-family: 'Courier Prime', 'Courier New', monospace;
}

/* Native Checkbox behalten (mit Häkchen), nur größer machen */
input#decHRS[type="checkbox"] {
  width: 22px;
  height: 22px;
  transform: translateY(0);
  cursor: pointer;
  margin: 0;
  vertical-align: middle;
}

input#decHRS[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(59, 130, 246, .35);
  outline-offset: 3px;
  border-radius: 4px;
}

#phaseCnt {
  margin-left: 20px;
  margin-right: 10px;
  font-weight: bold;
}

.checkLabel {
  margin-left: 15px;
}

#firstSunday {
  font-family: inherit;
  width: 90px;
  height: 22px;
  padding: 0 8px;
  line-height: 22px;
  box-sizing: border-box;
  margin-right: 30px;
  vertical-align: middle;
}

#diagram {
  padding: 10px;
  margin-top: 6px;
  font-family: 'Courier Prime', 'Courier New', monospace;
  white-space: pre;
  line-height: 1.2;
  font-size: 18px;
  text-align: left;
  border: 1px solid #999;
}

#diagram .year {
  display: inline-block;
  width: 2.4em;
  text-align: center;
}

#diagram .day {
  display: inline-block;
  width: 1.5em;
  height: 1.5em;
  line-height: 1.5em;
  text-align: center;
  vertical-align: middle;
  border: 1px solid #ddd;
  padding-top: 1px;
}

#diagram .month {
  display: inline-block;
  width: 2.4em;
  font-weight: bold;
}

#diagram .five {
  color: #d32f2f;
  font-weight: bold;
}

#diagram .three {
  color: #1976d2;
  font-weight: bold;
}

#diagram .day.sunday {
  background-color: rgba(255, 0, 0, 0.1);
}

#diagram .day.easter {
  border: 1px solid #008000;
  background-color: rgba(0, 128, 0, 0.2);
}

#diagram .tooltip {
  position: relative;
  cursor: default;
}

#diagram .tooltip::after {
  content: attr(data-tip);
  white-space: pre;
  position: absolute;
  left: 50%;
  bottom: 140%;
  transform: translateX(-50%);
  background: #333;
  background: rgba(48, 48, 48, 0.9);
  color: white;
  padding: 6px 10px;
  border-radius: 5px;
  font-family: 'Courier Prime', 'Courier New', monospace;
  font-size: 14px;
  font-weight: normal;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 100;
}

#diagram .tooltip::before {
  content: "";
  position: absolute;

  left: 50%;
  bottom: 80%;

  transform: translateX(-50%);

  border-width: 8px;
  border-style: solid;
  border-color: rgba(48, 48, 48, 0.9) transparent transparent transparent;
  /* border-color: red transparent transparent transparent; */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;

  z-index: 101;
}

#diagram .tooltip:hover::after,
#diagram .tooltip:hover::before {
  opacity: 1;
}

.credit {
  font-family: inherit;
  font-weight: 400;
  font-size: 14px;
  text-align: left;
}


/* ========== Headings ========== */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Courier Prime', 'Courier New', monospace;
  font-weight: 400;
  line-height: 1.5;
  color: rgba(44, 44, 44, 0.8);
  padding: 10px 0 0 1rem;
}

h1 {
  font-size: 2.1rem;
  font-weight: 700;
  background-color: rgba(0, 0, 255, 0.1);
  border-bottom: 1px solid #999;
  border-radius: 5px 5px 0 0;
}

h2 {
  font-size: 1.74rem;
  font-weight: 700;
  border-bottom: 1px solid #999;
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 5px 5px 0 0;
  padding: 0.5rem 0 0 1rem;
  margin: 0;
}

h3 {
  font-size: 1.45rem;
  margin: 0;
  letter-spacing: -1px;
  background-color: rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid #999;
  border-radius: 5px 5px 0 0;
}

h4 {
  font-size: 1.32rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
  background-color: rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid #999;
  border-radius: 5px 5px 0 0;
}

h5 {
  font-size: 1.2rem;
  margin-top: 1rem;
  background-color: rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid #999;
  border-radius: 4px 4px 0 0;
  padding: 6px 0 0 1.5rem;
}

code {
  font-weight: 700;
}

a {
  color: #900;
  background: rgba(255, 255, 255, 0.25);
  padding: 0 0.4rem 2px;
  text-decoration: none;
}

a:hover {
  background: rgba(255, 255, 255, 0.7);
}

ul {
  padding-left: 20px;
}

img {
  padding: 3px;
  /* border: 1px solid #999; */
}



/* ========== Astro Header ========== */
.headerdiv {
  padding: 0;
  height: 88px;
  border-bottom: 1px solid #999;
  background-color: #f5deb3;
}

.headerh {
  padding-top: 6px;
  margin: 0;
  border: none;
  background-color: transparent;
}

.logoimg {
  float: left;
  margin: 4px 1rem 4px 4px;
  border: none;
  width: 80px;
  height: auto;
}

.logoimg::after {
  clear: both;
}

.subhead {
  font-size: 18px;
  margin-top: -15px;
}

.subhead a {
  color: inherit;
  text-decoration: underline;
}

/* ============================== */


#diagram .moonIcon {
  width: 1.5em;
  height: 1.5em;
  vertical-align: middle;
}


@media only screen and (max-width: 650px) {
  .headerh {
    font-size: 1.5rem;
  }
}