/*studentenverwaltung*/
.student-card-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-bottom: 50px;
}

.student-info{
    align-items: center;
    margin-right: 40px;
}

.student-card {
    display: flex;
    background-color: #F9FAFF;
    border-radius: 8px;
    padding: 2rem;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.notes {
    max-width: 200px;
    font-size: 0.9rem;
    margin: 3rem;
}

/*Aktuelle/Alle Ausleihen - Buchinfo-Kacheln Ausleihstatus*/
.return-status-bar {
    display: inline-block;
    width: 5px;
    height: 14px;
    margin-right: 8px;
    vertical-align: middle;
    border-radius: 2px;
}

/*Aktuelle/Alle Ausleihen - Statusfarben*/
.return-status-bar.red {
    background-color: red;
}
.return-status-bar.orange {
    background-color: orange;
}
.return-status-bar.green {
    background-color: green;
}
.return-status-bar.black {
    background-color: rgb(0, 0, 0);
}

.loan-status {
    width: 10px;
    background-color: grey; /* Standardfarbe */
}

/*Spezifische Farben je nach Status*/
.loan-status.green {
    background-color: green;
}

.loan-status.orange {
    background-color: orange;
}

.loan-status.red {
    background-color: red;
}

.loan-status.blue {
    background-color: blue;
}

/*Main-Content - Anordnung der zwei Buchinfo-Kacheln im Raster nebeneinander*/
.loan-grid {
    display: grid;
    grid-template-columns: repeat(2, auto); /* Zwei Spalten für die Bücher */
    gap: 2rem;
    margin-top: 2rem; /* Abstand zwischen der Suchzeile und dem Grid */
}

/*Main-Content - Anordnung eine lange Buchkacheln (weitere untereinander)*/
.loan-grid-single {
    display: grid;
    gap: 2rem;
    margin-top: 2rem; /* Abstand zwischen der Suchzeile und dem Grid */
}

/*Main-Content - Buchinfo-Kacheln Textausrichtung*/
.loan-info {
    flex-grow: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
}

/*Main-Content - Buchinfo-Kacheln Buchtitel Formatierung*/
.loan-info h2 {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
}

/*Main-Content - Buchinfo-Kachel Buchicon*/
.loan-info .icon-placeholder {
    margin-top: 0.5rem;
    font-size: 24px;
    padding-left: 10px; /* nur das Icon eingerückt */
}

/*Main-Content - Buchinfo-Kacheln Platzhalter für Bild (bei kleiner Kachel (zwei nebeneinander))*/
.loan-image {
    width: 40%;
    background-color: #d8d8d8;
    background-size: cover;
    background-position: center;
    max-width: 180px;
}

/*Main-Content - Buchinfo-Kacheln Platzhalter für Bild (bei großer Kachel (eine pro Zeile))*/
.loan-image-single {
    width: 20%;
    background-color: #d8d8d8;
    background-size: cover;
    background-position: center;
}

.book-cover-placeholder {
    background-color: #ccc; /* Grauer Platzhalter */
    min-height: 300px; /* Mindesthöhe (anpassen) */
    width: 200px; /* Feste Breite */
    border: 1px solid #bbb; /* Optional: dünner Rand */
}

/*Main-Content - Buchinfo-Kacheln Content Formatierung*/
.loan-info .author,
.loan-info .year,
.loan-info .publisher,
.loan-info .return-info {
    margin: 0.2rem 0;
    font-size: 14px;
    padding-left: 10px; /* ← Einrücken für alles */
}

/*Main-Content - Buchinfo-Kachel Rückgabe Formatierung*/
.loan-info .return-info {
    margin-top: 0.5rem;
    font-weight: bold;
    color: #555;
    display: flex;
    align-items: center;  /* Status-Balken und Text schön nebeneinander */
    justify-content: flex-start; /* WICHTIG: linksbündig */
    padding-left: 10px;
}

/*Main-Content - Buchinfo-Kachel Layout*/
.loan-card {
    position: relative;
    display: flex;
    background-color: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    height: 200px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    max-width: 700px;
}

/*Main-Content - Buchinfo-Kachel Layout alternativ (aktuell keine Verwendung)*/
.loan-card-simple {
    position: relative;
    display: flex;
    background-color: white;
    border-radius: 0;
    overflow: hidden;
    height: 200px;
}

.loan-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.loan-card-link:hover .loan-card {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    transform: scale(1.01);
    transition: all 0.2s ease-in-out;
}

/* Oberer Bereich: Grid für Cover und Metadaten */
.book-details {
    display: grid;
    grid-template-columns: 200px 1fr; /* Feste Breite für Cover, Rest für Metadaten */
    gap: 2rem; /* Abstand zwischen den Spalten */
    margin-bottom: 2rem; /* Abstand zum nächsten Abschnitt */
    align-items: start; /* Elemente oben ausrichten */
}

.book-metadata h1 {
    margin-top: 0; /* Standard-Margin für h1 entfernen */
    margin-bottom: 1.5rem;
    font-size: 1.8rem; /* Beispiel-Schriftgröße */
}

/* Styling für die Definitionsliste (Metadaten) */
.book-metadata dl {
    margin: 0;
    display: grid;
    grid-template-columns: auto 1fr; /* Spalte für Label, Spalte für Wert */
    gap: 0.5rem 1rem; /* Abstand zwischen Zeilen und Spalten */
}

.book-metadata dt {
    font-weight: bold;
    grid-column: 1; /* Immer in der ersten Spalte */
}

.book-metadata dd {
    margin: 0; /* Standard-Margin entfernen */
    grid-column: 2; /* Immer in der zweiten Spalte */
}

.book-metadata {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.book-metadata label {
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 0.5rem;
}

.book-metadata input {
    font-size: 1rem;
    height: 1.3rem;
    padding: 0.5rem;
    border-radius: 0.5rem;
    border: 1px solid #ccc;
}

section textarea,
section input {
    width: 100%;
    padding: 0.6rem;
    border-radius: 0.5rem;
    border: 1px solid #ccc;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
}

/*Suchergebnisse - Trennlinie unter Verlag */
.loan-divider {
    width: 100%;
    border: none;
    border-top: 1px solid #ccc;
    margin: 0.5rem 0;
}

/* Hauptcontainer für die Liste der Ausleihen */
.admin-loan-list {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Einzelner Ausleih-Eintrag */
.admin-loan-item {
    display: flex;
    align-items: center; /* Vertikal zentrieren */
    background-color: #F9FAFF; /* Sehr heller Hintergrund, fast weiß, wie im Zielbild */
    /* Wenn es exakt wie der .main-content Hintergrund sein soll, ggf. background-color: white; */
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08); /* Etwas weicherer Schatten */
    /* gap: 1rem; Entferne den globalen Gap hier, um Abstände präziser zu steuern */
}

.loan-status-indicator {
    width: 8px;
    align-self: stretch;
    border-radius: 4px 0 0 4px;
    margin-right: 1rem; /* Abstand zum Medienbild */
    flex-shrink: 0;
}
.loan-status-indicator.red { background-color: #e53935; }
.loan-status-indicator.orange { background-color: #ffb300; }
.loan-status-indicator.black { background-color: #555; }

.item-media-image {
    width: 60px; /* Kleineres Medienbild */
    height: 80px;
    background-color: #e0e0e0;
    border-radius: 3px;
    flex-shrink: 0;
    margin-right: 1rem;
}

.item-media-info {
    flex-grow: 1; /* Nimmt den meisten Platz ein, drückt User-Sektion nach rechts */
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-size: 0.85rem; /* Kleinere Basisschrift */
    min-width: 150px; /* Verhindert zu starkes Quetschen */
    margin-right: 1rem; /* Abstand zur User-Sektion */
    border-right: 2px solid #eee; /* Leichte Trennlinie */
}

.item-media-info h2 {
    font-size: 1rem; /* Kleinere Überschrift */
    margin: 0 0 2px 0;
    font-weight: 600;
}

.item-media-info .author,
.item-media-info .year-publisher {
    font-size: 0.75rem; /* Noch kleiner */
    color: #666;
    margin: 1px 0;
}
.item-media-info .icon-placeholder {
    font-size: 1.2rem; /* Kleineres Buch-Icon */
    margin-top: 3px;
    margin-bottom: 3px;
}

.loan-return-status {
    font-size: 0.8rem; /* Kleinere Schrift für Status */
    font-weight: 500;
    margin-top: 3px;
}
.loan-return-status.overdue { color: #e53935; }
.loan-return-status.warning { color: #ffb300; }
.loan-return-status.returned { color: #333; }

/* NEUER WRAPPER für User-Bild und User-Infos, um sie zusammenzuhalten */
.item-user-section {
    display: flex;
    align-items: center;
    /* flex-grow: 1; Entfernen, damit es nicht den Platz weg nimmt */
    flex-shrink: 0; /* Verhindert Schrumpfen dieser Sektion */
    margin-left: auto; /* WICHTIG: Schiebt diesen Block und die Buttons nach rechts */
}

.item-user-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-basis: 170px; /* Angepasste Basisbreite */
    min-width: 150px;
    flex-shrink: 0; /* Sicherstellen, dass es nicht zu sehr schrumpft */
    font-size: 0.8rem;
    margin-right: 1rem; /* Abstand zu den Buttons */
}

.item-user-info .user-name {
    font-weight: 600;
    font-size: 0.85rem;
    margin: 0 0 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.item-user-info .user-email {
    font-size: 0.7rem; /* Sehr kleine E-Mail Schrift */
    color: #777;
    word-break: break-all;
    margin: 0 0 2px 0;
    line-height: 1.2;
}
/* Dein bestehendes Styling für user-role-admin ist gut, wird hier wiederholt für Vollständigkeit */
.item-user-info .user-role-admin {
    font-size: 0.7rem; /* Kleiner für das "Student"-Label */
    color: #555;
    background-color: #e8e8e8; /* Hintergrund für das Label */
    padding: 2px 5px;
    border-radius: 3px;
    margin-top: 4px;
    text-transform: uppercase; /* Wie im Bild */
    letter-spacing: 0.5px;
    display: inline-block; /* Damit es nicht die volle Breite einnimmt */
    align-self: flex-start; /* Stellt sicher, dass es linksbündig innerhalb .item-user-info ist */
}


.loan-info {
    text-align: left;
}

.loan-info .unpaid {
    color: red;
}
