@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Montaga&display=swap');

/* General Styles */
body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background-color: rgb(255, 255, 255);
  color: #000000;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Navbar */
.navbar {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0px 28px;
  background-color: transparent;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  background-color: #000000;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
}

.open-box {
  color: #ffffff;
  font-size: 20px;
  font-weight: bold;
  margin-right: 5rem;
  font-family: "Montserrat", sans-serif;
  font-weight: 500;
}

/* Container */
.container {
  text-align: center;
  max-width: 600px;
  width: 100%;
  padding: 80px 20px 20px;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  font-family: "Montserrat", sans-serif;
  font-weight:300;
  
}

.description-container {
  width: 100%; /* Adjust as needed */
  height: 200px; /* Fixed height to prevent layout shift */
  overflow: hidden; /* Ensures content doesn’t overflow */
  display: flex;
  align-items: center; /* Centers the text vertically */
}

.description {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #000000;
  font-family: "Montserrat", sans-serif;
  font-weight: 300;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.spacer {
  height: 40px;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  font-family: "Montserrat", sans-serif;
  font-weight: 300;
  
}

/* Message Box */
.message-box {
  position: relative;
  width: 100%;
  margin-bottom: 20px;
  background-color: #ffffff;
  border-radius: 8px;
  padding: 10px;
  min-height: 90px;
  max-height: 300px;
  overflow: hidden;
  border: 1px solid black;
}

textarea {
  width: 95%;
  min-height: 90px;
  max-height: 300px;
  padding: 10px;
  border: none;
  border-radius: 8px;
  background-color: transparent;
  color: #000000;
  font-size: 1rem;
  resize: none;
  font-family: "Montserrat", sans-serif;
  font-weight: 300;
  overflow-y: auto;
  
}

textarea:focus {
  border: none;
  outline: none;
}

.message-actions {
  position: absolute;
  bottom: 10px;
  right: 10px;
  display: flex;
  gap: 10px;
}

.voice-recorder,
.send-button {
  background-color: #cecece;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  color: rgb(0, 0, 0);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
}

/* Attachment Buttons */
.attachment-row {
  display: flex;
  justify-content: flex-start;
  gap: 5px;
}

.attach-file,
.attach-link {
  padding: 10px;
  border-radius: 50px;
  background-color: transparent;
  color: #ffffff;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
}

.file-count {
  font-weight: bold;
  font-size: 1.2rem;
  margin-top: .5rem;
  font-family: "Montserrat", sans-serif;
  font-weight: 300;
}

.file-icon,
.link-icon {
  font-size: 1.2rem;
  color: #9C9C9C;
}

.plus-icon {
  font-size: 1.2rem;
  font-weight: bold;
}

.attach-file:hover,
.attach-link:hover {
  background-color: #5a5a5a;
}

/* Attachments List */
#attachments {
  margin-top: 10px;
  color: whitesmoke;
}

.attachment-item {
  display: flex;
  align-items: center;
  margin-bottom: 5px;
}

.attachment-item a {
  color: #ffffff;
  margin-right: 10px;
}

.attachment-item button {
  background: none;
  border: none;
  color: crimson;
  cursor: pointer;
}

/* Popup */
.popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.5);
  justify-content: center;
  align-items: center;
}

.popup-content {
  background-color: #ffffff;
  border: 1px solid black;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  font-family: "Montserrat", sans-serif;
  font-size: 1rem;
}

.popup-content input {
  display: block;
  margin: 10px 0;
  padding: 10px;
  width: 90%;
  border: none;
  border-radius: 4px;
  background-color: rgb(255, 255, 255);
  color: black;
  border-bottom: 1px solid black;
  font-family: "Montserrat", sans-serif;
}
.popup-content input:focus {
  outline: none;
 }
 

.popup-content button {
  background-color: #000000;
  color: rgb(255, 255, 255);
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-family: "Montserrat", sans-serif;
}

.close {
  float: right;
  cursor: pointer;
  color: crimson;
}
/* Link Popup */
#linkPopup .popup-content {
  background-color: #ffffff;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  width: 300px;
  font-family: "Montserrat", sans-serif;
}

#linkPopup input {
  width: 90%;
  padding: 10px;
  margin-bottom: 10px;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  background-color: rgb(255, 255, 255);
  color: rgb(0, 0, 0);
  border: 1px solid black;
  font-family: "Montserrat", sans-serif;
}
#linkPopup input:focus {
 outline: none;
}

