/*
 * File: c:\Users\tonyw\Desktop\socketChat\public\styles.css
 * Project: c:\Users\tonyw\Desktop\GIT Messenger\socket-messenger
 * Created Date: Thursday August 17th 2023
 * Author: Tony Wiedman
 * -----
 * Last Modified: Mon August 21st 2023 6:24:26 
 * Modified By: Tony Wiedman
 * -----
 * Copyright (c) 2023 Tone Web Design, Molex
 */
/* Base Styles */
html {
  height: -webkit-fill-available;
}
body {
  font-family: "Arial", sans-serif;
  background-color: #2c3e50;
  color: #ecf0f1;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  max-height: 100vh;
  min-height: -webkit-fill-available;

}

#content {
  flex: 1; /* Allow the content to take up the remaining space */
  display: flex;
  flex-direction: column;
  max-height: 100vh;
  min-height: -webkit-fill-available;
}

#messagesContainer {
  flex: 1; /* Allow the messages container to expand within the content */
  overflow-y: auto;
  height:100%;
}

ul {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  list-style-type: none;
  margin: 0;
  display: flex;
  flex-direction: column;
}

li {
  margin-bottom: 10px;
  padding: 10px;
  border-radius: 5px;
  background-color: #34495e;
  align-self: flex-start; /* Align messages to the left */
}

label {
  margin-right: 5px;
}

h2 {
  margin-top: 0;
}

/* Flex Styles */
.flex-container {
  display: flex;
  align-items: center;
}

.flex-item {
  margin: 5px;
}

/* Username Styles */
#username {
  padding: 5px;
  border: none;
  border-radius: 4px;
  background-color: #34495e;
  color: #ecf0f1;
  width: 200px;
}

/* Chat Form Styles */
#chatForm {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #34495e;
  background-color: #233242;
  padding:1em;
}

#inputMessage {
  border: none;
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
  background-color: #34495e;
  color: #ecf0f1;
  height: 50px;
  width: 100%;
  padding-left: 10px;
  padding-right: 10px;
  outline: 0;
  transition: .2s;
}

#inputMessage:hover{
   filter: brightness(1.1);
}

#inputMessage:focus{
  filter: brightness(1.1);
}

/* Button Styles */

.send-btn{
  height: 52px;
  padding-left: 10px;
  padding-right: 10px;
  border-top-left-radius: 0px;
  border-bottom-left-radius: 0px;
}

.send-btn:active{
  transform: unset;
}

/* Navigation Bar */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-left: 10px;
  padding-right: 10px;
  background-color: #233242;
  color: #ecf0f1;
  border-bottom: 1px solid #34495e;
  user-select: none;
  max-height: 75px;
}

nav button {
  padding: 5px 10px;
  background-color: #34495e;
  color: #ecf0f1;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
}

nav button:hover {
  background-color: #4a6891;
}

/* Overlay Styles */
#overlay, #settingsOverlay, #ytOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(44, 62, 80, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

#settingsOverlay, #ytOverlay, #overlay {
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 2000;
}

#usernamePrompt, #settingsPrompt, #youtubePopup {
  background-color: #2c3e50;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.5);
  border: 1px solid #4a6891;
}

#usernamePrompt {
  width: 300px;
}

#settingsPrompt {
  background-color: #2c3e50;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.5);
  border: 1px solid #4a6891;
  width: 300px;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  width: 100%;
}

.title {
  font-size: 18px;
}

/* .close-button {
  display: flex;
  justify-content: flex-end;
} */

#newUsername,
#newColorPicker {
  width: 100%;
  height: 36px;
  margin-top: 10px;
  box-sizing: border-box;
}

#newColorPicker, #colorPicker {
  cursor: pointer;
}

#updateSettings {
  margin-top: 20px;
}

/* YouTube Popup Styles */
#youtubePopup {
  width: 700px;
  display: flex;
  flex-direction: column;
}

