/*
	
	KEVIN!!!
	
	Ich hab dich gewarnt!
	
	Sieh zu, dass du hier aus meinem Code rauskommst!!!
	
	Was du brauchst, ist nicht mein Code, sondern eine Therapie!!!
	
*/

body {
    font-family: Arial, sans-serif;
    margin: 20px;
    user-select: none;
    text-align: left;
    background-color: #f4f4f4;
    color: #333;
}

img {
	pointer-events: none;
	border: 3px solid black;
}

h1, h2 {
    text-align: left;
    color: #444;
}

hr {
    border: 1px solid #ddd;
}

/* Chat Box Styles */
#chat-box {
    height: 550px;
    overflow-y: auto;
    border: 1px solid #ccc;
    padding: 10px;
    background: #fff;
    margin-bottom: 20px;
    border-radius: 5px;
}

.message {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    padding: 8px;
    border-bottom: 1px solid #eee;
}

.message:last-child {
    border-bottom: none;
}

.message img.profile {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
	pointer-events: none;
}

.content {
    max-width: 85%;
}

.timestamp {
    font-size: 0.8em;
    color: #888;
    margin-top: 5px;
}

.file-preview img {
    max-width: 200px;
    margin-top: 5px;
    display: block;
    border-radius: 5px;
	pointer-events: none;
}

.file-preview a {
    color: #007bff;
    text-decoration: none;
}

.file-preview a:hover {
    text-decoration: underline;
}

.reactions {
    display: inline-flex;
}

.reaction-btn {
    background: none;
    border: none;
    font-size: 1em;
    font-weight: normal;
    color: #333;
    margin-right: 10px;
    cursor: pointer;
    padding: 4px 8px;
    transition: none;
}

.reaction-btn:hover {
    background: none;
}

.reaction-btn.active {
    font-weight: bold;
}

.reaction-btn.active[data-reaction="thumbs_up"] {
    color: green;
}

.reaction-btn.active[data-reaction="thumbs_down"] {
    color: red;
}

.reaction-btn[data-reaction="thumbs_up"]:hover ~ .reaction-btn[data-reaction="thumbs_down"].active,
.reaction-btn[data-reaction="thumbs_down"]:hover ~ .reaction-btn[data-reaction="thumbs_up"].active {
    font-weight: normal;
}

.reaction-btn:hover {
    font-weight: bold;
}


a {
    color: blue;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

a:active {
    text-decoration: none;
}

/* Form Styles 
input[type="text"],
input[type="file"],
button {
    padding: 10px 14px;
    margin: 5px 0;
    border-radius: 4px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

button {
    background-color: #007bff;
    color: white;
    cursor: pointer;
    border: none;
}

button:hover {
    background-color: #0056b3;
}
*/

input[type="text"],
input[type="file"],
button {
    padding: 10px 14px;
    margin: 5px 0;
    border-radius: 4px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

input[type="text"] {
    width: calc(100% - 1%);
}

/* Flex Layout */
.flex-container {
    display: flex;
    gap: 20px;
}

.flex-item {
    flex: 1;
}

/* User List */
#user-list {
    background: #eee;
    padding: 10px;
    border: 1px solid #ccc;
    height: 550px;
    overflow-y: auto;
    border-radius: 5px;
}

.user-item {
    margin-bottom: 10px;
    padding: 5px;
    border-bottom: 1px solid #ddd;
}

.user-item:last-child {
    border-bottom: none;
}

/* New Message Alert */
#new-message-alert {
    background-color: rgba(255, 0, 0, 0.8);
    color: white;
    text-align: center;
    padding: 10px;
    font-weight: bold;
    position: sticky;
    top: 0;
    left: 0;
    z-index: 5;
    display: none;
    box-sizing: border-box;
    border-radius: 5px;
    cursor: pointer;
}

.last-active {
	color: gray;
}

.modal {
    display: flex; /* This will be toggled with JS or PHP conditional logic */
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
    overflow-y: auto;
}

.modal-content {
    background: #fff;
    padding: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 18px;
    cursor: pointer;
}

.error {
	color: #FF5733;
	font-weight: bold;
}

.clickable {
    cursor: pointer;
    color: blue;
}

.clickable:hover {
    text-decoration: underline;
}
#profile-popup {
    display: none;
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translate(-50%, -20%);
    background: white;
    border: 2px solid black;
    padding: 20px;
    z-index: 9999;
    width: 300px;
    max-width: 90%;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    border-radius: 10px;
}
#profile-popup-close {
    position: absolute;
    top: 5px;
    right: 10px;
    cursor: pointer;
    font-weight: bold;
    color: red;
}

#profile-popup-close:hover {
    color: silver;
}

.hdwgh img {
	width: 50px;
}

.up {
	width:80px;
	height:80px;
	border-radius:50%;
}

/* Gesamte Sidebar */
.sidebar {
    width: 250px;
    background-color: #1e1e2f;
    padding: 16px;
    color: white;
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    overflow-y: auto;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.3);
    z-index: 100;
}

/* Titel der Sidebar */
.sidebar-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 12px;
}

/* Liste aller Nutzer */
.sidebar-userlist {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Einzelner Nutzer */
.sidebar-user {
    display: flex;
    align-items: center;
    padding: 6px;
    border-radius: 8px;
    transition: background 0.2s;
}

.sidebar-user:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Profilbild */
.sidebar-pic {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
}

/* Nutzername */
.sidebar-username {
    font-size: 14px;
    color: #f0f0f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user {
	display: flex;
	align-items: center;
	padding: 8px;
	border-radius: 8px;
	background-color: rgba(255, 255, 255, 0.03);
	transition: background 0.2s;
}

.sidebar-user:hover {
	background-color: rgba(255, 255, 255, 0.08);
	cursor: pointer;
}

.sidebar-pic {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
	margin-right: 10px;
	border: 4px solid #444;
	pointer-events: none;
}