/* igel.css */
body {
    font-family: Arial, sans-serif;
    font-size: 16px;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

header {
    background-color: #8dc63c;
    color: white;
    text-align: center;
}

header img {
    height: calc(30px + 2rem);
}

@media (max-width: 900px) {
    header {
        padding: 1rem;
    }

    header nav {
        max-width: 840px;
    }

}

@media (min-width: 900px) {

    html,
    body {
        height: 100%;
    }

    body {
        display: flex;
        flex-direction: column;
    }

    header {
        box-sizing: border-box;
        display: flex;
        padding: 0px 5px;
        width: 100%;
    }

    header img {
        border-radius: 39px;
        height: calc(30px + 2rem);
    }

    header nav {
        flex: 1;
        max-width: 100%;
    }

    main {
        display: flex;
        flex-direction: column;
        flex: 1;
        overflow: auto;
    }

    .leftMenu {
        justify-content: end !important;
    }

    .fixedTable th {
        position: sticky;
        top: 0;
    }
}

header h1 {
    color: white;
}

header nav {
    display: flex;
    margin: auto;
    overflow-x: auto;
}

header nav ul {
    list-style-type: none;
    padding: 0;
    display: flex;
    justify-content: center;
    margin: 0;
}

header nav ul li {
    margin: 0 5px;
}

header nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

header nav ul li a:hover {
    color: #ffeb3b;
}

main {
    padding: 1rem;
}

.container {
    background: white;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    margin: auto;
    max-width: 900px;
    padding: 20px;
    width: 100%;
}

h1,
h2 {
    color: #333;
}

button {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    background-color: #8dc63c;
    color: white;
    font-size: inherit;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 20px;
    text-align: center;
}

button:hover {
    background-color: #7bb031;
    transform: scale(1.05);
    /* Leichtes Vergrößern */
}

button:disabled,
button[disabled] {
    background-color: #cccccc !important;
    color: #666666 !important;
    cursor: not-allowed !important;
    opacity: 0.8;
    border: 1px solid #999999 !important;
    box-shadow: none !important;
    transform: none !important;
}

button:disabled:hover,
button[disabled]:hover {
    background-color: #cccccc !important;
    color: #666666 !important;
    border: 1px solid #999999 !important;
    box-shadow: none !important;
    transform: none !important;
}

.popup {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.popup-content {
    background-color: #fff;
    padding: 25px;
    border: 1px solid #ccc;
    border-radius: 10px;
    width: 95%;
    max-height: 90%;
    max-width: 560px;
    overflow: auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    box-sizing: border-box;
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
    color: #000;
    text-decoration: none;
}

.popup-content h2 {
    margin-top: 0;
    color: #333;
}

.popup-content button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    background-color: #8dc63c;
    color: white;
    font-size: inherit;
    cursor: pointer;
}

/* CSS für Nachrichten-Animationen */
@keyframes slideInUp {
    from {
        transform: translateY(100%) translateX(-50%);
        opacity: 0;
    }

    to {
        transform: translateY(0) translateX(-50%);
        opacity: 1;
    }
}

@keyframes slideOutDown {
    from {
        transform: translateY(0) translateX(-50%);
        opacity: 1;
    }

    to {
        transform: translateY(100%) translateX(-50%);
        opacity: 0;
    }
}

.message {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #4caf50;
    color: white;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    animation: slideInUp 0.5s ease-out;
}

.errorMessage {
    background-color: #f44336;
}

.message.hide {
    animation: slideOutDown 0.5s ease-in;
}


.menu {
    align-items: center;
    list-style: none;
    padding: 0;
    display: flex;
    flex: 1;
    justify-content: start;
}

.menu li {
    display: inline;
}

.menu a,
.menu i {
    color: white;
    /* Weiße Schrift für guten Kontrast */
    font-size: 1em;
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;
}

.menu a {
    border-radius: 5px;
    display: inline-block;
}

.leftMenu a {
    padding: 5px 10px;
}

.menu i {
    color: white !important;
    cursor: pointer;
    font-size: 1.5em !important;
    padding: 5px 10px;
}

.menu a:hover,
.menu-popup-item i:hover {
    background-color: #f0f0f0;
    color: #8dc63c;
    border-radius: 5px;
}

@media (min-width: 500px) {
    .leftMenu li {
        margin: 0 15px;
    }
}

.rightMenu {
    flex: 0;
}

.logout-link {
    background-color: #ff6347;
    /* Hintergrundfarbe Rot */
}

/* CSS für das Menu-Popup-Einträge */
.menu-popup-item {
    position: relative;
}

.option-popup {
    display: none;
    /* Standardmäßig ausgeblendet */
    position: absolute;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    min-width: 150px;
    /* Minimale Breite für das Menü */
    padding: 10px 0;
    width: fit-content;
}

/* Kombination aus Hover-Effekten und minimalen Trennstrichen */
.option-popup a,
.option-popup div {
    display: block;
    padding: 10px 20px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;
    border-bottom: 1px solid #f0f0f0;
    /* Leichter Trennstrich */
    cursor: pointer;
    font-weight: bold;
    white-space: nowrap;
}

.option-popup a:last-child,
.option-popup div:last-child {
    border-bottom: none;
    /* Kein Trennstrich nach dem letzten Eintrag */
}

.option-popup a:hover,
.option-popup div:hover {
    background-color: #f0f0f0;
    color: #8dc63c;
}

.animal-menu-popup,
.settings-popup {
    position: fixed;
    right: 0;
    top: 40px;
    /* Position unterhalb des Icons */
}

.suggest-popup {
    top: 30px;
}

.fieldContainer .suggest-popup {
    top: 80px;
}

form {
    display: flex;
    flex-direction: column;
}

form label {
    color: #555;
    font-weight: bold;
}

form input,
form textarea,
form select {
    margin-top: 5px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: inherit;
    transition: border 0.3s, background-color 0.3s;
}

form input:invalid,
form textarea:invalid,
form select:invalid {
    border: 1px solid #ff0000;
    /* Rote Umrandung */
    background-color: #fff8e8;
    /* Hintergrundfarbe */
}

form input:placeholder-shown,
form textarea:placeholder-shown {
    font-style: italic;
}

form textarea {
    resize: vertical;
}

form button:hover {
    transform: scale(1.01);
    /* Leichtes Vergrößern */
}

form .fieldContainer {
    display: flex;
    flex-direction: column;
    padding: 10px 0;
    position: relative;
}

form hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 20px 0;
}

