/* 
COPYRIGHT-HINWEIS: Dieser Code ist geistiges und zivilrechtliches Eigentum von:
Daniel Wohlers, Kreisstraße 11a, 77749 Hohberg
Alle nicht genehmigten Verwendungen stellen einen Verstoß gegen das Urheberrecht dar und werden zur Anzeige gebracht.
Alle Rechte vorbehalten. (c) Daniel Wohlers - 2026
*/

* {                                     /* --> für ALLE Elemente */
    margin: 0; 
    padding: 0; 
    box-sizing: border-box;
}

.grid_container {
    display: grid;
    grid-template-areas:
        "area1"
        "area2"
        "area3";
    grid-template-rows: auto 1fr auto;
    background-color: white;
    gap: 2px;                           /* vertikaler Abstand der grid-template-rows  */
    min-height: 100vh;
}

.grid_container > * {                   /* --> für ALLE Grid-Container-Inhalte */
    background-color: white;
    font-family: 'VT323', monospace;
    text-align: left; 
    padding: 10px;                      /* Abstand der Grid-Container-Inhalte zum Rand */
}

.area1 { 
    grid-area: area1;
    background-color: #ccc;
    font-size: 30px;
    display: flex;                      /* Mit aktiviertem flex können die Inhalte horizontal links, mittig, rechts angeordnet werden */
    justify-content: space-between;     /* Titel links, Logo rechts */
    align-items: center;                /* Vertikal zentrieren */
}

.logo {
    display: flex;
    justify-content: flex-end;         /* Inhalt der Logo-Box nach rechts */
    align-items: center;
}

.logo img {
    max-height: 40px;
}

.area2 { grid-area: area2; }

.container {
    background: white;
    padding: 20px;                      /* Abstand der Container-Inhalte zum Rand */
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    margin-bottom: 10px;                /* Lücke zwischen den Containern */
}

.container_div_nebeneinander {
    display: flex;                      /* Mit aktiviertem flex können die Inhalte horizontal links, mittig, rechts angeordnet werden */
    align-items: flex-start;            /* Vertikal zentrieren */
}

.container_div_nebeneinander > div {
    margin-right: 50px;
}

.area3 {                                /* = Footer */
    grid-area: area3; 
    background-color: #ccc;
    padding: 20px;
}

.footer-links a {
    color: black;
    text-decoration: none;
}

input {
    width: 250px;
    height: 25px;
    margin-bottom: 10px;
}

input[type="radio"],
input[type="checkbox"] {
    width: 18px;
    vertical-align: middle;
}

label {
    display: inline-block;
    width: 200px;
    margin-bottom: 10px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;        /* Text beginnt oben */
    justify-content: flex-start;    /* Alles nach links */
    text-align: left;               /* Text linksbündig */
    gap: 10px;                      /* Abstand zwischen Checkbox und Text */
}

select {
    width: 250px;
    height: 25px;
    margin-bottom: 10px;
}

button {
    cursor: pointer; 
    border-color: #ccc;
    border-radius: 4px; 
    width: 160px; 
    height: 35px; 
    margin-bottom: 10px;            /* vertikaler Abstand zwischen den Button-Reihen */
}

.button_blue {background: lightblue;}
.button_grey {background: lightgrey;}
.button_red {background: lightcoral;}
.button_green {background: lightgreen;}
.button_yellow {background: lightyellow;}

.button_mini {
    width: 35px; 
    height: 35px;
    background: lightyellow;
    margin-bottom: 0px;
}

.button_schmal {
    width: 80px; 
    height: 35px;
    margin-bottom: 0px;
}

.button_pic {
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid #ccc;     /* dünner schwarzer Rand */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.button_pic img {
    width: 90%;
    height: 90%;
    object-fit: contain;            /* Bild passt sich sauber an */
}

table {
    border-collapse: collapse; 
    table-layout: auto;
    width: auto; 
    min-width: max-content;
}

thead {
    background-color: lightcyan; 
    position: sticky; 
    top: 0; 
    z-index: 1000;
}

th, tr, td {
    border-collapse: collapse; 
    padding: 5px; 
    text-align: left;
    border: 1px solid black; 
}

th {
    white-space: nowrap;
}

td {
    min-height: 30px;
    white-space: normal;
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.55);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.popup-box {
    background: #fff;
    padding: 25px 30px;
    border-radius: 12px;
    width: 350px;
    max-width: 90%;
    box-shadow: 0 8px 25px rgba(0,0,0,0.25);
    animation: popupFadeIn 0.25s ease-out;
}

.popup-box h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #c0392b;
}

.popup-close {
    margin-top: 15px;
    width: 100%;
    padding: 10px;
    background: #c0392b;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

@keyframes popupFadeIn {
    from { transform: scale(0.9); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

table td input[type="text"],
table td input[type="date"],
table td input[type="number"],
table td select {
    width: 100%;
    height: 100%;
    border: none;
    padding: 4px;
    font-size: 16px;
    margin: 0;
    box-sizing: border-box;                 /* verhindert Überlauf */
}

table td {
    position: relative;                     /* notwendig für absolute Zentrierung */
    padding-left: 5px;
    /*padding: 0;                             /* wichtig: sonst entsteht ein Rand */
}

table td input[type="checkbox"] {
    width: 18px;
    height: 18px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);       /* horizontale + vertikale Zentrierung */
}

table td button {
    margin-bottom: 0px;
}

.cookie-banner {
  position: fixed; 
  bottom: 0; 
  left: 0; 
  right: 0;
  background: #fff; 
  padding: 20px; 
  border-top: 2px solid #ccc;
  z-index: 9999; 
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.cookie-group label { 
    display: block; 
    margin: 5px 0; 
    width: 800px !important;
}

.cookie-buttons button { 
    margin-right: 10px; 
    padding: 10px 15px; 
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 10px;
}

.app-card {
    background: #f5f5f5;
    border: 1px solid #d0d0d0;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.app-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 12px;
}

.app-expire {
    font-size: 14px;
    margin-bottom: 15px;
    color: #333;
}

.expire-soon {
    color: red;
    font-weight: bold;
}

.qr-code {
    width: 250px;
    height: auto;
}

.pdf-frame {
    width: 100%;
    height: 600px;
    border: 1px solid #ccc;
    display: none;
}

#previewFrame {
    display: none;                  /* Vorschau standardmäßig versteckt */
    width: 100%;
    height: 600px;
    border: 1px solid #ccc;
}

#closePreviewBtn {
    display: none;
    margin-top: 10px;
}

.preview-container {
    margin-top: 20px;
}