/* Importing Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap");

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

#previousMessages::-webkit-scrollbar,
section::-webkit-scrollbar,
.category-filters::-webkit-scrollbar {
  width: 0;
}

img {
  max-width: 100%;
  height: auto;
}

ul {
  list-style-type: none;
  padding: 0;
}

a {
  text-decoration: none;
  color: initial;
}

button {
  padding: 0.25rem 0.45rem;
  border-radius: 5px;
  border: 1px solid black;
}

button:hover {
  cursor: pointer;
}

/* Header */
header {
  position: sticky;
  width: 100%;
  top: 0;
  left: 0;
  background-color: #fbfbfb;
  padding: 1rem 1rem;
  box-shadow: 0 3px 8px 0 rgba(0, 0, 0, 0.2);
  text-align: center;
  z-index: 60;
}

header nav ul,
footer nav ul {
  display: flex;
  flex-flow: row nowrap;
  justify-content: space-between;
  align-items: center;
}

header button {
  transform: scale(1.15);
  transition: all 0.15s ease-in;
  padding: 0.25rem 0.3rem 0.1rem 0.32rem;
  border: none;
  background-color: transparent;
}

header li > img {
  width: 40px;
  height: auto;
}

#createBtn {
  background-color: #fa812a;
  border-radius: 50%;
}

#newMessage button:focus,
#cameraButtons button:focus,
.buttons button:focus,
header button:focus,
footer button:focus,
#profileBody button:focus,
.delete-logout-body button:focus,
#postForm button:focus,
#updateForm button:focus,
.category button:focus,
#filter-form button:focus {
  outline: none;
}

footer button:active,
header button:active,
#newMessage button:active,
#cameraButtons button:active,
#profileBody button:active,
#postForm button:active,
#updateForm button:active,
.delete-logout-body button:active,
.category button:active,
#filter-form button:active {
  transform: scale(0.8);
}

.buttons button:active {
  transform: scale(0.6);
}

#coverOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 150;
  background-color: white;

  display: flex;
  flex-flow: row nowrap;
  justify-content: center;
  align-items: center;
}

.cover-content,
.video-div {
  max-width: 500px;
  text-align: justify;
}

/* @media screen and (min-width: 500px) { */
#coverOverlay {
  display: none;
}
/* } */

/* Sidebar */
#sidebarOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 90;
  background-color: rgba(0, 0, 0, 0.85);
  display: none;
}

#sidebar {
  background-color: white;
  padding: 0.5rem 0;
  transition: all 0.5s ease-out;
  position: relative;
  top: 0;
  left: 0;
  height: 100vh;
  width: 85vw;
  display: flex;
  flex-flow: column nowrap;
  gap: 1rem;
}

#sidebarHeader,
.category-wrapper h3,
.category-filters {
  padding: 0 0.75rem;
}

#sidebar > div:first-of-type {
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  justify-content: space-between;
}

.distance-wrapper {
  padding: 0 0.75rem;
}

.category-filters {
  display: flex;
  flex-flow: column nowrap;
  gap: 2px;
  height: 40vh;
  overflow-y: auto;
  margin-top: 0.25rem;
}

.category-filters button {
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
}

.scroll-for-more {
  display: flex;
  flex-flow: column nowrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border-bottom: 1px solid lightgray;
  box-shadow: 0 -3px 4px 0 rgba(0, 0, 0, 0.2);
}

.scroll-for-more img {
  transform: scale(1.25);
}

#filter-form {
  display: flex;
  flex-flow: column nowrap;
  gap: 1rem;
  padding-top: 0.5rem;
}

#filter-form input {
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.5rem;
  border-radius: 5px;
  border: 1px solid #737373;
  width: 100%;
  color: #737373;
}

#filter-form input:focus,
.form-wrapper input:focus,
#newMessage input:focus,
#postForm input:focus,
#postForm textarea:focus,
#postForm select:focus,
#updateForm input:focus,
#updateForm textarea:focus,
#updateForm select:focus {
  outline-color: #053e95;
}

