﻿/*
 *  Event-Kalender (SQLite) - style.css (utf-8)
 * - https://werner-zenk.de
 */

/* Hauptfarben */
:root {
  --font-family: system-ui, -apple-system, "Segoe UI", "Roboto", "Ubuntu",
    "Cantarell", "Noto Sans", "Verdana", "Arial", sans-serif;
  --color: rgb(55, 55, 55);
  --bgcolor-even: rgba(250, 250, 250, 0.95);
  --bgcolor-odd: rgba(240, 240, 240, 0.95);
  --bgcolor-scheme: rgb(255, 255, 255);
  --highlight-color: rgb(34, 132, 230);
  --highlight-bgcolor: rgba(222, 238, 252, 0.95);
  --highlight-outlinecolor: rgb(100, 185, 255);
  color-scheme: light dark;
}

div#kalender {
  scroll-margin-top: 25px;
  min-height: 325px;
}

/* Tabelle */
table#tabelle {
  font-family: var(--font-family);
  font-size: clamp(0.9rem, 1vw, 1.1rem);     
  font-optical-sizing: Auto;
  color: var(--color);
  table-layout: Auto;
  border-collapse: Separate;
  border-spacing: 1px;
  width: 100%;
  z-index: 10;
  cursor: Default;
  user-select: none;
}

/* Tabelle (nth-child even/odd) */
table#tabelle th:nth-child(even) {
  background-color: var(--bgcolor-even);
}
table#tabelle th:nth-child(odd) {
  background-color: var(--bgcolor-odd);
}

table#tabelle td:nth-child(even) {
  background-color: var(--bgcolor-even);
}
table#tabelle td:nth-child(odd) {
  background-color: var(--bgcolor-odd);
}

table#tabelle th.spalten {
  text-align: Center !important;
  font-weight: normal;
  width: 14.285714%;
}

table#tabelle th.spalten:hover {
  color: var(--highlight-color);
}

table#tabelle td.eintag {
  vertical-align: top;
  height: 65px;
}

table#tabelle td.eintag:hover {
  color: var(--highlight-color);
}

table#tabelle td.keintag {
  color: rgb(184, 184, 184);
  vertical-align: top;
}

table#tabelle td.heute {
  border: Solid 1.5px var(--highlight-outlinecolor);
  border-radius: 3px;
  box-shadow: inset 0px 0px 3px 0px var(--highlight-outlinecolor);
}

table#tabelle th.woche {
  font-weight: normal;
  text-align: center;
  vertical-align: middle;
}

table#tabelle th.woche:hover {
  color: var(--highlight-color);
}

.zeigeWoche {
  display: none;
}

table#tabelle th#navigation {
  font-size: 1.3rem !important;
  text-align: center;
  white-space: nowrap;
  font-weight: normal;
  word-spacing: 10px;
  background-image: linear-gradient(var(--bgcolor-scheme), var(--bgcolor-odd));
}

table#tabelle td#menue {
  text-align: right;
  padding-right: 5px;
  background-image: linear-gradient(var(--bgcolor-odd), var(--bgcolor-scheme));
}

table#tabelle tr:hover {
  background-color: rgb(224, 224, 224);
}

/* Navigation */
.navLink {
  display: inline-block;
  padding: 1px 8px 1px 8px;
  transition: all 0.3s;
}

.navLink:hover {
  color: var(--highlight-color);
  background-color: var(--highlight-bgcolor);
  outline: Solid 1px var(--highlight-outlinecolor);
  cursor: pointer;
}

div#titelleiste > .navLink {
  padding: 5px 8px 5px 8px;
}

div#titelleiste > .navLink:hover {
  color: #ffffff;
  background-color: #d71526;
  border-top-right-radius: 5px;
  outline: 0px;
}

.keineAuswahl {
  padding: 1px 8px 1px 8px;
}

div#aktiv a:link,
div#aktiv a:visited {
  color: var(--highlight-color);
}

form#form {
  font-family: var(--font-family);
  font-size: clamp(1rem, 1.1vw, 1.2rem);
  font-optical-sizing: Auto;
  color: var(--color);
  background-color: var(--bgcolor-even);
  border-radius: 5px;
  outline: Solid 1px #999999;
  box-shadow: 0px 0px 15px 8px rgb(190 190 190 / 55%);
  position: absolute;
  z-index: 1500;
  user-select: none;
}

div#titelleiste {
  font-family: var(--font-family);
  font-size: 0.9rem;
  color: #000000;
  background-color: var(--highlight-bgcolor);
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
  border-bottom: Solid 0.1px rgba(155, 155, 155, 0.5);
  display: grid;
  grid-template-columns: 1.9fr 0.27fr;
  height: 20px;
  padding: 5px 0px 5px 10px;
  position: sticky;
  /* inset-block-start: -1; */
  top: -1px;
  cursor: move;
}

