.chat-container {
    display: flex;
    flex-direction: column;
    position: relative; /* Wichtig für das Styling des Overlays, falls du doch eins willst */
    overflow: hidden; /* Verhindert, dass der Blur-Rand sichtbar wird */
    /* Füge diese Transition für einen sanften Übergang hinzu */
    transition: filter 0.3s ease-in-out;
}

.chat-container.blurred {
    filter: blur(5px); /* Passe den Wert nach Wunsch an */
    pointer-events: none; /* Deaktiviert Interaktionen mit dem unscharfen Bereich */
}

.chat-message-list {
    /* Fit remaining space */
    flex-shrink: 1;
}

.file-upload-preview {
    /* Can appear or hide */
    flex-shrink: 0;
}

.chat-compose-bar {
    /* Doesn't ever change size */
    flex-shrink: 0;
}

.chat-compose-bar {
    position: relative;
    display: flex;
    justify-content: space-between;
    gap: 4px;
    padding: 8px;
}

.chat-compose-bar.drag-over {
    border-color: #007bff;
    background: #e3f2fd;
    box-shadow: 0 0 20px rgba(0, 123, 255, 0.2);
}

.drag-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 123, 255, 0.1);
    border-radius: 8px;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border: 2px dashed #007bff;
}

.drag-overlay.show {
    display: flex;
}