/* Stile für das Datumsfeld */
input[type="datetime-local"],
input[type="date"] {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.list-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0px;
    margin: 0px;
}

.list-button:hover {
    background: none;
}

/* Styling für den Löschen-Button */
.delete-button {
    color: red;
}

.delete-button:hover {
    color: darkred;
}

.edit-button {
    color: black;
}

.edit-button:hover {
    color: gray;
}

.header {
    align-items: center;
    display: flex;
}

.header h2,
.header h3 {
    flex: 1;
}

.header .action-button {
    margin-left: 10px;
}

.header button {
    margin-top: 0px;
}

table {
    border-collapse: collapse;
    width: 100%;
}

th,
td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

th {
    background-color: #f4f4f4;
    font-weight: bold;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

tr:hover {
    background-color: #f1f1f1 !important;
}

/* Stile für die Aktionen-Spalte */
.action-column {
    width: 1%;
    /* Minimale Breite */
    white-space: nowrap;
    /* Verhindert Zeilenumbrüche */
}

.table-container {
    overflow-x: auto;
    width: 100%;
}

input[type="checkbox"] {
    appearance: none;
    /* Entfernt das Standard-Aussehen */
    -webkit-appearance: none;
    /* Für WebKit-Browser */
    -moz-appearance: none;
    /* Für Firefox */
    width: 20px;
    height: 20px;
    border: 2px solid #007BFF;
    border-radius: 4px;
    background-color: white;
    display: inline-block;
    position: relative;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s, box-shadow 0.3s;
}

/* Style für das Häkchen */
input[type="checkbox"]:checked {
    background-color: #007BFF;
    border-color: #007BFF;
}

input[type="checkbox"]:checked::after {
    content: '';
    display: block;
    width: 8px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -60%) rotate(45deg);
}

/* Verstärkter Hover-Effekt */
input[type="checkbox"]:hover {
    border-color: #0056b3;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
    /* Schattenwirkung beim Hovern */
}

/* Hover-Effekt für aktivierte Checkbox */
input[type="checkbox"]:checked:hover {
    background-color: #0056b3;
    /* Dunkleres Blau beim Hovern, wenn aktiviert */
    border-color: #0056b3;
}

/* Fokus-Effekt */
input[type="checkbox"]:focus {
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

input[type="checkbox"][disabled] {
    cursor: not-allowed;
    opacity: 0.7;
}

.state-icon {
    color: gray;
    font-size: 1.5em;
    transition: color 0.3s;
}

.state-icon:hover, .genderIcon:hover {
    opacity: 0.5;
}

.state-icon-winter-sleep {
    color: #8dc63c;
}

.state-icon-winter-awake {
    color: #ff6347;
}