div.titel::before {
  content: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAAR0lEQVR42mNggIGqM//BGB3gEideA0yAWGy/8PZ/UjDD7asP/xMLQGrhGpbP3QjHMIDsFMo1UMVJ6GKUaSDaSTAA4uDDMHUA2DOWmpNPH+AAAAAASUVORK5CYII=");
  padding-right: 5px;
}

div#schliessen {
  font-size: 0.9rem;
  text-align: center;
  height: 20px;
  margin-top: -5px;
}

div#ueberschrift {
  font-family: var(--font-family);
  font-size: clamp(1.2rem, 1.3vw, 1.4rem);
  font-variant: small-caps;
  font-optical-sizing: Auto;
  color: var(--highlight-color);
  letter-spacing: 2px;
  text-align: center;
  user-select: text;
  cursor: default;
}

div#beschreibung {
  margin-bottom: 5px;   
  user-select: text;
  cursor: text;
  -ms-hyphens: Auto;
  -webkit-hyphens: Auto;
  hyphens: Auto;
}

div#formblock {
  padding: 10px;
  min-width: 330px;
  max-width: 650px;
  min-height: 125px;
  resize: both;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

p#submit {
  text-align: center;
}

div.event {
  font-family: var(--font-family);
  font-size: clamp(0.8rem, 1vw, 1.2rem);    
  padding: 2px;
  border-radius: 3px;
  box-shadow: 1px 1px 2px 0.5px #808080;
  margin: 0px 1px 3px 0px;
  /* -ms-hyphens: Auto;
  -webkit-hyphens: Auto;
  hyphens: Auto; */
  word-break: break-all;
  user-select: text;
  cursor: pointer;
}

form div.event {
  font-family: var(--font-family);
  font-size: clamp(1rem, 1.1vw, 1.2rem); 
  line-height: 22px;
  padding-left: 5px;
  cursor: text;
}   

figure :is(img, video) {
  display: block;
  max-width: 90%;
  height: Auto;
  object-fit: fill;
  border: Solid 1px #202020;
  border-radius: 5px;
  box-shadow: 5px 5px 5px #999999;
  cursor: default;
}

a:link.link,
a:visited.link {
  color: var(--highlight-color);
  word-break: break-all;
}

span.bbcode {
  cursor: help;
}

.aktivevent {
  box-shadow: 0px 0px 0px 2px var(--highlight-color) !important;
}

/* Monatsbilder */
div#monatsbild {
  height: 175px;
  background-size: Cover;
  box-shadow: inset 0px 0px 15px 0px #fff;
}

/* Formularfelder */
textarea {
  font-family: var(--font-family);
  margin-top: 3px;
  width: 100%;
  max-width: 98%;
  min-width: 320px;
  height: 120px;
  min-height: 120px;
  max-height: 450px;
}

input[type="text"],
input[type="password"],
input[type="date"],
input[type="time"],
input[type="checkbox"],
input[type="number"],
button[type="button"],
textarea,
select {
  border: Solid 1px #767676;
  font-family: var(--font-family);
  font-size: 1rem;
  caret-color: #ff0000;
}

:focus-visible {
  outline: Solid 1px var(--highlight-color);
}

button[type="button"]:hover {
  color: var(--highlight-color);
  background-color: var(--highlight-bgcolor);
  outline: Solid 1px var(--highlight-outlinecolor);
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--highlight-color);
}

input[type="checkbox"]:checked + label {
  color: var(--highlight-color);
}

input[type="checkbox"]:checked + label#delete {
  color: #ee0000;
}

input[type="checkbox"]:checked + label#copy {
  color: #00ac00;
}

input[type="text"].eventfeld {
  width: 270px;
}

input[type="number"] {
  width: 90px;
}

input[type="time"] {
  width: 82px;
}

label {
  transition: color 0.3s;
}

label:hover {
  color: var(--highlight-color);
}

summary {
  cursor: pointer;
  background-color: var(--bgcolor-odd);
  padding-left: 5px;
  border-radius: 3px;
  transition: color 0.3s;
}

summary:hover {
  color: var(--highlight-color);
}

summary::marker {
  color: var(--highlight-color);
}

/* Media */
@media screen and (max-width: 48rem) {
  table#tabelle td.eintag {
    height: 45px;
  }

  table#tabelle,
  div#aktiv form {
    font-size: 0.8rem;
  }

  table#tabelle th#navigation {
    font-size: 1.0rem !important;
  }

  span.abbrWochentag {
    display: None;
  }

  div.event {
    font-size: 0.6rem;
    line-height: 12px;
  } 
}


@media screen and (max-width: 992px) {
    div.event {
    font-family: var(--font-family);
    font-size: clamp(0.9rem, 0.9vw, 0.9rem);
    *line-height: 22px;
    *padding-left: 5px;
    cursor: text;
  }

  form div.event {
    font-family: var(--font-family);
    font-size: clamp(1.2rem, 1.2vw, 1.2rem);
    line-height: 22px;
    padding: 5px 5px 7px 5px;
    *padding-left: 5px;
    cursor: text;
  }
}