#filter-form button {
  padding: 0.75rem;
  width: 100%;
  border-radius: 5px;
  cursor: pointer;
  background-color: #032963;
  color: #fbfbfb;
  font-weight: 600;
  font-size: 1rem;
  margin: auto;
  transition: all 0.15s ease-in;
  border: none;
}

.category button {
  display: flex;
  flex-flow: row nowrap;
  gap: 0.75rem;
  color: #737373;
  padding: 0.5rem;
  font-size: 1.15rem;
  width: 100%;
  border-radius: 0;
  border: none;
  background-color: transparent;
  transition: all 0.15s ease-in;
}

.category button > * {
  transition: all 0.15s ease-in;
}

.category button:hover,
.category button > *:hover {
  cursor: pointer;
  background-color: #e5e5e5;
}

.category.active-category button,
.category.active-category button > *:hover {
  background-color: #fa812a;
  color: white;
}

.category > button input {
  display: none;
}

.category img {
  transform: scale(1.25);
}

.distance {
  display: flex;
  flex-flow: column nowrap;
  gap: 0.25rem;
  color: #737373;
}

.distance-wrapper h3 span {
  color: #737373;
  font-size: 1rem;
  font-weight: normal;
}

aside#sidebar.sidebar-hidden {
  left: -85vw;
}

/* Main Sections */
#home-main > section {
  position: absolute;
  width: 100%;
  transition: all 0.75s ease-out;
  left: 0;
  z-index: 50;
  height: 90vh;
  overflow-y: scroll;
}

#home-main > section.section-hidden {
  opacity: 0;
  left: -100%;
}

/* Login page styles */
#index-main,
#signup-main {
  display: flex;
  height: 100vh;
  flex-flow: row nowrap;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

#index-main .form-wrapper,
#signup-main .form-wrapper {
  height: 90vh;
  width: 400px;

  display: flex;
  flex-flow: column nowrap;
  gap: 1rem;
}

#index-main .form-wrapper .logo,
#signup-main .form-wrapper .logo {
  flex-grow: 1;
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  justify-content: center;
}

.logo img {
  max-height: 60px;
  width: auto;
}

#login-form,
#signup-form {
  display: flex;
  flex-flow: column nowrap;
  gap: 1rem;
}

#index-main .form-wrapper input,
#signup-main .form-wrapper input {
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.75rem;
  border-radius: 5px;
  border: 1px solid #737373;
  width: 100%;
  margin-top: 0.25rem;
  color: #737373;
}

#index-main .form-wrapper button,
#signup-main .form-wrapper button {
  padding: 0.75rem;
  width: 100%;
  border-radius: 5px;
  border: 1px solid rgb(79, 79, 79);
  cursor: pointer;
  background-color: #032963;
  color: #fbfbfb;
  font-weight: 600;
  font-size: 1rem;
}

#index-main .sign-up,
#signup-main .login {
  flex-grow: 1;
  display: flex;
  flex-flow: column nowrap;
  justify-content: center;
  align-items: center;
}

#index-main .sign-up a,
#signup-main .login a {
  color: #fa812a;
  text-decoration: underline;
}

form label {
  font-weight: 600;
}

#rememberMe {
  align-self: flex-start;
}

#index-main form #rememberMe label {
  font-weight: normal;
  margin-left: 0.2rem;
}

.form-wrapper input#rememberMeCheck {
  width: initial;
}

/* Footer Styles */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 60;
  background-color: #fbfbfb;
}

footer nav {
  background-color: white;
  padding: 0.65rem 2rem;
  box-shadow: 0 -3px 8px 0 rgba(0, 0, 0, 0.2);
}

footer button {
  border-radius: 50%;
  background-color: #e5e5e5;
  transition: all 0.15s ease-in;
  border: none;
}

footer button img {
  padding: 0.25rem;
  transform: scale(1.25);
  padding-top: 0.3rem;
}