.drag-counter {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #007bff;
    color: white;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.drag-counter.show {
    display: flex;
}

.chat-message-list {
    overflow-y: scroll;
}

.chat-day-marker {
    margin-top: 4px;
    margin-bottom: 16px;

    display: flex;
    align-items: center;

    gap: 12px;
    padding: 0 8px;
}

.chat-day-marker-line {
    height: 1px;
    background-color: lightgrey;
    flex-grow: 1;
}

.chat-day-marker-center {
    color: darkgrey;
}

.chat-message {
    padding: 4px;
    display: flex;
    flex-direction: column; /* Allows us to use align-items horizontally and on the child */
    justify-content: space-between;
}

.chat-message-bubble {
    margin-bottom: 2px;
    padding: 4px;
    border-radius: 4px;
    background: rgba(20, 83, 117, 1);
    color: white;
    align-self: flex-start;
    max-width: 70%; /* It's important for the bubbles to not reach the other side, so one can clearly see which person has written the message */
}

.chat-message-time {
    margin-bottom: 4px;
    font-size: smaller;
    font-style: italic;
    color: grey;
    align-self: flex-start;
}

.own-message .chat-message-bubble {
    background: rgba(255, 215, 39, 1);
    color: black;
    align-self: flex-end;
}

.own-message .chat-message-author {
    display: none;  /* Would also need different color for contrast */
}

.own-message .chat-message-time {
    align-self: flex-end;
}

.chat-message-author {
    font-size: smaller;
    color: lightgrey;
}

.chat-message-content {
    font-size: small;
    white-space: pre-wrap;
}

.chat-message-content a:hover {
    color: white; /* Optional: Farbe beim Hover */
}

.chat-message-file-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.chat-message-file {
    /* All files should be squares of fixed size */
    height: 240px; width: 240px;
    
}

.chat-message-file:has(.image-preview) {
    border: 2px solid gray;
    border-radius: 4px;

    background-color: white;
}

/* Show file preview if possible */
.chat-message-file .image-preview {
    height: 100%;
    max-width: 100%;
    overflow: hidden;
    object-fit: cover;
    
    border: 2px solid gray;
    border-radius: 4px;
   
}

.chat-message-file .file-type-icon {
    height: 100%;
    width: 100%;
    padding: 2px;   /* Slightly increase gap between file type icons */
}


.chat-compose-text {
    resize: none;
    flex-grow: 1;
}

/* style.css */

.weather-widget {
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    background-color: #f9f9f9;
    font-family: Arial, sans-serif;
    color: #333;
}

.weather-widget h3 {
    margin-top: 0;
    color: #0056b3;
    font-size: 1.3em;
}

.weather-main {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.weather-temp {
    font-size: 2.5em;
    font-weight: bold;
    margin-right: 15px;
}

.weather-symbol {
    width: 60px; /* Oder eine andere Größe für deine Icons */
    height: auto;
    margin-right: 15px;
}

.weather-condition {
    font-size: 1.2em;
    font-style: italic;
    color: #999;
}

.weather-details p {
    margin: 5px 0;
    font-size: 0.9em;
}

.weather-details strong {
    color: #666;
}

/* Grundstil für das Wetter-Widget, wenn es in einer Chat-Bubble ist */
.chat-message .weather-widget {
    /* Setze den Hintergrund hier bewusst auf transparent,
       damit der Hintergrund der .chat-message-bubble durchscheint. */
    background-color: transparent;
    border: none; /* Entferne den Standard-Border des Widgets */
    padding: 0; /* Entferne das Standard-Padding, da die Bubble selbst polstert */
    margin: 0; /* Entferne den Standard-Margin */
    box-shadow: none; /* Entferne den Schatten, falls vorhanden */
    width: 100%; /* Sorge dafür, dass es die volle Breite der Bubble einnimmt */
    box-sizing: border-box; /* Stellt sicher, dass Padding und Border in der Breite enthalten sind */
}

/* Textfarbe des Widgets anpassen, wenn es in einer eigenen (gelben) Nachricht ist */
.chat-message.own-message .weather-widget {
    color: #333; /* Dunklerer Text für gute Lesbarkeit auf gelbem Hintergrund */
}

/* Textfarbe des Widgets anpassen, wenn es in einer fremden (dunkelblauen) Nachricht ist */
.chat-message:not(.own-message) .weather-widget {
    color: white; /* Heller Text für gute Lesbarkeit auf dunkelblauem Hintergrund */
}

/* Spezielle Anpassungen für Unterelemente des Widgets, falls nötig */
.weather-widget h3 {
    /* Passe Überschrift Farbe an, wenn nötig */
    color: inherit; /* Erbt die Farbe vom Elternelement */
    margin-bottom: 5px; /* Etwas Abstand nach unten */
}

.weather-widget .weather-temp {
    /* Stelle sicher, dass die Temperatur gut lesbar ist */
    color: inherit;
}

.weather-widget .weather-details p {
    color: inherit;
    opacity: 0.9; /* Detailtexte eventuell etwas heller */
}

.weather-widget .weather-details strong {
    color: inherit; /* Oder eine spezifische Farbe für Fettschrift */
}


.upload-menu-container {
    position: absolute;
    left: 0;
    bottom: 100%; /* Bottom of menu to top of parent (compose bar) */

    overflow: hidden;
    height: 0;
    transition: height 0.5s ease;

    display: flex;
    flex-direction: column;
}

.upload-menu-container .spacer {
    flex-grow: 1;   /* Takes up the extra space of the container compared to the menu itself */
}

.upload-menu-open {
    height: 100px;  /* container height more than menu itself */
}

.upload-menu {
    display: flex;
    flex-direction: column;
    background-color: #eee;
    border-radius: 4px;
    border: 1px #eee solid;

    margin: 4px;
    padding: 4px;
    gap: 4px;
}

.chat-send-button {
    flex-grow: 0;
}

.file-upload-preview {
    width: 100%;
    display: flex;
    flex-direction: row;
    overflow-x: scroll;

    position: relative;
    box-shadow: 0px -5px 5px -5px rgba(0, 0, 0, 0.5);
}

.file-upload-preview-item {
    position: relative;
    overflow: hidden;   /* Overlay gets same border radius as panel */
}

.file-upload-preview-item-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;

    background-color: rgba(0, 0, 0, 0.6);

    padding: 2px;

    opacity: 0;
    transition: opacity 0.5s;
}

.file-upload-preview-item-overlay:hover {
    opacity: 1;
}

.file-upload-preview-item .remove-item {
    position: absolute;
    top: 0;
    right: 0;
    margin: 4px
}

.file-upload-preview-item .item-size {
    position: absolute;
    bottom: 0;
    right: 0;
    color: white;
    margin: 4px
}

/* Permission status */
.chat-container {
    position: relative;
    overflow: hidden;
}

.spin {
    animation: spin 1s infinite linear;
    -webkit-animation: spin2 1s infinite linear;
}

@keyframes spin {
    from { transform: scale(1) rotate(0deg); }
    to { transform: scale(1) rotate(360deg); }
}

@-webkit-keyframes spin2 {
    from { -webkit-transform: rotate(0deg); }
    to { -webkit-transform: rotate(360deg); }
}

.file-container {
    overflow-y: scroll;
    transition: filter 0.3s ease-in-out; /* Für einen sanften Übergang */
}

.file-container.blurred {
    filter: blur(5px); /* Pass den Unschärfegrad an */
    pointer-events: none; /* Verhindert Interaktionen mit dem unscharfen Bereich */
}

.directory-children-container {
    padding-left: 24px; /* Recursive inset */
}

.fs-node-columns {
    margin: 4px;
    display: grid;
    column-gap: 4px;

    grid-template-columns:
        20px        /* Icon/toggle */
        1fr         /* File or directory name */
        24ex        /* Last modification/upload time */
        20ex        /* Author name */
        20ex;       /* Version count */
} 

.fs-node-columns > :nth-child(1) {
    justify-self: center;
    align-self: center;
}

.fs-node-columns > :nth-child(2) {
    justify-self: start;

    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.fs-node-columns > :nth-child(4) {
    justify-self: start;
}

.fs-node-columns > :nth-child(4) {
    justify-self: start;
}

.fs-node-columns > :nth-child(5) {
    justify-self: end;
}

.folder-toggle {
    cursor: pointer;
}

.file-version-list .fs-node-columns > :nth-child(1) {
    /* Proper alignment for box-drawing characters */
    justify-self: center;
}

.file-version-list .fs-node-columns > :nth-child(2),
.file-version-list .fs-node-columns > :nth-child(3),
.file-version-list .fs-node-columns > :nth-child(4) {
    /* Modify specific columns (don't apply text styling to icons and buttons) if this file is just another version of a more recent one */
    font-style: italic;
}

.btn-blank {
    background: none;
    padding: 0;
    margin: 0;
    border: none;
    height: fit-content;
}

/* Highlight animations */
@keyframes wiggle {
    /* From https://blog.hubspot.com/website/css-animation-examples */
    0%, 7% {
      transform: rotateZ(0);
    }
    15% {
      transform: rotateZ(-15deg);
    }
    20% {
      transform: rotateZ(10deg);
    }
    25% {
      transform: rotateZ(-10deg);
    }
    30% {
      transform: rotateZ(6deg);
    }
    35% {
      transform: rotateZ(-4deg);
    }
    40%, 100% {
      transform: rotateZ(0);
    }
}

.wiggle {
    animation: wiggle 2s linear;
}

.fs-node-directory {
    box-sizing: border-box;
}

.selected-directory {
    outline: 1px dotted grey;
    background-color: rgb(250, 250, 250);
}