.search-fields {
  display: flex;
  align-items: center;
}

#youtubeSearchInput {
  flex: 1;
  width: 100%;
  border: none;
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
  background-color: #34495e;
  color: #ecf0f1;
  height: 50px;
  padding-left: 10px;
  padding-right: 10px;
  outline: 0;
  transition: .2s;
}

#closeYouTube {
  align-self: flex-end;
  font-size: 1.1rem;
  margin-top: -0.5em;
  margin-bottom: 0.5em;
  margin-right: -0.5em;
  background: transparent !important;
}

#closeSettings {
  background: transparent;
  border: none;
  font-size: 1.1rem;
  color: #ecf0f1;
  cursor: pointer;
}

#settingsPrompt input[type="text"],
#settingsPrompt input[type="color"] {
  margin-bottom: 5px;
}

#searchYouTube {
  height: 50px;
  width: 50px;
  border-top-left-radius: unset;
  border-bottom-left-radius: unset;
}

#searchYouTube:active{
  transform: unset;
}

#youtubeSearchInput:hover{
  filter: brightness(1.1);
}

#youtubeSearchInput:focus{
 filter: brightness(1.1);
}

#searchResults {
  list-style: none;
  padding: 0;
  max-height: 200px;
  overflow-y: auto; 
  margin-top: 1em;
}

#searchResults li {
  padding: 5px;
  cursor: pointer;
  transition: background-color 0.2s;
}

#searchResults li:hover {
  background-color: #0d1218;
}

/* Settings Styles */
#settings {
  display: flex;
  flex-direction: column;
  padding: 5px;
  border-top: 1px solid #ecf0f1;
}

#settings input[type="text"],
#settings input[type="color"] {
  margin-bottom: 5px;
}

#newUsername, #username {
  border: none;
  border-radius: 4px;
  background-color: #34495e;
  color: #ecf0f1;
}

#username::placeholder, #newUsername::placeholder {
  color: #b9b9b9; 
}

#joinChat {
  display: block;
  margin-top: 15px;
  width: 100%;
}

#usernamePrompt, #settingsPrompt {
  display: flex;
  flex-direction: column;
  align-items:baseline;
}

.input-container {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  width: 100%;
}

#username, #newUsername {
  flex: 1;
  margin-right: 10px;
  border: none;
  border-radius: 4px;
  background-color: #34495e;
  color: #ecf0f1;
  width: 100%;
}

#colorPicker, #newColorPicker {
  width: 50px;
  border: none;
  border-radius: 4px;
  background-color: #34495e;
}

/* Overlay Adjustments */
#settingsOverlay {
  display: none; 
}

#ytOverlay {
  display: none;
}


/* Media query for mobile screens */
@media (max-width: 768px) {
  #inputMessage {
    width: 100%;
  }
  
  #chatForm {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0.5em;
  }
  
  /* Style for the YouTube icon container */
  #imageInput + label {
    height: 40px; 
    display: flex; 
    align-items: center; 
  }
}

button {
  background: #48658b;
  color: #fff;
  border: none;
  padding: 5px;
  border-radius: 5px;
  cursor: pointer;
  transition: 0.2s;
}

button:hover {
  background: #4a6891;
}

button:active {
  background: #4a6891;
  transform: scale(0.93);
}

.send-btn{
  background: #48658b;
}

#tools {
  background: linear-gradient(90deg, #233242, #34495e);
  padding: 2px 1em;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bar-btn-group {
  display: flex;
  align-items: center;
}

.bar-btn {
  font-size: 1.2rem;
  margin: 0.25rem;
}

#typingArea {
  color: gray;
  text-align: left;
}

::-webkit-scrollbar {
  width: 8px; 
  height: 8px; 
}

::-webkit-scrollbar-thumb {
  background: #233242;
}

::-webkit-scrollbar-thumb:hover {
  background: #1a252a;
}

::-webkit-scrollbar-track {
  background: #34495e; 
}