@media screen and (max-width: 768px) {
    div.event {
    font-family: var(--font-family);
    font-size: clamp(0.8rem, 0.8vw, 0.8rem);
    padding: 5px 5px 7px 5px;
    *line-height: 22px;
    *padding-left: 5px;
    cursor: text;
  }

  form div.event {
    font-family: var(--font-family);
    font-size: clamp(1.1rem, 1.1vw, 1.1rem);
    *line-height: 22px;
    *padding-left: 5px;
    cursor: text;
  }
}

@media screen and (max-width: 600px) {
  div#formblock {
    padding: 10px 10px;
    min-width: 260px;
    max-width: 260px;
    min-height: 150px;
    resize: both;
    overflow-x: hidden;
    overscroll-behavior: contain;
  }
  
    div.event {
    font-family: var(--font-family);
    font-size: clamp(0.7rem, 0.7vw, 0.7rem);  
    *line-height: 22px;
    *padding-left: 5px;
    cursor: text;
  }

  form div.event {
    font-family: var(--font-family);
    font-size: clamp(1.0rem, 1.0vw, 1.0rem);
    *line-height: 22px;
    *padding-left: 5px;
    cursor: text;
}
}

@media screen and (max-width: 350px) {
  table#tabelle,
  div#aktiv form {
    font-size: 0.93rem;
  }

  table#tabelle th#navigation {
    font-size: 0.93rem !important;
    text-align: center;
    white-space: nowrap;
    font-weight: normal;
    word-spacing: 0px;  
    margin: 0px -10px 0px -10px;
    background-image: linear-gradient(var(--bgcolor-scheme), var(--bgcolor-odd));
  }  
  
  /* Navigation */
  .navLink {
    display: inline-block;
    padding: 1px 7px 1px 7px;
    transition: all 0.3s;
  } 
 
  div#formblock {
    padding: 10px 10px;    
    min-width: 220px;
    max-width: 220px;
    min-height: 150px; 
    resize: both;
    overflow-x: hidden;
    overscroll-behavior: contain;
  }  

  div#ueberschrift {
    font-family: var(--font-family);
    font-size: clamp(1.1rem, 1.1vw, 1.1rem);
    font-variant: small-caps;
    font-optical-sizing: Auto;
    color: var(--highlight-color);
    letter-spacing: 2px;
    text-align: center;
    user-select: text;
    cursor: default;
  }

  div#beschreibung {
    margin-bottom: 5px;
    font-size: clamp(0.9rem, 0.9vw, 0.9rem);
    user-select: text;
    cursor: text;
    -ms-hyphens: Auto;
    -webkit-hyphens: Auto;
    hyphens: Auto;
  }
 
  div.event {
    font-family: var(--font-family);
    font-size: clamp(0.6rem, 0.6vw, 0.6rem);
    padding: 1px 2px 1px 1px;
    *line-height: 22px;
    *padding-left: 5px;
    cursor: text;
  } 
  
  form div.event {
    font-family: var(--font-family);
    font-size: clamp(0.9rem, 0.9vw, 0.9rem);     
    *line-height: 22px;
    *padding-left: 5px;
    cursor: text;
  } 
}


@media screen and (min-width: 90rem) {
  table#tabelle td.eintag {
    height: 85px;
  }
  div.event {
    line-height: 20px;
  }   
}

@media screen and (min-width: 135rem) {
  table#tabelle td.eintag {
    height: 110px;
  }
}

@media screen and (min-width: 156rem) {
  table#tabelle td.eintag {
    height: 135px;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --color: rgb(245, 245, 245) !important;
    --bgcolor-even: rgba(0, 0, 0, 0.9);
    --bgcolor-odd: rgba(61, 61, 61, 0.9);
    --bgcolor-scheme: rgb(18, 18, 18);
  }

  div.event {
    box-shadow: 1px 1px 2px 0px #ffffff;
  }
}

/* Wochentag hervorheben */
td[data-wochentag="Samstag"],
td[data-wochentag="Sonntag"] {
  background-color: #ffcece !important;
}

/** Tag hervorheben
td[data-tag="05.07.2022"],
td[data-tag="25.07.2022"] {
  background-color: #c6e3fd !important;
}

** Tag mit einem Bild hervorheben
td[data-tag="07.07.2022"] {
  background-image: url("img/bild.png");
  background-size: Cover;
}

** Tag mit einem Farbverlauf (Querstreifen) hervorheben
td[data-tag="28.07.2022"] {
  background-image: repeating-linear-gradient(45deg, Lightsteelblue, Lightsteelblue 5px, White 5px, White 10px);
}

** Wochentag hervorheben
td[data-wochentag="Samstag"],
td[data-wochentag="Sonntag"] {
  background-color: #ffcece !important;
} 

** Woche hervorheben
tr[data-woche="1"],
tr[data-woche="29"] {
  outline: Solid 2px #11d100;
}
*/