.footer-btn-active {
  background-color: #053e95;
}

/* Overlays for modals */
#updateOverlay,
#deleteOverlay,
#createOverlay,
#chatOverlay,
#logoutOverlay,
#cameraOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 90;
  background-color: rgba(0, 0, 0, 0.85);
  display: none;
}

#splashOverlay,
#offlineAnimation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 90;
  background-color: white;
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  justify-content: center;
}

#splashOverlay video,
#offlineAnimation video {
  transform: scale(1.05);
}

.video-div {
  overflow: hidden;
}

#alerts {
  background-color: white;
  padding: 0.75rem;
  position: fixed;
  top: -5rem;
  left: 50%;
  transform: translate(-50%, 0);
  transition: all 0.5s ease-out;
  border-radius: 10px;
  z-index: 100;
  width: 80%;
  text-align: center;
  box-shadow: 0px 2px 6px 1px rgb(97, 97, 97);
}

#home-main {
  position: relative;
}

/* Class Styles */
.closeBtn:not(#cameraOverlay .closeBtn) {
  font-size: 2rem;
  font-weight: bold;
}

.closeBtn:hover {
  cursor: pointer;
}

/* To hide elements that are present only for accessibility purposes */
.visually-hidden {
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

/* Chat */
.message {
  transition: all 0.4s ease-in-out;
}

.message > span:first-of-type {
  background-color: #ecebe4;
  border-radius: 2px;
  width: max-content;
  word-wrap: break-word;
  padding: 0.5rem 0.7rem;
  max-width: 225px;
}

.my-message {
  align-self: flex-end;
}

.my-message > span:first-of-type {
  background-color: #053e95;
  color: white;
  order: 2;
}

#previousMessages {
  height: 50vh;
  overflow-y: scroll;
  display: flex;
  flex-flow: column nowrap;
  margin: 0.25rem 0;
  gap: 1.35rem;
  padding: 0 1rem;
}

#previousMessages li {
  display: flex;
  flex-flow: row nowrap;
  gap: 1rem;
  align-items: flex-end;
}

#previousMessages li > span:last-of-type {
  font-size: 0.7rem;
  margin-bottom: 0.1rem;
  color: #737373;
}

#previousMessages li:last-of-type {
  margin-bottom: 1.25rem;
}

#previousMessages li:first-of-type {
  padding-top: 0.75rem;
}

#chatOverlay .modal {
  padding: 0;
}

#chatHeader {
  margin-bottom: 0;
  box-shadow: 0 3px 8px 0 rgba(0, 0, 0, 0.2);
  padding: 0.5rem 0.75rem;
}

#chatFooter {
  padding: 1rem;
  box-shadow: 0 -3px 8px 0 rgba(0, 0, 0, 0.2);
}

#newMessage form {
  display: flex;
  flex-flow: row nowrap;
  gap: 1rem;
  justify-content: space-between;
}

#newMessage input {
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.5rem;
  border-radius: 5px;
  border: 1px solid #737373;
  color: #737373;
  flex-grow: 1;
}

#newMessage button {
  border: none;
  transform: scale(1.25);
  background-color: transparent;
  transition: all 0.15s ease-in;
}

/* Sections */
section > h2 {
  max-width: max-content;
  padding: 0rem 0.25rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid gray;
}

/* Modals */
.modal {
  border: 1px solid black;
  border-radius: 10px;
  box-shadow: 0 5px 8px 0 rgba(0, 0, 0, 0.2), 0 7px 20px 0 rgba(0, 0, 0, 0.2);
  background-color: white;
  position: relative;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 90%;
  max-height: 98%;
}

#cameraOverlay {
  background-color: rgba(0, 0, 0, 1);
}

#cameraOverlay .modal {
  max-width: 100%;
  background-color: rgba(0, 0, 0, 1);
  padding: 0;
}

#cameraButtons {
  display: flex;
  flex-flow: row nowrap;
  justify-content: space-between;
  padding: 0 1rem;
  gap: 1rem;
  position: relative;
  top: -5rem;
}

