@import url('https://fonts.googleapis.com/css2?family-Poppins:wght@400;500;700&display-swap');

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: "Poppins", serif;
}


body{
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 100vh;
	background: linear-gradient(to right, #e2e2e2, #c9d6ff);
	color: #333;
}

.container {
	margin: 0 15px;
}

.form-box {
	width: 100%;
	max-width: 450px;
	padding: 30px;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
	display: none;
}

.form-box.active{
	display: block;
	margin-left: auto;
	margin-right: auto;
}

h2 {
	font-size: 34px;
	text-align: center;
	margin-bottom: 20px;
}

input, select {
	width: 100%;
	padding: 12px;
	background: #eee;
	border-radius: 6px;
	border: none;
	outline: none;
	font-size: 16px;
	color: #333;
	margin-bottom: 20px;
}

button{
	width: 100%;
	padding: 12px;
	background: #7494ec;
	border-radius: 6px;
	border: none;
	cursor: pointer;
	font-size: 16px;
	color: #fff;
	font-weight: 500;
	margin-bottom: 20px;
	transition: 0.5s;
}

button:hover{
	background: #6884d3;
}

p{
	font-size: 14.5px;
	text-align: center;
	margin-bottom: 10px;
}

p a {
	color: #7494ec;
	text-decoration: none;
}

p a:hover{
	text-decoration: underline;
}

.error-message{
	padding: 12px;
	background: #f8d7da;
	border-radius: 6px;
	font-size: 16px;
	color: #a42834;
	text-align: center;
	margin-bottom: 20px;
}

h1 {
	font-size: 50px;
}

span{
	color: #7494ec;
}
.box p{
	font-size: 22px;
}

.box button{
	display: block;
	width: 300px;
	margin: 0 auto;
}
.container {
  display: flex;
  height: 100%;
  width: 100%;
}
/*styles the list of visitors*/
/* flex: 1 Allows the longer div to take up available space */
.website-visitors {
	display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  flex: 1; 
  background-color: #333333;
  left: 0;
  height: 100vh;
  width: 20vw;
  overflow-y: auto;
}
.messages {
	display: flex;
	flex-direction: column;
  width: 100%; 
  bottom: 0;
  height: 78vh;
  color:black;
  overflow-y: auto;
  background-color: whitesmoke; 

}

.chat-incoming:hover {
  background-color: #DCDCDC;
	cursor: pointer;
}

.visitor-ip:hover {
	background-color: #111111;
	cursor: pointer;
}
.chat-incoming {
	background-color: whitesmoke;
	text-align: right;
	width: 100%;
	bottom: 0;
	margin-right: 20pxpx;
	margin-bottom: 20px;
	font-size: 30px;
  margin-left: auto; /* Pushes the item to the right */
}
.chat-outgoing {
	background-color: whitesmoke;
	text-align: left;
	width: 100%;
	margin-right: 20pxpx;
	margin-bottom: 20px;
	font-size: 30px;
	margin-top: auto; /* Pushes the item to the bottom */
  margin-right: auto; /* Pushes the item to the right */
}
.visitor-ip{
	display: flex;
  justify-content: center;
  align-items: center; 
  width: 18vw;
	height: 10vh;
	margin-top: 20px;
	background-color: black;
	color: white;
	border-radius: 10px;
}
.visitor-ip span{
	color: white;
}
.new-message{
	background-color: blue;
}

/*styles where messages appear*/
/* Makes this container a flex container for the send messgaes area*/
/* flex directiom column Stacks the short divs vertically */
/* width is a variable width for the side content */
.messages-area {
  display: flex; 
  width: 80vw; 
  height: 80vh;
  background-color: #DCDCDC;

}
.send-message {
	display: flex;
	justify-content: center;
  background-color: #DCDCDC;
  width: 80vw; 
  height: 20vh;
}
.side-divs{
	width: 80vw;
}

.send-message-textarea{
	width: 76vw;
	height: 18vh;
  margin-bottom: auto;
	padding: 20px;
	color: #7494ec;
	background-color: whitesmoke;
	font-size: 20px;
	border-top: none;
	border-radius: 5px;
	border-left: 1px solid #7494ec; 
	border-right: 1px solid #7494ec; 
	border-bottom: 1px solid #7494ec; 
	box-shadow: 0 -5px 10px -2px rgba(0, 0, 0, 0.5);
}
	.send-button{
		position: absolute;
		bottom: 0;
		right: 0;
		margin-bottom: 30px;
		margin-right: 40px ;
		height: 50px;
		width: 50px;
}
.back-button{
	visibility: hidden;
	display: none;
	z-index: 10;
}
.close-popup{
	border-radius: 20px;
	border: 0;
	box-shadow: 0 1px 4px rgba(0,0,0,0.3);
	color: #fff;
	cursor: pointer;
	padding: 10px 25px;
}
.close-popup{
	opacity: 0.8;
}
.popup{
	background-color: rgba(0,0,0,0.3);
	opacity: 0;
	position: fixed;
	top:0;
	left:0;
	right:0;
	bottom:0;
	transition: all 0.3s ease-in-out;
	display: flex;
	z-index: -10;
	align-items: center;
	justify-content: center;
}
.popup.open{
	opacity: 1;
	z-index: 999;
}
.popup-inner{
	background-color: #fff;
	border-radius: 5px;
	box-shadow: 0 1px 4px rgba(0,0,0,0.3);
	padding: 15px;
	25px
	text-align: center;
	width: 380px;
}
.popup-inner h1{
	margin: 0;
	text-align: center;
}
.popup-inner p{
	line-height: 24px;
	margin: 10px 0;
}
.close-popup-reconnect{
	border-radius: 20px;
	border: 0;
	box-shadow: 0 1px 4px rgba(0,0,0,0.3);
	color: #fff;
	cursor: pointer;
	padding: 10px 25px;
}
.close-popup-reconnect{
	opacity: 0.8;
}
.popup-reconnect{
	background-color: rgba(0,0,0,0.3);
	opacity: 0;
	position: fixed;
	top:0;
	left:0;
	right:0;
	bottom:0;
	transition: all 0.3s ease-in-out;
	display-reconnect: flex;
	z-index: -10;
	align-items: center;
	justify-content: center;
}
.popup-reconnect.open{
	opacity: 1;
	z-index: 999;
}
.popup-inner-reconnect{
	background-color: #fff;
	border-radius: 5px;
	box-shadow: 0 1px 4px rgba(0,0,0,0.3);
	padding: 15px;
	25px
	text-align: center;
	width: 380px;
}
.popup-inner-reconnect h2{
	margin: 0;
	text-align: center;
}
.popup-inner-reconnect p{
	line-height: 24px;
	margin: 10px 0;
}
/*media all creates media query that applies styles to all media types and the styles work when screen is smaller than 768px*/
@media all and (max-width: 768px){
	.back-button.active{
		display: block;
		position: absolute;
		visibility: visible;
		left: 0;
		margin-left: 20px;
		margin-top: 20px;
		height: 50px;
		width: 50px;
	}

	.messages{
  	width: 100vw; 
  	height: 78vh;
	}
	.send-button{
		margin-bottom: 20px;
		margin-right: 20px;
	}
	.side-divs{
		display: none;
	}
	.send-message-textarea{
		width: 96vw;
		height: 18vh;
	}
	.send-message-textarea:focus{
		outline: none;
	}
	.messages-area.active {
		display: flex;
	  width: 100vw; 
	  height: 80vh;
 		background-color: #DCDCDC;

	}
	.side-divs.active{
		display: flex;
		flex-direction: column;
		width: 100vw;
		height: 100vh;

	}
	.send-message.active{
	  width: 100vw; 
	  height: 20vh;

	} 
	.website-visitors.active{
		display: none;
}

	.website-visitors {
			display: flex;
			flex-direction: column;

	}
	.visitor-ip{
		display: flex;
		justify-content: center; 
		align-items: center;
		margin: 10px;
		height: 15vh;
		width: 80vw;
	 	background-color: black;
	}
	.website-visitors{
		width: 100%;
		height: 100vh;
	}
}