/* Standard Body-Styles für die Seite */
body {
    font-family: 'Arial', sans-serif;
    max-width: 600px;
    margin: auto;
    padding: 1rem;
    background-color: #f0f2f5;
    color: #333;
}


/* ---------------------------------- */
/* --- Haupt-App Layout --- */
/* ---------------------------------- */
#main-app {
    display: none;
}

.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    /* Add padding to the left to account for the burger menu */
    padding-left: 60px; /* Adjust this value as needed */
    position: relative; /* Needed for z-index to work against fixed elements */
    z-index: 0; /* Lower z-index than the burger menu */
}

.user-info {
    font-weight: bold;
    color: #333;
    font-size: 1rem;
}

#logout-button {
    background: #ff6347;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}

#logout-button:hover {
    background: #e5533d;
}

/* ---------------------------------- */
/* --- Kalender Navigation --- */
/* ---------------------------------- */
#kalendername{
    font-weight: bold;
    font-size: 1.125rem;
    min-width: 150px;
    text-align: center;
}

#monat-navi {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

#monat-navi button {
    font-size: 1.5rem;
    cursor: pointer;
    background: none;
    border: none;
    user-select: none;
}

#monat-anzeige {
    font-weight: bold;
    font-size: 1.125rem;
    min-width: 150px;
    text-align: center;
}

#calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.3125rem;
}

.calendar-day-header {
    font-weight: bold;
    text-align: center;
    padding: 0.3125rem 0;
    color: #555;
}

.calendar-day {
    text-align: center;
    padding: 0.625rem 0;
    border-radius: 5px;
    user-select: none;
}

.calendar-day.empty {
    background: transparent;
}

.calendar-day.active {
    background-color: #a3d8f4;
    cursor: pointer;
    transition: background-color 0.2s;
}

.calendar-day.active:hover {
    background-color: #7cc0e8;
}

.calendar-day.inactive {
    color: #999;
    background-color: #e0e0e0;
}

.calendar-day.pastactive {
    background-color: #def2fd;
    cursor: pointer;
    transition: background-color 0.2s;
}

/* ---------------------------------- */
/* --- Upload Formular --- */
/* ---------------------------------- */

.upload-container {
    display: flex; /* Macht den Container zum Flex-Container */
    justify-content: center; /* Zentriert den Inhalt (den Button) horizontal */
    align-items: center; /* Zentriert den Inhalt (den Button) vertikal, falls der Container Höhe hat */
    width: 100%; /* Stellt sicher, dass der Container die volle Breite einnimmt */
    /* Optional: Füge hier einen oberen Abstand hinzu, wenn der Button vom Kalender abgesetzt werden soll */
    margin-top: 40px;
}

.upload-container form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px; /* 24px - Erhöht, um mehr Platz zwischen den Elementen zu schaffen */
}

/* Stellt sicher, dass das Label, die Textarea und der Button die volle Breite einnehmen */
.custom-file-button,
.upload-container textarea,
.upload-container button {
    width: 100%;
    max-width: 300px;
    box-sizing: border-box; /* Wichtig für konsistente Breiten mit padding */
}

.upload-container input[type="file"] {
    display: none; /* Versteckt das Standard-File-Input-Feld */
}

.custom-file-button {
    background: linear-gradient(135deg, #00b4db, #0083b0);
    color: white;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    display: inline-block; /* Beibehalten, um Text-Align zu nutzen */
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.2s, box-shadow 0.2s;
    user-select: none;
}

.custom-file-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0,0,0,0.25);
}

.upload-container textarea {
    padding: 0.5rem 0.625rem;
    font-size: 0.875rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    resize: vertical;
}

#bildVorschau {
    max-width: 300px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    display: none;
}

.upload-container button {
    background: linear-gradient(135deg, #00b4db, #0083b0);
    color: white;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.upload-container button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0,0,0,0.25);
}

/* ---------------------------------- */
/* --- Modals und Alerts --- */
/* ---------------------------------- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fefefe;
    padding: 1.25rem;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 10px;
    position: relative;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2), 0 6px 20px rgba(0,0,0,0.19);
    scrollbar-width: none;
}

.modal-content hr {
    margin: 1.25rem 0;
}

.modal-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 0.9375rem auto;
    border-radius: 5px;
}

.modal-content div {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #555;
    text-align: justify;
}

.modal-open {
    overflow-x: hidden;
    touch-action: pan-y;
}

.save-text-btn {
    background: linear-gradient(135deg, #00b4db, #0083b0); /* Farbverlauf */
    color: white;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: bold;
    border: none;                  /* Kein Standardrahmen */
    border-radius: 30px;           /* Runde Ecken */
    cursor: pointer;
    display: inline-block;          /* Beibehalten, um Text-Align zu nutzen */
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.2s, box-shadow 0.2s;
    user-select: none;
}