#cameraButtons button {
  border-radius: 50%;
  max-width: 60px;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  transition: all 0.15s ease-in;
  border: none;
  background-color: white;
}

#snapButton {
  transform: scale(1.4);
}

#snapButton img {
  padding-top: 0.18rem;
}

#createHeader,
#updateHeader,
#deleteHeader,
#logoutHeader,
#chatHeader {
  display: flex;
  flex-flow: row nowrap;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 0.5rem;
  box-shadow: 0 3px 8px 0 rgba(0, 0, 0, 0.2);
  padding: 0.5rem 0.75rem;
  background-color: #fbfbfb;
  border-radius: 10px 10px 0 0;
}

#createHeader h2,
#updateHeader h2,
#deleteHeader h2,
#logoutHeader h2,
#chatHeader h2 {
  text-align: center;
  flex-grow: 1;
  justify-self: center;
}

.category-div,
.description-div {
  display: flex;
  flex-flow: column nowrap;
}

.image-div {
  display: flex;
  flex-flow: row nowrap;
  gap: 1rem;
}

.image-div button {
  margin-top: 0.25rem;
  padding: 0 0.75rem;
  background-color: white;
  border: 1px solid #737373;
  color: #737373;
  flex-grow: 1;
  transition: all 0.15s ease-in;
}

.image-div button:focus {
  outline-color: #053e95;
}

input[type="file"] {
  max-width: 70%;
}

#postForm input,
#postForm textarea,
#postForm select,
#updateForm input,
#updateForm textarea,
#updateForm select {
  margin-top: 0.25rem;
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.5rem;
  border-radius: 5px;
  border: 1px solid #737373;
  color: #737373;
}

#postForm textarea,
#updateForm textarea {
  height: 5rem;
  resize: none;
}

#postForm,
#updateForm,
.delete-logout-body {
  display: flex;
  flex-flow: column nowrap;
  gap: 1rem;
  padding: 0.5rem 1.25rem 1.25rem 1.5rem;
}

#postForm img,
#updateForm img {
  height: 50px;
  width: auto;
  border: 1px solid lightgray;
}

#postForm button[type="submit"],
#updateForm button[type="submit"],
.delete-logout-body button {
  padding: 0.75rem;
  width: 100%;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  background-color: #032963;
  color: #fbfbfb;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.15s ease-in;
}

.delete-logout-body {
  text-align: center;
}

.delete-logout-body button {
  background-color: #ff0000;
}

.required-field {
  color: red;
  font-size: 0.8rem;
}

.expected-date-time {
  display: flex;
  flex-flow: row nowrap;
  gap: 1rem;
}

.expected-date-time > input:last-of-type {
  flex-grow: 1;
}

.location-div {
  display: flex;
  flex-flow: row nowrap;
  gap: 0.5rem;
}

.location-div > input {
  margin: 0;
}

canvas {
  display: none;
  max-width: 100%;
  height: auto;
}

video {
  max-width: 100%;
  height: auto;
}

#uploadButton {
  display: none;
}
/* Notifications and Chat */
#notificationList,
#chatList {
  display: flex;
  flex-flow: column nowrap;
}

#notificationList li,
#chatList li {
  display: flex;
  flex-flow: row nowrap;
  gap: 0.5rem;
  padding: 1rem;
  border-bottom: 1px solid lightgray;
}

#notificationList li img,
#chatList li img {
  max-height: 40px;
  width: auto;
  border-radius: 50%;
}

#notificationList li > div,
#chatList li > div {
  display: flex;
  flex-flow: column nowrap;
  gap: 0.25rem;
}

#notificationList li > div > p:first-of-type,
#chatList li > div > p:first-of-type {
  font-weight: 600;
}

#chatList li > div > p:nth-of-type(2) > span {
  color: #737373;
}