#linkPopup button {
  background-color: #383838;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  color: white;
  cursor: pointer;
  font-size: 1rem;
  font-family: "Montserrat", sans-serif;
  transition: .3s;
}

#linkPopup button:hover {
  background-color: #000000;
  color: white;
  transition: .3s;
}

.attachment-item {
  display: flex;
  align-items: center;
  margin-bottom: 5px;
  background-color: #404040;
  padding: 10px;
  border-radius: 8px;
}

.attachment-item audio {
  margin-right: 10px;
}

.attachment-item button {
  background: none;
  border: none;
  color: red;
  cursor: pointer;
}

:root {
  --bg-color: rgb(0, 0, 0);
  --contrast-color: rgb(0, 0, 0);
  --time: 2000ms;
  --animation-settings: var(--time) ease infinite;
}

.loader-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-color);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  
  
}

/* Loader Animation */
.container-animation {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 20px;
}

.square {
  width: 10px;
  aspect-ratio: 1/1;
  border: 3px solid var(--contrast-color);
  border-radius: 0.3rem;
  margin-bottom: 0.2rem;
  transform-origin: 100% 100%;
  animation: roll var(--animation-settings);
}

@keyframes roll {
  25% {
    transform: translate(-20px);
  }
  50% {
    transform: rotate(90deg) translateY(20px);
  }
  75% {
    transform: rotate(180deg) translateY(20px);
  }
  100% {
    transform: rotate(180deg) translate(20px, 20px);
  }
}

.infinite-scroll {
  position: relative;
  width: 60px;
  height: 2px;
  overflow: hidden;
  
}

.infinite-scroll::before,
.infinite-scroll::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 100%;
  background: var(--contrast-color);
}

.infinite-scroll::before {
  left: 50%;
  animation: moveBefore var(--animation-settings);
}

.infinite-scroll::after {
  left: 100%;
  animation: moveAfter var(--animation-settings);
}

@keyframes moveBefore {
  25% {
    left: 0;
  }
  50% {
    left: 0;
  }
  75% {
    left: 0;
  }
  100% {
    left: -30px;
  }
}

@keyframes moveAfter {
  25% {
    left: 100%;
  }
  50% {
    left: calc(100% - 20px);
  }
  75% {
    left: calc(100% - 20px);
  }
  100% {
    left: calc(50% - 10px);
  }
}



/* Thank You Popup */
#thankYouPopup .popup-content {
  background-color: #303030;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  width: 300px;
}

#thankYouPopup h2 {
  color: #25D366;
  font-size: 1.5rem;
  margin-bottom: 10px;
}

#thankYouPopup p {
  color: #ffffff;
  font-size: 1rem;
  margin-bottom: 20px;
}

#thankYouPopup img {
  border-radius: 8px;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
  .navbar {
      font-size: 1.2rem; /* Reduce navbar size */
      padding: 10px 15px;
  }
  .description-container {
    height: 140px; /* Slightly more height for better readability */
  }
  .description {
    font-size: 1rem; /* Reduce font size for tablets */
    line-height: 1.4;
  }
  .message-box {
      max-width: 90%;
  }
  h1{

    font-size: 2rem;
  }
  .description{
    font-size: .8rem;
  }
  h3{
    font-size: 1rem;
  }
  textarea {
      font-size: 0.9rem; /* Reduce font size */
      width: 90%;
  }
  .message-box{
    width: 80%;
    margin-left: 2rem;
  }
  .file-count{
    margin-left: 2rem;
    font-size: 1rem;
  }
  .voice-recorder,
  .send-button {
      width: 35px;
      height: 35px;
      font-size: 1rem;
  }
}

/* Mobile (480px) */
@media screen and (max-width: 480px) {
  .navbar {
      font-size: 1rem;
      padding: 8px 12px;
  }
  .description-container {
    height: 160px; /* Extra height for mobile readability */
  }
  .description {
    font-size: .7rem; /* Adjusted font size for smaller screens */
    line-height: 1.3;
    padding: 0 15px; /* Reducing padding for small screens */
  }
  .message-box {
      max-width: 95%;
      padding: 8px;
  }
  textarea {
      font-size: 0.8rem; /* Even smaller font for mobile */
  }
  .voice-recorder,
  .send-button {
      width: 30px;
      height: 30px;
      font-size: 0.9rem;
  }
}