.delete-btn {
    background: linear-gradient(135deg, #da3232, #cf1c1c); /* Farbverlauf */
    color: white;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: bold;
    border: none;                  /* Kein Standardrahmen */
    border-radius: 30px;           /* Runde Ecken */
    cursor: pointer;
    display: inline-block;          /* Beibehalten, um Text-Align zu nutzen */
    text-align: center;
    margin-left: auto; 
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.2s, box-shadow 0.2s;
    user-select: none;
    float: right; 
}

.close-button {
    float: right;
    position: sticky;
    top: 0;
    right: 5px;
    background: white;
    z-index: 1100;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* --- Custom Alert Modal --- */
.custom-alert-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.custom-alert-modal.show {
    display: flex;
    opacity: 1;
}

.custom-alert-content {
    background-color: #ffffff;
    padding: 1.875rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 400px;
    width: 90%;
    transform: scale(0.9);
    transition: transform 0.3s ease-in-out;
}

.custom-alert-modal.show .custom-alert-content {
    transform: scale(1);
}

.custom-alert-content h2 {
    color: #333;
    margin-bottom: 0.9375rem;
    font-size: 1.8rem;
}

.custom-alert-content p {
    color: #666;
    margin-bottom: 1.5625rem;
    font-size: 1.1rem;
    line-height: 1.5;
}

.custom-alert-content button {
    background-color: #0083b0;
    color: white;
    padding: 0.625rem 1.5625rem;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: background-color 0.2s ease-in-out;
}

.custom-alert-content button:hover {
    background-color: #005f80;
}




/*Burger menu*/


.hamburger-menu {
  position: fixed;
  top: 20px;
  left: 5px;
  z-index: 200;
}
#menu__toggle {
  opacity: 0;
}
#menu__toggle:checked + .menu__btn > span {
  transform: rotate(45deg);
}
#menu__toggle:checked + .menu__btn > span::before {
  top: 0;
  transform: rotate(0deg);
}
#menu__toggle:checked + .menu__btn > span::after {
  top: 0;
  transform: rotate(90deg);
}
#menu__toggle:checked ~ .menu__box {
  left: 0 !important;
}
.menu__btn {
  display: inline-block;
  position: relative;
  top: 20px;
  left: 5px;
  width: 26px;
  height: 26px;
  cursor: pointer;
  z-index: 100;
}

.menu__btn > span,
.menu__btn > span::before,
.menu__btn > span::after {
  display: block;
  position: absolute;
  width: 100%;
  height: 2px;
  background-color: #616161;
  transition-duration: .25s;
}
.menu__btn > span::before {
  content: '';
  top: -8px;
}
.menu__btn > span::after {
  content: '';
  top: 8px;
}
.menu__box {
  display: block;
  position: fixed;
  top: 0;
  left: -100%;
  width: 300px;
  height: 100%;
  margin: 0;
  padding: 80px 0;
  list-style: none;
  background-color: #ECEFF1;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, .4);
  transition-duration: .25s;
  z-index: 99; /* Lower z-index than the button, but higher than general content */
}
.menu__item {
  display: block;
  padding: 12px 24px;
  color: #333;
  font-family: 'Roboto', sans-serif;
  font-size: 20px;
  font-weight: 600;
  text-decoration: none;
  transition-duration: .25s;
}
.menu__item:hover {
  background-color: #CFD8DC;
}

.dot {
  position: absolute;
  top: 8px;
  right: -10px;
  width: 10px;
  height: 10px;
  background: red;
  border-radius: 50%;
  display: block; /* nur sichtbar wenn JS sagt */
    z-index: 300;
  display: none;
}

/* Media query for smaller screens */
@media (max-width: 768px) {
    .header-bar {
        
        padding-left: 28%; /* Ensure space for the burger menu on smaller screens */
    }

    .user-info {
        /* You might want to adjust font size or margin for smaller screens */
        font-size: 0.9rem;
    }
}


#calendar {
    position: relative;  /* wichtig für absolute Kinder */
    min-height: 320px;   /* passt sich an, optional anpassen */
    overflow: hidden;
    margin-top: 10px;
}
.calendar {
    position: relative;
    overflow: hidden;
}
.calendar-month-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.slide-in-left {
    transform: translateX(-100%);
    opacity: 0;
    animation: slideInFromLeft 0.4s forwards;
}

.slide-in-right {
    transform: translateX(100%);
    opacity: 0;
    animation: slideInFromRight 0.4s forwards;
}

.slide-out-left {
    animation: slideOutToLeft 0.4s forwards;
}

.slide-out-right {
    animation: slideOutToRight 0.4s forwards;
}

@keyframes slideInFromLeft {
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInFromRight {
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutToLeft {
    to { transform: translateX(-100%); opacity: 0; }
}

@keyframes slideOutToRight {
    to { transform: translateX(100%); opacity: 0; }
}

