:root {
  /* Background instead banner because it doesnt work*/
  --background-height: 300px;
  --profile-height: 700px;
  --profile-photo-size: 200px;
  --profile-spacing: 20px;
  --content-height: calc(var(--profile-height));
  --gallery-img-max-size: 300px;

  /* General config */
  --button-size: inherit;
  --button-font-size: inherit;
  --title-font-size: 2rem;
  --text-font-size: 1.3rem;
  --text-line-height: 45px;
  /* Font size */
}

/* Profile head */


/* Banner */

.profile__head { height: auto; }
.head__background {  height: var(--background-height); }

/* Profile head content */

.profile__head .head__content {
  width: 100%;
  height: var(--profile-height);
}

.content__profile-top  {
  gap: 0px !important;
  margin-top: var(--background-height);
  box-shadow: 0px -5px 5px -5px rgba(0, 0, 0, 0.5); /* Adjust values as needed */
}

/* Profile photo and editable */

.content__profile-top .file__editable,
.content__profile-top .img--profile {
  max-width: var(--profile-photo-size) !important;
  max-height: var(--profile-photo-size) !important;
  border-radius: 50%;
}

.file__editable label {
  color: aliceblue;
  font-weight: 600;
  align-items: end;
  justify-content: end;  
  align-self: flex-end;
  display: flex;
}

.file__editable label img {
  width: 40px;
}

.profile-top__photo {
  flex: 1;
  position: relative;
  padding-left: var(--profile-spacing);
  top: calc( (var(--profile-photo-size) / -2));
  align-items: center !important;
}

/* Profile name */
.profile-top__photo h1,
.profile-top__photo input{  
  width: max-content;
  font-size: var(--title-font-size);
  font-family: 'Times New Roman', Times, serif;
  text-transform: capitalize; 
  margin-bottom: var(--profile-spacing);
 }

 .profile-top__photo input {
  width: 60%;
 }

/* Right action buttons */

.profile-top__action {
  flex: 2;
  padding: var(--profile-spacing);
  align-items: flex-start;
  justify-content: flex-end;
}

/* Profile body */

.head__text {  
  margin-bottom: var(--profile-spacing);
  gap: 10px !important;
  padding: 0 25px;
  
  font-size: var(--text-font-size);
  margin-top: calc((var(--profile-photo-size) / 1.2) + var(--profile-spacing));
}

.head__text > *{  
  line-height: var(--text-line-height); 
}

.head__text--editable {
  margin-top: calc((var(--profile-photo-size) / 1.1) + var(--profile-spacing));
}

/* Keypoints, description */

.head__text .text__keypoints {
  gap: 10px;
}

.save-profile-wrapper {
  align-items: center !important;
  justify-content: center !important;
  width: 100%;
}

.save-profile {
  position: fixed;
  bottom: 25px;
  width: 100%;
  z-index: 3;
  align-items: center;
  justify-content: center;
}

.save-profile button {
  width: 80%;
  align-items: center;
  justify-content: center;
}

/* Edit profile */

/* Overwrite input styles */
.profile-top__photo input[name=name], 
.head__text--editable textarea {  
  background-color: transparent;
  border: 1px solid #777;
}

.profile-top__photo input[name=name]:focus, 
.head__text--editable textarea:focus {
  opacity: 1;
  /* border: var(--input-border) !important; */
  border: 1px solid gray !important;
}

/* Second section: gallery */
.section__tribute {
  /* write */
}

.tribute__gallery {
  gap: var(--profile-spacing) !important;
  padding: 20px var(--profile-spacing);
}

.tribute__gallery img,
.tribute__gallery video,
.tribute__gallery .media--delete,
.tribute__gallery a  { flex: 1 1 var(--gallery-img-max-size); }

.tribute__comments { 
  margin-top: var(--profile-spacing); 
  padding: var(--profile-spacing);
  border-bottom: 1px solid #aaa;
}

.tribute__comments .comment { 
  gap: 10px;
  padding-bottom: 40px;
  border-bottom: 1px solid #ddd; }

.comment h3,
.comment h3 > * {
    font-size: 1.5rem;
}

.comment p, 
.comment p > * {
  line-height: 40px;
}

.comment h3 input,
.comment p textarea  {
  width: 100%;
}

/* file upload card */
.media--upload {
  font-size: 4rem;
  border: 2px dashed black;
  transition: 300ms;
  padding: 30px;
}

.media--upload:hover { 
  background-color: #bbb;
}

.media--delete video,
.media--delete [type=submit] {
  width: 100%;
  height: 70%;
}

.media--delete [type=submit] {
  width: 100%;
  height: 20%;
}

.text__title--panel,
.text__title--comment-name {
  font-size: 2rem;
  font-family: 'Open sans' !important;
  font-weight: 400;
}

.text__title--comment-name {
  font-size: 2.2rem;
  text-transform: capitalize;
}

/* .section__gallery {  margin-top: var(--profile-height) !important; } */
/* .main__section-bottom { margin-top: var(--profile-margin-top); } */

  @media(max-width: 800px) {
    :root {
      --background-height: 200px;
      --profile-photo-size: 150px;
      --profile-spacing: 10px;
      --gallery-img-max-size: 150px;

      /* General config */
      --button-size: 5px;
      --button-font-size: .8rem;
      --title-font-size: 1.6rem;
      --text-font-size: 1rem;
      --text-line-height: 35px;
    }

    .profile-top__action .btn {
      padding: var(--button-size);
      font-size: var(--button-font-size);
    }

    .profile-top__photo { flex: 2.5; }
    .profile-top__action { flex: 3; }


    .head__text {  
      padding-bottom: var(--profile-spacing);
      margin-top: calc((var(--profile-photo-size) / 1.1) + var(--profile-spacing));
    }

    .head__text--editable {
      margin-top: calc((var(--profile-photo-size) / 1) + var(--profile-spacing));
    }
    
  }

  @media(max-width: 660px) {
    :root {
      --gallery-img-max-size: 100px;
  
      /* General config */
      --button-size: 4px;
      --button-font-size: 1rem;
      --text-font-size: .9rem;
    }

    .profile-top__photo { flex: 4.5; }
    .profile-top__action { flex: 2; }

    /* Overwrite input styles */
    .profile-top__photo input[name=name] {  
      font-size: 1.5rem;
    }
    .head__text--editable textarea {  
      font-size: 1rem;
    }

    .head__text {  
      margin-top: calc((var(--profile-photo-size) / 1) + var(--profile-spacing))  ;
    }


    .head__text--editable {
      margin-top: calc((var(--profile-photo-size) / 1) + var(--profile-spacing));
    }
  }


@media(max-width: 450px) {
  :root{
    --gallery-img-max-size: 100px;
  } 

}