#notificationList li > p:last-of-type,
#chatList li > span {
  flex-grow: 1;
  text-align: right;
  min-width: 12%;
  color: #737373;
  font-size: 0.9rem;
}

#notificationList li:hover,
#chatList li:hover {
  cursor: pointer;
  background-color: #e5e5e5;
}

/* Profile */
#profileBody {
  display: flex;
  flex-flow: column nowrap;
  gap: 4rem;
  height: 85%;
}

#profileBody button {
  margin: auto;
  background-color: transparent;
  border: none;
  font-family: inherit;
  font-size: inherit;
  display: flex;
  flex-flow: row nowrap;
  gap: 0.25rem;
  align-items: center;
  color: #737373;
  transition: all 0.15s ease-in;
  border: 1px solid gray;
}

#profileBody button img {
  transform: scale(1.25);
  padding: 0.1rem;
  margin-right: 0.2rem;
}

#profileInfo {
  padding: 2rem 2rem 0 2rem;
  display: flex;
  flex-flow: column nowrap;
  align-items: center;
  gap: 0.4rem;
}

#profileInfo img {
  max-width: 80px;
  height: auto;
  border-radius: 50%;
}

#profileInfo > p:last-of-type {
  padding-top: 2rem;
  text-align: center;
}

#profileInfo > p:first-of-type {
  font-weight: 600;
}

#profileInfo > p:nth-of-type(2) {
  font-size: 0.9rem;
  color: #737373;
}

/* Posts */
#postList {
  display: flex;
  flex-flow: column nowrap;
  gap: 1.2rem;
}

#postList li {
  padding: 1rem 1.5rem 0.75rem 0.75rem;
  border-radius: 10px;

  display: flex;
  flex-flow: row nowrap;
  gap: 0.5rem;
}

#postList li:last-of-type,
#notificationList li:last-of-type,
#chatList li:last-of-type {
  margin-bottom: 4rem;
}

.post-div {
  display: flex;
  flex-flow: column nowrap;
  gap: 0.5rem;

  flex-grow: 1;
}

.profile-pic-div {
  min-width: 40px;
  min-height: 40px;
}

.profile-pic-div img {
  max-height: 40px;
  width: auto;
  border-radius: 50%;
  object-fit: cover;
}

.name-distance-time {
  display: flex;
  flex-flow: row nowrap;
  align-items: flex-end;
  gap: 0.5rem;
}

.name-distance-time > span {
  display: flex;
  flex-flow: row nowrap;
  align-items: flex-end;
  gap: 0.25rem;
}

.name-distance-time > p:first-of-type {
  font-weight: 600;
}

.name-distance-time > p:last-of-type {
  flex-grow: 1;
  text-align: right;
  color: #737373;
}

.buttons {
  display: flex;
  flex-flow: row nowrap;
  gap: 0.25rem;
  /* margin-top: 0.2rem; */
}

#categoryDiv,
#dateTimeDiv {
  display: flex;
  flex-flow: row nowrap;
  gap: 0.5rem;
  color: #737373;
}

#categoryDiv img {
  transform: scale(1.35);
  margin: 0rem 0.35rem;
}

#dateTimeDiv img {
  transform: scaleX(1.2);
}

.buttons button {
  background-color: transparent;
  border: none;
  font-family: inherit;
  font-size: inherit;
  display: flex;
  flex-flow: row nowrap;
  gap: 2px;
  align-items: center;
  color: #737373;
  transition: all 0.15s ease-in;
}

.buttons button:first-of-type {
  padding-left: 0;
}

.buttons button img {
  border-radius: 50%;
  padding: 0.1rem;
}

.buttons .active span {
  color: #fa812a;
  /* font-weight: 600; */
}

.cover-content h2 {
  font-size: 1.5rem;
  text-align: center;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.cover-content p,
.video-div p {
  font-size: 18px;
  margin-bottom: 0.25rem;
}

@media screen and (-webkit-min-device-pixel-ratio: 0) {
  video {
    -webkit-filter: brightness(108.5%);
  }
}
