/* #region General*/
/******************************
* General
******************************/
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  background-image: url('./images/main_bg.jpg');
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  display: flex;
  flex-direction: column;
}

main {
  flex-grow: 1;
}

header,
footer {
  padding: 40px;
}

/* #endregion */


/* #region Header */
/******************************
* Header
******************************/
h1 {
  text-align: center;
  font-size: 3.5rem;
}

/* #endregion */


/* #region Main */
/******************************
* Main
******************************/
.container {
  /* Center the list*/
  max-width: 950px;
  margin: 0.5rem auto;

  /* The space inside the border */
  padding: 2.5rem 1.5rem 1.5rem 1.5rem;

  /* Border style */
  border-radius: 1rem;
  background-color: rgba(255, 255, 255, 0.329);
  box-shadow: 0 0 3rem rgba(0, 0, 0, 0.420);
}

.people-amount {
  font-size: 1.4rem;
  color: rgba(0, 0, 0, 0.400);
  padding-left: 0.3rem;
  padding-bottom: 16px;
}

.search-bar {
  display: flex;
  justify-content: space-between;
}

.search-bar input {
  /* Search box */
  width: 240px;
  border-radius: 1rem;
  border: 1px solid #ccc;
  font-size: 1rem;
  padding: 0.5rem 0.8rem;
  margin-bottom: 1rem;

  /* Search image*/
  background-image: url('./images/search.png');
  background-size: 18px;
  background-repeat: no-repeat;
  background-position: 95%;
}

.contact-item {
  list-style-type: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0, 0, 0, 0.350);
  /* Space between each row */
  padding: 17px 0;
}

/*For Java Script add-remove class*/
.bg-hover {
  border-radius: 1rem;
  padding: 1.7rem;
  background-color: rgba(0, 0, 0, 0.114);
}

.contact-item:last-child {
  /* Remove last border top */
  border-bottom: none;
}

.contact-img img {
  /* Circle the image */
  border-radius: 50%;
  width: 85px;
}

.contact-info {
  /* Space between name and image */
  display: flex;
  align-items: center;
  gap: 18px;
}

.contact-name {
  font-size: 1.5rem;
  font-weight: bold;
}

.btns img {
  width: 22px;
  cursor: pointer;
}

.btns button {
  /* Remove buttons defualt style */
  background: none;
  border: none;
  /* Space between each button icon */
  margin-left: 22px;
}

/* #endregion */


/* #region PopUp */
/******************************
******************************/
.popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
}

.window-style {
  border-radius: 1rem;
  position: relative;
  background-image: url('./images/main_bg.jpg');
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
  max-width: 97%;
  padding: 25px 60px 50px 60px;
}

.close-btn {
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
  top: 12px;
  right: 12px;
  width: 25px;
  height: 25px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 2.4rem;
  color: rgba(0, 0, 0, 0.5);
}

/* #endregion */


/* #region Add +Edit Contact Modal*/
/******************************
******************************/
h2 {
  padding-bottom: 40px;
  font-size: 2rem;
  text-align: center;
}

.star {
  color: red;
}


.form-group {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 15px;
  font-size: 1.4rem;
  font-family: 'Georgia';
}

.form-group input,
#newContactMessage,
#editContactMessage {
  padding: 8px;
  font-size: 1rem;
  border: 1px solid #ccc;
}

.btn-save {
  background-color: green;
  color: white;
  width: 100%;
  cursor: pointer;
  font-size: 1.1rem;
  border: none;
  border-radius: 5px;
  padding: 10px;
}

.btn-save:hover {
  background-color: rgb(0, 88, 0);
}

/* #endregion */


/* #region Contact Info Modal */
/******************************
******************************/
.user-image img {
  /*Center img */
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 20px;
  border-radius: 50%;
  width: 100px;
}

.user-info p {
  text-align: start;
  padding-top: 15px;
  color: rgb(50, 50, 50);
  font-size: 1.5rem;
  font-family: 'Georgia';
}

/* #endregion */


/* #region Toggle Dark Mode Effect*/
/******************************
******************************/
.toggleDarktBtn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 10px 20px;
  background-color: black;
  color: white;
  font-size: 14px;
  font-weight: bold;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.blackBg {
  background: black;
}

.whiteBg {
  background: white;
}

.silverBg {
  background: rgb(180, 180, 180);
}

.white {
  color: white;
}

.black {
  color: black;
}

.gray {
  background: rgba(255, 255, 255, 0.079);
}

/* #endregion */


/* #region Footer */
/******************************
* Footer
******************************/
footer {
  text-align: center;
  font-weight: bold;
  font-size: 1.2rem;
}

/* #endregion */


/* #region Responsive */

/* Laptop  ,Landscape, Large Screens */
@media screen and (max-width:952px) {
  .container {
    width: 98%;
    border-radius: 0.8rem;
  }

  .contact-name {
    font-size: 1.4rem;
  }

  .container {
    padding: 1.8rem 0.5rem 0.8rem 0.5rem;
  }

  .contact-img img {
    width: 65px;
  }

  .contact-info {
    gap: 9px;
  }

  .btns img {
    width: 20px;
  }

  .btns button {
    /* Space between each button-icon */
    margin-left: 13px;
  }
}

/* Tablet, iPad Screens  */
@media screen and (max-width:535px) {
  .close-btn {
    width: 25px;
    height: 25px;
    font-size: 1.8rem;
    top: 8px;
    right: 8px;
  }

  h1 {
    font-size: 2.5rem;
  }

  .people-amount {
    font-size: 1.2rem;
    padding-bottom: 0px;
  }

  .search-bar input {
    /* Search box */
    width: 170px;
    font-size: 0.9rem;

    /* Search image*/
    background-size: 15px;
  }

  .contact-item,
  .search-bar {
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
  }

  .contact-name {
    font-size: 1.1rem;
  }

  footer {
    font-size: 0.9rem;
  }

}

/*  Mobile L, M, S -- Screens */
@media screen and (max-width:460px) {

  .contact-item,
  .search-bar {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  .people-amount {
    font-size: 1rem;
  }

  .search-bar input {
    width: 160px;
    font-size: 0.8rem;
  }

  .contact-img img {
    width: 52px;
  }

  .contact-name {
    font-size: 1rem;
  }

  .btns img {
    /* Button icons size*/
    width: 16px;
  }

  .btns button {
    /* Space between each button-icon */
    margin-left: 5px;
  }


  /*For Java Script add-remove class*/
  .bg-hover {
    border-radius: 0.5rem;
    padding: 0rem;
  }


  .window-style {
    padding: 15px;
  }

  .form-group {
    align-items: normal;

    /* labels and inputs vertically on smaller screens */
    flex-direction: column;
  }

  .user-info p {
    font-size: 1.2rem;
    padding-top: 12px;
  }

  .user-image img {
    width: 85px;
    /* Smaller width for tablets */
    margin-bottom: 15px;
    /* Adjust bottom margin for smaller screens */
  }

}

/* #endregion */